From 7fd0f219c94c26219f484620ead3317926172d69 Mon Sep 17 00:00:00 2001 From: Felix Endres Date: Sun, 30 Apr 2006 23:24:31 +0000 Subject: Debians udev is working now. Bugs in the installer fixed git-svn-id: http://svn.openslx.org/svn/openslx/ld4@206 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/distro-specs/debian/config-3.1 | 8 ++++---- initrd/distro-specs/debian/functions-3.1 | 20 ++++++++++++-------- initrd/initrd-stuff/etc/functions | 4 ---- initrd/initrd-stuff/init | 7 ++++++- initrd/mkdxsinitrd | 2 +- 5 files changed, 23 insertions(+), 18 deletions(-) (limited to 'initrd') diff --git a/initrd/distro-specs/debian/config-3.1 b/initrd/distro-specs/debian/config-3.1 index 95e2b996..2fd7a7b9 100644 --- a/initrd/distro-specs/debian/config-3.1 +++ b/initrd/distro-specs/debian/config-3.1 @@ -31,8 +31,8 @@ pptp.d\nisdn\nyouservers\nhardware/hwcfg*\n\ X11/xdm/pixmaps\ndhclient.script\n\ rc2.d/*\nrc5.d/*" D_BINDMPTS="tmp root home" -D_DIRINBINDMNT="/var/run /var/log /var/tmp" -D_RODIRSINRW="etc/gconf etc/X11/xkb /var/adm /var/lib/texmf /var/lib/gdm" +D_DIRINBINDMNT="/var/run /var/log /var/tmp /var/lib/gdm" +D_RODIRSINRW="etc/gconf etc/X11/xkb /var/adm /var/lib/texmf" D_DIRINDXS="/var/X11R6/compose-cache \ /var/run/sysconfig/tmp /var/adm /var/lib/rpm /var/lib/nobody \ /var/lib/pam_devperm /var/lib/bluetooth \ @@ -42,9 +42,9 @@ D_DIRINDXS="/var/X11R6/compose-cache \ D_BINDMNT="# " D_INITDIR="/init.d" D_INITBOOTD="/rcS.d" -D_INITDEFAULT="3" D_RCDIRS="/rc0.d /rc1.d /rc2.d /rc3.d /rc4.d /rc5.d /rc6.d" -D_INITSCRIPTS="mountvirtfs udev procps.sh bootlogd keymap.sh hwclock.sh sudo mountall.sh" +D_INITDEFAULT="3" +D_INITSCRIPTS="mountvirtfs udev procps.sh bootlogd keymap.sh hwclock.sh sudo dbus-1" D_XF86CONFFILE="/etc/X11/xorg.conf" D_XFONTPATH="/usr/X11R6/lib/X11/fonts/*" D_DEFAULTCOUNTRY="de" diff --git a/initrd/distro-specs/debian/functions-3.1 b/initrd/distro-specs/debian/functions-3.1 index 92e495d6..a0c1a9bb 100644 --- a/initrd/distro-specs/debian/functions-3.1 +++ b/initrd/distro-specs/debian/functions-3.1 @@ -34,12 +34,16 @@ config_distro () { # udev/hotplug - auto device discovery service # Result: 1 is bad, 0 is good udev_hotplug () { - local result=1 + local result=0 [ -d /etc/hotplug -a -d /etc/hotplug.d ] || error "$df_errhotpl" nonfatal echo "Enabling hotplug/udev" - udevstart && result=0 - udevtrigger && result=0 - udevd -d || result=1 + #udevstart && result=0 + #udevtrigger && result=0 + udevd --daemon || result=1 + [ ! -e /sbin/udevsend ] && result=1 + echo "/sbin/udevsend/" > /proc/sys/kernel/hotplug + mkdir -p /dev/.udev/db /dev/.udev/queue + trigger_device_events return $result } @@ -61,7 +65,7 @@ local start="$2" local stop="$3" # empty runlevel links - decision on running certain services is # passed via configuration -# fixme!! "stop" seems not to be used in Debian!? +# "stop" seems not to be used in Debian!? - It is. Felix for i in rc2.d/K$stop$script rc3.d/K$stop$script \ rc2.d/S$start$script rc3.d/S$start$script ; do if ! [ -f /mnt/etc/init.d/$script ]; then @@ -82,7 +86,7 @@ local info=$3 } # group of functions for the normal runlevels - first parameter is start -# second stop (fixme: is "stop" needed in Debian??) +# second stop (fixme: is "stop" needed in Debian?? - Yep) # function for ntp configuration config_ntp () { if [ -f /mnt/etc/init.d/ntp ] ; then @@ -234,8 +238,8 @@ config_gdm () { >${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.ld # check for gdm user in passwd and group files # fixme!! - echo "gdm:x:113:">>/mnt/etc/group - echo "gdm:x:106:113:Gnome Display Manager:/var/lib/gdm:/bin/false" \ +# echo "gdm:x:113:">>/mnt/etc/group +# echo "gdm:x:106:113:Gnome Display Manager:/var/lib/gdm:/bin/false" \ >>/mnt/etc/passwd } diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index bac1e53b..54eddc42 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -41,10 +41,6 @@ trigger_device_events () { # produce error message and if $2 is empty run (debug) shell error () { local e_msg="$1" -# fixme!! DEBUGLEVEL is exported rather early, so checking it here is -# redundant ... -if [ -z "$DEBUGLEVEL" ]; then DEBUGLEVEL=0 -fi # check if LOGFILE is really writeable if [ -n "${LOGFILE}" ] ; then [ "${LOGFILE}" != "/dev/null" ] && \ diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 2a098f1e..92bc253d 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -48,6 +48,7 @@ preinit # start device auto discovery service - distro specific function udev_hotplug + # set defaults and create waitfor files TMPFSSIZE="50%" COWSIZE="50%" @@ -71,7 +72,11 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup DEBUGLEVEL=1;; # debug level debug=*) - DEBUGLEVEL=${opts#debug=};; + DEBUGLEVEL=${opts#debug=} + # Handle empty, extremly large or non-numeric input + [ -z "$DEBUGLEVEL" ] && DEBUGLEVEL=0 + [[ "101" < "$DEBUGLEVEL" ]]; DEBUGLEVEL=100 + ;; # if configuration should be gathered by dhcp client dhcp) DHCP="yes" diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 8e43b605..1496accb 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -422,7 +422,7 @@ for bbins in \ done # style of hotplug/udev/dev (for etc directories see above!!) -for bbins in udev udevd udevstart udevtrigger +for bbins in udev udevd udevstart udevtrigger udevsend do cobi ${bbins} bin &>/dev/null || echo "Program ${bbins} not found" done -- cgit v1.2.3-55-g7522