From d1684d1baf761d101f9435c397925bb42a9a878d Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Fri, 11 Aug 2006 11:25:43 +0000 Subject: changes to new fileget ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@290 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/etc/functions | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'initrd/initrd-stuff/etc/functions') diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index b05291b9..7cf5193e 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -1,10 +1,10 @@ # Description: common function script for the configuration of -# linux diskless clients (included by init, hwautocfg, -# servconfig, ... within initial ramdisk) +# linux diskless clients (included by init, hwautocfg, +# servconfig, ... within initial ramdisk) # -# Author(s): Dirk von Suchodoletz , 24-07-2006 -# Felix Endres, 30-04-2006 -# Tobias Maier +# Author(s): Dirk von Suchodoletz , 10-08-2006 +# Felix Endres, 30-04-2006 +# Tobias Maier # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -381,23 +381,19 @@ if [ -n "$FILESRC" ] ; then else cfgdir="/tftpboot/client-config/" local tftpserver=$serverip - # try to get configuration files successively; start with first most - # generic file (global default), then global client, then distro default - # last distro client ... - echo -e "\n## Configuration via fileget: Hierarchy is first most \ -generic file\n# (global default), then global client, then distro default \ -and as last\n# distro/client" >> /tmp/confviafile + # 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 \ +and as last\n# distro/default" >> /tmp/confviafile mac=$(echo $MAC|sed "s/:/-/g") - for cfgfile in $cfgdir/default $cfgdir/01-$mac \ - $cfgdir/$DISTRO/default $cfgdir/$DISTRO/01-$mac ; do - echo "# -> $cfgfile" >> /tmp/confviafile + for cfgfile in $cfgdir/$DISTRO/01-$mac $cfgdir/$DISTRO/default ; do if tftpget $cfgfile $tftpserver ; then - cat /tmp/$(basename $cfgfile) >> /tmp/confviafile - else - echo -e "# ... this file does not exist on server." >> /tmp/confviafile + : # unpack the tgz and distribute files fi done fi +#echo "# -> $cfgfile" >> /tmp/confviafile +#cat /tmp/$(basename $cfgfile) >> /tmp/confviafile echo "fileget via $srvproto finished" > /tmp/file-done } -- cgit v1.2.3-55-g7522