>You probably could have done that with just specifying another download
>method in the lrp.conf file. If that is not possible, would you mind to
>tell me what you needed to modify. I believe the rload script could be
>sufficiently abstract to cover most trivial download methods.


Well here i send to you the script i modified to use under ftp.
I make more easy the lrp.conf (for me i think).

----------------------------------------------------------------------------
-------------------------------------------
#!/bin/sh
#
# this script fetches a number of LEAF packages from a central server
# and installs them using lrpkg -i

# Copyleft 2003 Erich Titl ([EMAIL PROTECTED])
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.


RCDLINKS="2,S15"

. /etc/lrp.conf

PACKAGE_LIST=/var/lib/lrpkg/packages
INSTALLED_PACKAGES=`cat ${PACKAGE_LIST}`
INIT="/sbin/telinit 3"
RCLINK_UPDATE="/usr/sbin/update-rc.d -a -f -w -v"

fetch_and_install_lrp(){
        SOURCE=${RLOAD_USER}${RLOAD_HOST}
        ${RLOAD_PROGRAM} ${RLOAD_PROGRAM_PARAMS}
ftp://$RLOAD_USER:[EMAIL PROTECTED]/$1.lrp ${RLOAD_DEST_
        ${RLOAD_INSTALL_PROGRAM} ${RLOAD_INSTALL_PROGRAM_PARAMS} /tmp/$1
}

iterate_packages(){
        OIFS=$IFS
        IFS=","
        for i in $1
        do
                fetch_and_install_lrp $i
        done
        IFS=$OIFS
}
# check for programs before doing anything else

for i in ${RLOAD_PROGRAM} ${RLOAD_INSTALL_PROGRAM}
do
        [ ! -x $i ] && echo "cannnot find $i or $i is not executable" &&
exit 1
done

case $1 in
        start)  iterate_packages ${RLOAD_PACKAGE_LIST}
                echo updating rc.d directories
                ${RCLINK_UPDATE}
                echo all done switching init level
                ${INIT}
                ;;
        *)      echo usage: rload start $@
                ;;
esac

exit 0
----------------------------------------------------------------------------
-------------------------------------------
lrp.conf (add this lines)

#################################################
# Extensions for the rload function
# please modify to suit your needs
# copyleft 2003 Erich Titl [EMAIL PROTECTED]

RLOAD_USER="administrator"                      # if you need a username
provide it here
RLOAD_PASSWORD="yahoo"                  #
RLOAD_PROGRAM=/usr/bin/wget                     # the program to tranfer
your data
RLOAD_PROGRAM_PARAMS=""                         # parameters for the
transfer program
RLOAD_HOST=192.168.0.4                          # hostname or IP address
RLOAD_DIR=/servers/d                            # the source directory
almost like a URL
RLOAD_INSTALL_PROGRAM="/usr/sbin/lrpkg"         # the program used to unpack
RLOAD_INSTALL_PROGRAM_PARAMS=-i                 # parameters for your unpack
program
RLOAD_DEST_DIR=/tmp                             # the destination dir
RLOAD_DEL_PCK=1
RLOAD_DEST_PARAMS=-O
RLOAD_PACKAGE_LIST=config,dnscache,iptables,ppp,pppoe,tc,telnet
----------------------------------------------------------------------------
-------------------------------------------




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to