diff options
-rw-r--r-- | initrd/distro-specs/suse/functions-9.3 | 8 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/hwautocfg | 8 | ||||
-rwxr-xr-x | initrd/initrd-stuff/init | 7 | ||||
-rwxr-xr-x | initrd/mkdxsinitrd | 26 |
4 files changed, 33 insertions, 16 deletions
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3 index 97ca9525..6a491160 100644 --- a/initrd/distro-specs/suse/functions-9.3 +++ b/initrd/distro-specs/suse/functions-9.3 @@ -4,13 +4,13 @@ # functions file). This file is the main base for the # following SuSE distributions # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-02-2006 # Blabla # Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.1b +# Version: 0.2.1c # distro specific stuff to initialize preinit () { @@ -370,7 +370,7 @@ fi # configure automounter config_automount () { -#if [ -f /etc/${D_INITDIR}/autofs ] ; then +if [ -f /mnt/etc/sysconfig/autofs ] ; then testmkd /var/lock/subsys echo -e "# /etc/auto.master - file generated by $0:\n\ /misc\t/etc/auto.misc" >/mnt/etc/auto.master @@ -396,7 +396,7 @@ variable \${automnt_dir} appropriately in\n machine-setup file." nonfatal cp /etc/autofs /mnt/etc/sysconfig/autofs config_portmap rllinker "autofs" "18" "04" -#fi +fi } # start portmapper (needed at least for nfs and nis services) diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index 35af9f10..eba4e91f 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -4,7 +4,7 @@ # script for linux diskless clients, using hwconfig from # knoppix as base tool # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 31-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-02-2006 # Blabla # Blub # @@ -351,7 +351,10 @@ for DRIVER in ${NWMODULES}; do DRIVERLIST="${DRIVERLIST} ${DRIVER}"; } done # sound card setup (alsa and oss compatibility drivers) -. /etc/sysconfig/sound || DRIVER="snd-dummy" +if [ -f /etc/sysconfig/sound ] ; then + . /etc/sysconfig/sound +else DRIVER="snd-dummy" +fi modprobe ${MODPRV} ${DRIVER} DRIVERLIST="${DRIVERLIST} ${DRIVER} " modprobe -a ${MODPRV} snd_pcm_oss snd_mixer_oss @@ -386,6 +389,7 @@ done strinfile "genericwheelusb" /tmp/hwsetup.info && modprobe ${MODPRV} usbhid # fixme - usb keyboard?? if [ -n "$IDE" ] ; then + strinfile " ZIP " /tmp/hwsetup.info && modprobe ${MODPRV} ide_floppy strinfile "CDROM" /tmp/hwsetup.info && modprobe ${MODPRV} ide_cd strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} ide_disk & fi diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index d8fe2355..4859efb4 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -2,7 +2,7 @@ # Description: main script for new type of initial ramdisk for # linux diskless clients version 4 # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 31-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-02-2006 # Bla # Blub # @@ -215,7 +215,7 @@ as root filesystem." echo "Diskless client using ${NBD} server $nbdhost:$nbdport,$nbdfs" if [ -z "$nbdfs" ]; then RFST=ext2; - else + else RFST=$nbdfs; modprobe ${MODPRV} ${RFST} || error " Failed to load the requested \ filesystem module for the client root\n filesystem ontop of the (D)NBD." @@ -238,8 +238,8 @@ filesystem module for the client root\n filesystem ontop of the (D)NBD." usleep 20 ;; esac + mount -o ro $RDEV /mnt fi - # if no type of root filesystem is passed via kernel command line try # information gathered from dhcp process if [ -z "${DNBDOPT}" -a -z "${NBDOPT}" -a -z "${NFSROOT}" ] ; then @@ -389,6 +389,7 @@ of this client did not finish in\n time. You might check the process list \ and list the modules loaded until\n now." # close runlevel script for stuff to execute during early bootup d_mkbootld close +ash # IP configuration is made and should not be updated automatically, udevd # should be killed if started within init killall -9 dhcpcd dhclient pump 2>/dev/null diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 6395cb2d..7d1ba8f3 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -3,11 +3,11 @@ # Description: universal (distro independent) generator for initial # ramdisks for linux diskless clients # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-02-2006 # Nico Dietrich # Blub # -# Version: 0.3.0c +# Version: 0.3.1a # # Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg @@ -54,7 +54,7 @@ binfinder() { local PROGRAM="$1" local RET=1 - for ELEMENT in sbin bin usr/bin usr/sbin usr/local/bin usr/bin/X11; do + for ELEMENT in bin sbin usr/bin usr/sbin usr/local/bin usr/bin/X11; do if [ -f "${ROOTDIR}/$ELEMENT/$PROGRAM" ] && [ -x "${ROOTDIR}/$ELEMENT/$PROGRAM" ]; then printf '%s\n' "${ROOTDIR}/$ELEMENT/$PROGRAM" RET=0 @@ -72,6 +72,10 @@ local DEST=$2 local FPTB=`binfinder $1` if [ -z ${FPTB} ] ; then return 1; +elif [ -L ${FPTB} ] ; then + # do not copy the link but the binary the link points to + FPTB=${ROOTDIR}/`ls -la ${FPTB} | sed -e "s,.* ,,"` + cp ${FPTB} ${INSTDIR}/${DEST} else cp ${FPTB} ${INSTDIR}/${DEST} fi @@ -358,9 +362,8 @@ copy_distro_stuff ${DISTRO} ${DISTRO_VER} #if no klibc for bbins in ash bash sh; do if cobi ${bbins} bin ; then - LRCSH=/bin/${bbins} - ln -fs /bin/${bbins} ${INSTDIR}/bin/sh - [ "${bbins}" != "bash" ] && ln -fs /bin/${bbins} ${INSTDIR}/bin/bash + ln -fs ${bbins} ${INSTDIR}/bin/sh + [ "${bbins}" != "bash" ] && ln -fs ${bbins} ${INSTDIR}/bin/bash break else echo "Binary not found (${bbins})"; fi done @@ -368,7 +371,6 @@ done # if no klibc for bbins in ip ifconfig; do if cobi ${bbins} bin ; then - LRCIP=/bin/${bbins} [ "${bbins}" = "ifconfig" ] && cobi route bin break else echo "Binary not found"; fi @@ -414,6 +416,16 @@ mkdir -p ${INSTDIR}/var/lib/nfs/state # if nbd # cobi nbd-client bin +if [ -n ${FSMODULES} ] ; then + case ${FSMODULES} in + dnbd*) + cobi dnbd-client bin + ;; + nbd*) + cobi nbd-client bin + ;; + esac +fi # distro specific additional stuff case "${DISTRO}" in |