diff options
author | Dirk von Suchodoletz | 2006-05-28 21:49:03 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-05-28 21:49:03 +0200 |
commit | fb67f24f4eff46b4792be2cd8a32127e96e44759 (patch) | |
tree | da3a47dc368bcd395e16d3417f0ae25c3c344402 /initrd | |
parent | default entry for X session ... (diff) | |
download | core-fb67f24f4eff46b4792be2cd8a32127e96e44759.tar.gz core-fb67f24f4eff46b4792be2cd8a32127e96e44759.tar.xz core-fb67f24f4eff46b4792be2cd8a32127e96e44759.zip |
corrected timing issue for apperance of nbd modules (within init),
placeholder functions for distro specific stuff in /etc/functions ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@240 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r-- | initrd/distro-specs/gentoo/functions-2005.1 | 11 | ||||
-rw-r--r-- | initrd/initrd-stuff/etc/functions | 22 | ||||
-rwxr-xr-x | initrd/initrd-stuff/init | 11 |
3 files changed, 30 insertions, 14 deletions
diff --git a/initrd/distro-specs/gentoo/functions-2005.1 b/initrd/distro-specs/gentoo/functions-2005.1 index a28019ef..f920b2f6 100644 --- a/initrd/distro-specs/gentoo/functions-2005.1 +++ b/initrd/distro-specs/gentoo/functions-2005.1 @@ -1,17 +1,14 @@ -# Description: configuration script for Ubuntu V5.10 to configure +# Description: configuration script for Gentoo V2005.1 to configure # linux diskless clients (executed within initial # ramdisk after genconfig) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-04-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 28-05-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # # Version: 0.0.2b -# distro specific stuff to initialize -preinit () { - : -} +# empty functions are defined at the beginning of /etc/functions postinit () { # rm -rf /mnt/etc/runlevels/default/* @@ -28,7 +25,7 @@ echo -e "# changes made to this file by $0 (initrd from $date)" \ config_rc_entry "KEYMAP" "${KEYTABLE}" } -# udev service - not checked! +# udev service - not verified! udev_hotplug () { echo "Starting udev" ln -s /bin/udevd /bin/udevstart && udevstart & diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index a07ebaef..b240ce4b 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -2,14 +2,34 @@ # linux diskless clients (included by init, hwautocfg, # servconfig, ... within initial ramdisk) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-04-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 28-05-2006 # Felix Endres, 30-04-2006 +# Tobias Maier # # Copyright: (c) 2006 - RZ Universitaet Freiburg # # Version: 0.4.2d ####################################################################### +# set of empty dummy functions (loaded before real functions in the +# distro specific files - to have no undeclared function in init, serv- +# config, hwautocfg, ... + +# distro specific funtion called at the beginning of init script +preinit () { + : +} +# distro specific funtion called at the end of init script +postinit () { + : +} +# distro specific general function called from servconfig script +config_distro () { + : +} + + +####################################################################### # generate events with the sysfs trigger trigger_device_events () { list=$(echo /sys/bus/*/devices/*/uevent) diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 743e195e..3ba3bca4 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -2,11 +2,11 @@ # Description: main script for new type of initial ramdisk for # linux diskless clients version 4 # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-05-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 28-05-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.4h +# Version: 0.2.4i # functions common for all distros, messages contains all error and info # output @@ -154,10 +154,6 @@ nfsroot=\"${NFSROOT}\"\n" >> /etc/machine-setup VCI=${opts#vci=};; esac done -# load block device driver if needed -if [ -n "${NBD}" ] ; then - modprobe ${MODPRV} ${NBD} || error "$init_errnbd" -fi # check if at least one type of IP configuration is availabe if [ -z "$DHCP" -a -z "$LDAP" -a -z "$IPINFO" ] ; then echo -e "# You did not specify any advanced configuration mode for your \ @@ -238,6 +234,9 @@ fi # if root filesystem should be imported via (d) network block device if [ -n "${NBD}" ] ; then + # load block device driver if needed + modprobe ${MODPRV} ${NBD} || error "$init_errnbd" + # get settings for nbd-client nbdhost=${NBDOPT%:*} nbdopt=${NBDOPT#*:} nbdport=${nbdopt%,*} |