From 96c2314f22400aa67c6fc8ce5ceee8cf6429e48e Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 29 Jan 2006 15:23:57 +0000 Subject: Added udevd to initial ramdisk. All devices seem to appear by now. Added oss compat. to hwautocfg and fixed some minor bugs ... git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@45 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/bin/hwautocfg | 10 +++++++--- initrd/initrd-stuff/init | 19 ++++++++++--------- 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'initrd/initrd-stuff') diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index d722015e..b83479ea 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 , 20-01-2006 +# Author(s): Dirk von Suchodoletz , 29-01-2006 # Blabla # Blub # @@ -334,10 +334,11 @@ for DRIVER in ${NWMODULES}; do DRIVERLIST="${DRIVERLIST} ${DRIVER}"; } done -# sound card setup +# sound card setup (alsa and oss compatibility drivers) . /etc/sysconfig/sound || DRIVER="snd-dummy" modprobe ${MODPRV} ${DRIVER} DRIVERLIST="${DRIVERLIST} ${DRIVER} " +modprobe -a ${MODPRV} snd_pcm_oss snd_mixer_oss # remaining drivers listed in /tmp/hwsetup.info cat /tmp/hwsetup.info| while read LINE ; do @@ -356,10 +357,13 @@ done # is initialized ( usleep 20 && hwsetup -v > /tmp/hwsetup.info +# check if USB mouse and/or keyboard is connected strinfile "genericwheelusb" /tmp/hwsetup.info && modprobe ${MODPRV} usbhid -if strinfile "IDE" /tmp/hwsetup.info ;then +# fixme - usb keyboard?? +if strinfile "IDE" /tmp/hwsetup.info ; then strinfile "CDROM" /tmp/hwsetup.info && modprobe ${MODPRV} ide_cd strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} ide_disk & + usleep 5 fi ) & # configure some variables from configuration file - wait for dhcp or ldap diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 4f9333ac..4b4bffb9 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -40,13 +40,14 @@ echo 256 > /proc/sys/kernel/real-root-dev # start device auto discovery (just the first case is tested yet) if [ -x /bin/udev -a -x /bin/udevstart ] ; then -# if [ -x /bin/hotplug.sh ]; then -# echo "/bin/hotplug.sh" > /proc/sys/kernel/hotplug -# testmkd /events -# else - echo "/bin/udev" > /proc/sys/kernel/hotplug -# fi + echo "Starting udev" /bin/udevstart + if [ -x /bin/udevd ] ; then + export UDEVD_EXPECTED_SEQNUM=$(cat /sys/kernel/hotplug_seqnum) + export UDEVD_EVENT_TIMEOUT=1 + echo "" > /proc/sys/kernel/hotplug + udevd --daemon + fi elif [ -x /bin/hotplug ] ; then echo "Enabling hotplug" echo "/bin/hotplug" > /proc/sys/kernel/hotplug @@ -382,14 +383,14 @@ waitfor /tmp/svcfg 20000 || error " For some reason the software config \ of this client did not finish in\n time. You might check the process list \ and list the modules loaded until\n now." # IP configuration is made and should not be updated automatically -killall -9 dhcpcd dhclient pump 2>/dev/null +killall -9 dhcpcd dhclient pump udevd 2>/dev/null # unmount the bind mounted modules directory umount -n /lib/modules/${KERNEL} || error "Unmount of the kernel \ modules directory failed for some reason." # close runlevel script for stuff to execute during early bootup d_mkbootld close -# reset hotplug -echo "/sbin/hotplug" > /proc/sys/kernel/hotplug + +# check for inittab file test -f /mnt/etc/inittab || error " The file /etc/inittab does not exist or \ is no regular one. It is needed\n for the bootup procedure to follow." umount -n /sys || error " Unmount of the kernel sys directory \ -- cgit v1.2.3-55-g7522