diff options
author | Dirk von Suchodoletz | 2006-01-29 16:23:57 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-01-29 16:23:57 +0100 |
commit | 96c2314f22400aa67c6fc8ce5ceee8cf6429e48e (patch) | |
tree | 4df04e07372b865ab87241b3d74b31cd316227ec /initrd | |
parent | einige bugfixes (diff) | |
download | core-96c2314f22400aa67c6fc8ce5ceee8cf6429e48e.tar.gz core-96c2314f22400aa67c6fc8ce5ceee8cf6429e48e.tar.xz core-96c2314f22400aa67c6fc8ce5ceee8cf6429e48e.zip |
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
Diffstat (limited to 'initrd')
-rw-r--r-- | initrd/distro-specs/suse/config-10.0 | 8 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-10.0 | 8 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-9.3 | 7 | ||||
-rwxr-xr-x | initrd/initrd-stuff/bin/hwautocfg | 10 | ||||
-rwxr-xr-x | initrd/initrd-stuff/init | 19 | ||||
-rwxr-xr-x | initrd/mkdxsinitrd | 14 |
6 files changed, 42 insertions, 24 deletions
diff --git a/initrd/distro-specs/suse/config-10.0 b/initrd/distro-specs/suse/config-10.0 new file mode 100644 index 00000000..f222c866 --- /dev/null +++ b/initrd/distro-specs/suse/config-10.0 @@ -0,0 +1,8 @@ +# Description: distro specific settings for SuSE 10.0. This file merily +# contains changes from the SuSE 9.3 base configuration file +# +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 26-01-2006 +# +# Copyright: (c) 2003, 2005 - RZ Universitaet Freiburg + +# nothing changed yet diff --git a/initrd/distro-specs/suse/functions-10.0 b/initrd/distro-specs/suse/functions-10.0 index 449a552b..30606fd0 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>, 26-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 29-01-2006 # Blabla # Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.1a +# Version: 0.2.1b # acpi and powersave have changed config_acpi () { @@ -43,13 +43,13 @@ if [ "x$start_dreshal" = "xyes" ]; then stop="0"`expr $start - 1` rllinker "resmgr" "$start" "$stop" fi - if [ -f /mnt/etc/init.d/hal ] ; then + if [ -f /mnt/etc/init.d/haldaemon ] ; then strinfile "haldaemon:" /mnt/etc/passwd || \ echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \ >> /mnt/etc/passwd start="0"`expr $start + 1` stop="0"`expr $start - 1` - rllinker "hal" "$start" "$stop" + rllinker "haldaemon" "$start" "$stop" fi fi } diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3 index f9d2ef63..b7c26212 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>, 26-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 29-01-2006 # Blabla # Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.1a +# Version: 0.2.1b # distro specific stuff to initialize preinit () { @@ -314,6 +314,9 @@ config_dm_entry yes consolefont () { echo -e "\tsetfont ${CONSOLE_FONT} >${LOGFILE} 2>&1\n" \ >>/mnt/etc/${D_INITDIR}/boot.ld +sed -e "s,RC_LANG=.*,RC_LANG=\"${LANG}\" # added in initrd," \ + /mnt/etc/${D_SYSCONFDIR}/language > /etc/language +cp /etc/language /mnt/etc/${D_SYSCONFDIR}/language } # acpi and powersave 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 <dirk@goe.net>, 20-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 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 \ diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 04f10eef..30230c69 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>, 26-01-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 29-01-2006 # Nico Dietrich # Blub # -# Version: 0.3.0b +# Version: 0.3.0c # # Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg @@ -82,7 +82,7 @@ repco() { local FILENAME=$1 # do not forget to define all variables which should be replaced within -# the start and configuration scripts +# the start and configuration scripts. All comment lines will be deleted. if [ -d initrd-stuff/${FILENAME} ] ; then [ -d ${INSTDIR}/${FILENAME} ] || mkdir -p ${INSTDIR}/${FILENAME} else @@ -96,6 +96,7 @@ else -e "s,@@@COMETCEXCL@@@,${COMETCEXCL},g" \ -e "s,@@@DISTRO@@@,${DISTRO},g" \ -e "s,@@@NETIF@@@,${NET_IF},g" \ + -e "/^# .*/d" \ initrd-stuff/${FILENAME} >> ${INSTDIR}/${FILENAME} fi fi @@ -395,7 +396,7 @@ for bbins in \ done # style of hotplug/udev/dev (for etc directories see above!!) -for bbins in udev udevstart +for bbins in udev udevd udevstart do cobi ${bbins} bin || echo "Program ${bbins} not found" done @@ -444,6 +445,7 @@ if [ -z "$INITRD_PATH" ] ; then INITRD_PATH="/tmp/dxsinitrd.gz" fi +# put all needed modules into initial ramdisk mkdir -p ${INSTDIR}/lib/modules/${KERNVER} for module in af_packet ${NWMODULES} ${FSMODULES}; do mod=`cd /${ROOTDIR}; find "lib/modules/${KERNVER}" -name ${module}.ko \ @@ -463,9 +465,9 @@ for module in af_packet ${NWMODULES} ${FSMODULES}; do mkdir -p ${INSTDIR}/lib/modules/${KERNVER}/kernel/net/sunrpc/ mkdir -p ${INSTDIR}/lib/modules/${KERNVER}/kernel/fs/lockd cp ${ROOTDIR}/lib/modules/${KERNVER}/kernel/net/sunrpc/sunrpc.ko \ - ${INSTDIR}/lib/modules/${KERNVER}/kernel/net/sunrpc/ # &>/dev/null + ${INSTDIR}/lib/modules/${KERNVER}/kernel/net/sunrpc &>/dev/null cp ${ROOTDIR}/lib/modules/${KERNVER}/kernel/fs/lockd/lockd.ko \ - ${INSTDIR}/lib/modules/${KERNVER}/kernel/fs/lockd #&>/dev/null + ${INSTDIR}/lib/modules/${KERNVER}/kernel/fs/lockd &>/dev/null ;; esac fi |