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 | |
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')
-rwxr-xr-x | initrd/initrd-stuff/bin/hwautocfg | 8 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 7 | ||||
-rw-r--r-- | initrd/initrd-stuff/etc/functions | 31 | ||||
-rwxr-xr-x | initrd/initrd-stuff/init | 26 |
4 files changed, 60 insertions, 12 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index 772b658d..7caaa5f3 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -4,13 +4,13 @@ # script for linux diskless clients, using hwconfig from # knoppix as base tool # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 06-02-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 06-03-2006 # Blabla # Blub # # Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg # -# Version: 0.3.1a +# Version: 0.3.1b # local functions used within hwautocfg displaysetup () { @@ -315,6 +315,10 @@ Please check that\n hwsetup is properly installed and executable." DRIVERLIST=" disabled unknown ignore pcspkr synaptics keybdev" # driver blacklist (real modules which fail to load) DRIVERLIST=${DRIVERLIST}" hw_random ichxrom kanotix genericwheelusb " +# hack for pseudo modules (not to load) +for i in $DRIVERLIST ; do + echo -e "alias\t$i\tusbcore" >> /etc/modprobe.conf +done # load ide drivers first, takes a while to initialize for DRIVER in cmd64x hpt366 piix slc90e66 cs5520 it821x rz1000 \ triflex aec62xx cs5530 ns87415 sc1200 trm290 alim15x3 \ diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index d80b2e73..7f7b419d 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -4,13 +4,13 @@ # for linux diskless clients (executed within initial # ramdisk) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-02-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 07-03-2006 # Blabla # Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.0.2c +# Version: 0.0.2e # check for configuration files to source @@ -63,6 +63,9 @@ fi localization $country ####################################################################### +# setup passwd and shadow for local system users + +####################################################################### # dns and ip configuration # hostname of the machine echo "$host_name" >/proc/sys/kernel/hostname 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 () { diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 6dd27b75..4927081d 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -2,13 +2,13 @@ # Description: main script for new type of initial ramdisk for # linux diskless clients version 4 # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 10-02-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 08-03-2006 # Bla # Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.2b +# Version: 0.2.3a # functions common for all distros errmsg="functions file contains a lot of script \ @@ -53,6 +53,7 @@ udev_hotplug TMPFSSIZE="50%" echo "noldap" > /tmp/ldap-done echo "nodhcp" > /tmp/dhcp-done +echo "nofile" > /tmp/file-done read KCMDLINE < /proc/cmdline export KCMDLINE for opts in ${KCMDLINE} ; do @@ -81,6 +82,17 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup ldap*) LDAP="yes" rm /tmp/ldap-done;; + # if (external, via tftp) configuration file retrieval should + # be triggered, if no source is given try dhcp server and + # predefined standard path + file) + FILE="yes" + rm /tmp/file-done;; + # file source with tftp server and file location on the server + file*) + FILE="yes" + FILESRC=${opts#file=} + rm /tmp/file-done;; # if ld.so.cache should not be generated noldsc) NOLDSC=yes;; @@ -185,8 +197,8 @@ sub_netmask=$NM\ngateway=$GW\nserverip=$SERVER" \ else noipyet="yes" fi -# get configuration data via dhcp (with vendor code identifier if present in -# ${VCI} or ldap if available (in background) +# get configuration data via dhcp (with vendor code identifier if present +# in ${VCI} (from kernel command line) ... [ -n "$DHCP" ] && rundhcp ${VCI} & if [ -n "$noipyet" ] ; then waitfor /tmp/dhcp-done 20000 @@ -197,7 +209,10 @@ configuration via DHCP. You may want to add\n a vendor code identifier \ via kernel commandline (vci=VCI)." ipsetup $clientip $subnet_mask $gateway $broadcast_address eth0 fi +# ... or ldap if available (in background) [ -n "$LDAP" ] && ldapconf & +# ... or via tftp file get (in background) +[ -n "$FILE" ] && fileget & # if root filesystem should be imported via (d) network block device if [ -n "${NBD}" ] ; then @@ -398,8 +413,7 @@ d_mkbootld close # should be killed if started within init killall -9 dhcpcd dhclient pump 2>/dev/null - -#bash +bash # post init for some distro specific postinit |