diff options
author | Dirk von Suchodoletz | 2006-02-04 00:41:08 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-02-04 00:41:08 +0100 |
commit | 5203a6e73bae59c54df4856f695074dfbb9a5db8 (patch) | |
tree | 6f7317971be876a7b54bc323d25e2764edefa719 /initrd | |
parent | Fixed bug in mkdxsinitrd - if link of a binary is copied you get the (diff) | |
download | core-5203a6e73bae59c54df4856f695074dfbb9a5db8.tar.gz core-5203a6e73bae59c54df4856f695074dfbb9a5db8.tar.xz core-5203a6e73bae59c54df4856f695074dfbb9a5db8.zip |
Improvements in hwautocfg (checked against lots of machines), nscd
added, ...
git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@58 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rw-r--r-- | initrd/distro-specs/debian/functions-3.1 | 6 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-10.0 | 4 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-9.3 | 18 | ||||
-rw-r--r-- | initrd/distro-specs/ubuntu/functions-5.10 | 6 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/hwautocfg | 31 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 9 | ||||
-rwxr-xr-x | initrd/initrd-stuff/init | 4 |
7 files changed, 53 insertions, 25 deletions
diff --git a/initrd/distro-specs/debian/functions-3.1 b/initrd/distro-specs/debian/functions-3.1 index 4344ac96..f0446010 100644 --- a/initrd/distro-specs/debian/functions-3.1 +++ b/initrd/distro-specs/debian/functions-3.1 @@ -200,3 +200,9 @@ if [ "x$start_dreshal" = "xyes" ]; then echo >/dev/null fi } + +# start name service caching daemon +config_nscd () { +: +} + diff --git a/initrd/distro-specs/suse/functions-10.0 b/initrd/distro-specs/suse/functions-10.0 index 30606fd0..df6239e4 100644 --- a/initrd/distro-specs/suse/functions-10.0 +++ b/initrd/distro-specs/suse/functions-10.0 @@ -3,13 +3,13 @@ # changes should be done there, version specific changes for # the 10.0 here. # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 29-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 # acpi and powersave have changed config_acpi () { diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3 index 6a491160..2184f8f6 100644 --- a/initrd/distro-specs/suse/functions-9.3 +++ b/initrd/distro-specs/suse/functions-9.3 @@ -47,7 +47,7 @@ if [ -f /mnt/etc/init.d/ntp ] ; then >>/mnt/etc/${D_INITDIR}/boot.ld echo -e "\tntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 &" \ >>/mnt/etc/${D_INITDIR}/boot.ld - else + elif [ "x$start_ntp" = "xyes" ] ; then rllinker "ntp" "$start" "$stop" fi fi @@ -189,11 +189,12 @@ config_dm_entry yes config_gdm () { config_dm_entry yes testmkd /mnt/var/lib/gdm +testmkd /mnt/var/log/gdm strinfile "gdm:" /mnt/etc/passwd || echo "gdm:x:50:15:Gnome Display Manager \ Daemon:/var/lib/gdm:/bin/false" >>/mnt/etc/passwd # hack - gdm should be user 50 and shadow group 15 -chown 50:15 /mnt/var/lib/gdm -chmod 0750 /mnt/var/lib/gdm +chown 50:15 /mnt/var/lib/gdm /mnt/var/log/gdm +chmod 0750 /mnt/var/lib/gdm /mnt/var/log/gdm xdmcp_hosts=`echo $x_display_manager|sed -e "s; ;,;"` if [ "${DEBUGLEVEL}" -gt 0 ] ; then debug="true" @@ -348,7 +349,7 @@ if [ "x$start_dreshal" = "xyes" ]; then echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \ >> /mnt/etc/passwd testmkd /mnt/var/run/dbus - # chown 100:101 /mnt/var/run/dbus + chown 100:101 /mnt/var/run/dbus rllinker "dbus" "$start" "$stop" fi if [ -f /mnt/etc/init.d/resmgr ] ; then @@ -361,6 +362,8 @@ if [ "x$start_dreshal" = "xyes" ]; then strinfile "haldaemon:" /mnt/etc/passwd || \ echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \ >> /mnt/etc/passwd + testmkd /mnt/var/run/hal + chown 105:103 /mnt/var/run/hal start="0"`expr $start + 1` stop="0"`expr $start - 1` rllinker "hal" "$start" "$stop" @@ -398,6 +401,13 @@ variable \${automnt_dir} appropriately in\n machine-setup file." nonfatal rllinker "autofs" "18" "04" fi } +# start name service caching daemon +config_nscd () { +if [ -f /mnt/etc/init.d/nscd ] ; then + testmkd /mnt/var/run/nscd + rllinker "nscd" "02" "16" +fi +} # start portmapper (needed at least for nfs and nis services) config_portmap () { diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10 index 9c7c8ccc..0447cb33 100644 --- a/initrd/distro-specs/ubuntu/functions-5.10 +++ b/initrd/distro-specs/ubuntu/functions-5.10 @@ -227,3 +227,9 @@ from $0" >/mnt/etc/${D_INITDIR}/boot.ld ;; esac } + +# start name service caching daemon +config_nscd () { +: +} + diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index eba4e91f..7bd7b7b5 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -273,13 +273,7 @@ configuration\n file" nonfatal fi # USB core is needed for presence of /proc/bus/usb -if [ -n "${UDEVD_EXPECTED_SEQNUM}" ] ; then - # if udevd is used usbfs is mounted automatically - modprobe ${MODPRV} usbcore & -else - # mount usbfs after loading of module - ( modprobe ${MODPRV} usbcore && mount -n -t usbfs usbfs /proc/bus/usb ) & -fi +modprobe ${MODPRV} usbcore & # load kernel module for ps2 mice [ -f /lib/modules/${KERNEL}/kernel/drivers/input/mouse/psmouse.ko ] && \ @@ -331,7 +325,7 @@ done # check for IDE/SCSI (SATA) - incomplete list for DRIVER in ata_piix sata_via; do strinfile " ${DRIVER}" /tmp/hwsetup.info && { - SCSIIDE="yes" + #SCSIIDE="yes" modprobe ${MODPRV} ${DRIVER} & DRIVERLIST="${DRIVERLIST} ${DRIVER}"; } done @@ -365,7 +359,7 @@ for DRIVER in yenta_socket i82365 pd6729 tcic; do DRIVERLIST="${DRIVERLIST} ${DRIVER}" PCMCIA="yes"; } done -if [ -n "PCMCIA" ] ; then +if [ -n "${PCMCIA}" ] ; then #echo "pcmcia=\"yes\"" > config modprobe ${MODPRV} ds fi @@ -384,19 +378,28 @@ done # rerun the knoppix hardware autodetection tool for USB and ide devices # like dvd or harddisk - wait a few seconds so hopefully the ide driver # is initialized -( usleep 10 && hwsetup -v > /tmp/hwsetup.info +test -f /proc/bus/usb/devices || mount -n -t usbfs usbfs /proc/bus/usb +usleep 10 && hwsetup -v > /tmp/hwsetup.info # check if USB mouse and/or keyboard is connected -strinfile "genericwheelusb" /tmp/hwsetup.info && modprobe ${MODPRV} usbhid +if strinfile "genericwheelusb" /tmp/hwsetup.info ; then + modprobe ${MODPRV} usbhid +elif strinfile "keybdev" /tmp/hwsetup.info ; then + modprobe ${MODPRV} usbhid +fi + # fixme - usb keyboard?? if [ -n "$IDE" ] ; then - strinfile " ZIP " /tmp/hwsetup.info && modprobe ${MODPRV} ide_floppy + # you might want to check /etc/sysconfig/floppy for more info + 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 -if [ -n "$SCSIIDE" ] ; then +# not rather precise ... +if strinfile "SCSI" /tmp/hwsetup.info ; then strinfile "CDROM" /tmp/hwsetup.info && modprobe -a ${MODPRV} sr_mod sg strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} sd_mod & -fi ) +fi + # cdrom/dvd und plattenkonfig. ergaenzen. Module sind hier geladen und # devices sind klar diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index d5220e64..d80b2e73 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>, 30-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-02-2006 # Blabla # Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.0.2b +# Version: 0.0.2c # check for configuration files to source @@ -181,6 +181,7 @@ if [ "x$start_x" != "xno" ] ; then /etc/X11/xdm \ /etc/X11/sessions \ /var/X11R6/bin \ + /var/run/xdmctl \ /tmp/.ICE-unix \ /tmp/.X11-unix; do testmkd /mnt/$i; done chmod a+rwxt /mnt/tmp/.ICE-unix @@ -303,4 +304,8 @@ if [ "x$nis_domain" != "x" ] && [ "x$nis_servers" != "x" ] ; then strinfile "+::::::" /mnt/etc/passwd || echo "+::::::" >>/mnt/etc/passwd fi +####################################################################### +# name service caching daemon if networked user database +config_nscd + echo "finished" > /tmp/svcfg diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 4859efb4..704a7a18 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -321,7 +321,7 @@ else # for tar exclude lists might be used, more difficult for cp cd /mnt tar -X /tmp/etc.exclude -cp etc/* | \ - tar -xp -C ${RWDIR}>/dev/null ; + tar -xp -C ${RWDIR} 2>/dev/null ; cd / mount -n --bind ${RWDIR}/etc /mnt/etc mount -n --bind ${RWDIR}/var /mnt/var @@ -362,7 +362,6 @@ usbfs\t\t/proc/bus/usb\tusbfs\t\tnoauto\t\t 0 0">/mnt/etc/fstab || \ error "Failed to create /etc/fstab in the clients root filesystem. The\n\ noexistence of the file might produce some unexpected behaviour of\n\ mount commands." -date # copy library cache if generated if [ -z "${NOLDSC}" ] ; then if waitfor /tmp/ldcfg 50000 ; then @@ -389,7 +388,6 @@ 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 |