diff options
author | Dirk von Suchodoletz | 2006-03-07 20:05:28 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-03-07 20:05:28 +0100 |
commit | 435ca4cc1590d4a51af49b629fba73080bc2583f (patch) | |
tree | 8155ffca8a6db83b5ee609c93d67c9182b0144b6 /initrd/initrd-stuff/etc/functions | |
parent | further installer progress (diff) | |
download | core-435ca4cc1590d4a51af49b629fba73080bc2583f.tar.gz core-435ca4cc1590d4a51af49b629fba73080bc2583f.tar.xz core-435ca4cc1590d4a51af49b629fba73080bc2583f.zip |
started to add alternative configuration via file (tftp get from
server), see DXS Wiki too ...
git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@92 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/etc/functions')
-rw-r--r-- | initrd/initrd-stuff/etc/functions | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 349ee9da..e80fdc67 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -2,13 +2,13 @@ # linux diskless clients (included by init, hwautocfg, # servconfig, ... within initial ramdisk) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 20-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 07-03-2006 # Blabla # Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.4.1b +# Version: 0.4.2a ####################################################################### # generate events with the sysfs trigger @@ -255,6 +255,33 @@ echo "finished" > /tmp/dhcp-done } ####################################################################### +# function for retrieving configuration file (machine-setup) via tftp +# from a predefined server or given source (file=tftp-server:/path via +# kernel command line) +fileget () { +for tftp in /bin/atftp /bin/tftp ; do + test -x $tftp && break +done +if [ -n "$FILESRC" ] ; then + cfgfile=${FILESRC#*:} + tftpserver=${FILESRC%:*} +else + cfgfile="/tftpboot/dxs-config/$clientip.cfg" + tftpserver=$serverip +fi +# +case "$tftp" in + atftp) + atftp -g -r $cfgfile $tftpserver + ;; + tftp) + echo "get $cfgfile" | tftp $tftpserver + ;; +esac +echo "finished" > /tmp/file-done +} + +####################################################################### # function for creating directories after testing of their existance # avoids to recreate directories in union mounts testmkd () { |