diff options
author | Dirk von Suchodoletz | 2007-04-29 23:20:01 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-04-29 23:20:01 +0200 |
commit | 577ac78ce238514ccbb03610194fec7e37eae235 (patch) | |
tree | e74c71eac337b23361f970a52b87484534935b63 /initramfs/initrd-stuff/etc/functions | |
parent | Add Fedora 6 x86_64 to the systems being supported by slxos-setup (diff) | |
download | core-577ac78ce238514ccbb03610194fec7e37eae235.tar.gz core-577ac78ce238514ccbb03610194fec7e37eae235.tar.xz core-577ac78ce238514ccbb03610194fec7e37eae235.zip |
Fix and cleanup for fileget ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@964 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/etc/functions')
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 936a073a..e9f1a4c5 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -345,25 +345,15 @@ echo "dhcp finished at $(sysup)" > /tmp/dhcp-done # tftpget is helper function for fileget tftpgetunpack () { # $1 is config file name to get, $2 IP of server to get file from -for tftp in /bin/atftp /bin/tftp ; do - test -x $tftp && break -done echo -e "tftp\t69/tcp\ntftp\t69/udp" > /etc/services local dst=/tmp/$(basename $1) # tftp get part -case "$tftp" in - */atftp) - atftp -g -r $1 -l $dst $2 >/dev/null 2>&1 - ;; - */tftp) - # distinguish between busybox tftp and standalone (in.tftp) client - if [ -x /bin/busybox ] ; then - tftp -g -r $1 -l $dst $2 2>/dev/null - else - echo "get $1 $dst" | tftp $2 >/dev/null 2>&1 - fi - ;; -esac +# distinguish between busybox tftp and standalone (in.tftp) client +if [ -x /bin/busybox ] ; then + tftp -g -r $1 -l $dst $2 2>/dev/null +else + echo "get $1 $dst" | tftp $2 >/dev/null 2>&1 +fi # unpack part if [ -s $dst ] ; then # fixme: handle different types of packaging (gzip/bzip2)?? @@ -381,14 +371,15 @@ fileget () { if [ -n "$filesrc" ] ; then local srvproto=$(uri_token $filesrc prot) local cfgfile="/$(uri_token $filesrc path)" - local tftpserver=$(uri_token $filesrc server) + local tftpserver=$(checkip $(uri_token $filesrc server)) tftpgetunpack $tftp $cfgfile $tftpserver + echo "tftpgetunpack $tftp $cfgfile $tftpserver" >> /tmp/confviafile else # predefined value for openslx environment; it is expected that this # directory is just below the tftpboot/tftproot (path to which the # daemon is restricted to) local cfgdir="client-config" - local tftpserver=$serverip + local tftpserver=$(checkip ${serverip}) # try to get configuration files successively; start with distro client # and try last distro default ... echo -e "\n## Configuration via fileget: Hierarchy is distro client \ |