diff options
author | Dirk von Suchodoletz | 2006-02-06 12:56:43 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-02-06 12:56:43 +0100 |
commit | b523ca5d931e47f684dcb828c82572169c1cf625 (patch) | |
tree | 6f86453a9e6487ec0a611861a6fc9d381339dffe | |
parent | Small hack to handle start of display manager in a better way - avoid (diff) | |
download | core-b523ca5d931e47f684dcb828c82572169c1cf625.tar.gz core-b523ca5d931e47f684dcb828c82572169c1cf625.tar.xz core-b523ca5d931e47f684dcb828c82572169c1cf625.zip |
Fixed small bug in mkdxsinitrd/repco (link copying) and moved the
udev/hotplug stuff into distro-specific functions file.
git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@62 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r-- | initrd/distro-specs/gentoo/functions-2005.1 | 16 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-10.0 | 18 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-9.3 | 15 | ||||
-rw-r--r-- | initrd/distro-specs/ubuntu/functions-5.10 | 16 | ||||
-rwxr-xr-x | initrd/initrd-stuff/init | 23 | ||||
-rwxr-xr-x | initrd/mkdxsinitrd | 4 |
6 files changed, 67 insertions, 25 deletions
diff --git a/initrd/distro-specs/gentoo/functions-2005.1 b/initrd/distro-specs/gentoo/functions-2005.1 index 5f7afa09..6fa20cdd 100644 --- a/initrd/distro-specs/gentoo/functions-2005.1 +++ b/initrd/distro-specs/gentoo/functions-2005.1 @@ -1,3 +1,19 @@ +# udev service - not checked! +udev_hotplug () { +local result=0 +echo "Starting udev" +udevstart || result=1 +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 || result=1 +else error " udev daemon is not available. Some devices might not \ +apprear." nonfatal +fi +return $result +} + # initialize boot.ld - skript to be executed during early system startup # (before most of the normal boot init scripts) # this script should operate like a normal runlevel script diff --git a/initrd/distro-specs/suse/functions-10.0 b/initrd/distro-specs/suse/functions-10.0 index df6239e4..da7891f8 100644 --- a/initrd/distro-specs/suse/functions-10.0 +++ b/initrd/distro-specs/suse/functions-10.0 @@ -3,7 +3,7 @@ # changes should be done there, version specific changes for # the 10.0 here. # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-02-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 06-02-2006 # Blabla # Blub # @@ -11,6 +11,22 @@ # # Version: 0.2.1c +# udev service +udev_hotplug () { +local result=0 +echo "Starting udev" +udevstart || result=1 +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 || result=1 +else error " udev daemon is not available. Some devices might not \ +apprear." nonfatal +fi +return $result +} + # acpi and powersave have changed config_acpi () { local start_acpi=10 diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3 index 44d28ce5..3b3412c8 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>, 05-02-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 06-02-2006 # Blabla # Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # -# Version: 0.2.1c +# Version: 0.2.1d # distro specific stuff to initialize preinit () { @@ -18,6 +18,17 @@ preinit () { : } +# udev/hotplug - auto device discovery service +udev_hotplug () { +local result=0 +[ -d /etc/hotplug -a -d /etc/hotplug.d ] || error " Hotplug subdirectory \ +is missing! udev(d) might not work as expected." nonfatal +echo "Enabling hotplug/udev" +udevstart || result=1 +udevd -d || result=1 +return $result +} + # linking runlevel scripts rllinker () { local script="$1" diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10 index 0447cb33..e5233bb7 100644 --- a/initrd/distro-specs/ubuntu/functions-5.10 +++ b/initrd/distro-specs/ubuntu/functions-5.10 @@ -16,6 +16,22 @@ preinit () { echo "dhcp:x:101:101::/nonexistent:/bin/false">>/etc/passwd } +# udev service +udev_hotplug () { +local result=0 +echo "Starting udev" +udevstart || result=1 +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 || result=1 +else error " udev daemon is not available. Some devices might not \ +apprear." nonfatal +fi +return $result +} + # linking runlevel scripts rllinker () { local script="$1" diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index e85c0d9e..bcb42c52 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -38,27 +38,8 @@ mkdir -p ${DEVDIR}/.udevdb echo 256 > /proc/sys/kernel/real-root-dev [ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys -# start device auto discovery (just the second case is tested yet) -if [ -d /etc/hotplug -a -d /etc/hotplug.d ] ; then - # older style udev/hotplug e.g. SuSE9.3 - echo "Enabling hotplug/udev" - #echo "/bin/hotplug" > /proc/sys/kernel/hotplug - udevstart - udevd -d -elif [ -x /bin/udev -a -x /bin/udevstart ] ; then - # new style udev e.g. SuSE10.0, Ubuntu5.10(?) - 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 [ -s /dev.tgz ] ; then - echo "Using traditional static /dev entries" - tar -xpzf /dev.tgz -C / & -fi +# start device auto discovery service - distro specific function +udev_hotplug # read kernel commandline TMPFSSIZE="50%" export DEBUGLEVEL=0 diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 5670021b..5d78633a 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -3,7 +3,7 @@ # Description: universal (distro independent) generator for initial # ramdisks for linux diskless clients # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-02-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 06-02-2006 # Nico Dietrich # Blub # @@ -92,6 +92,8 @@ if [ -d initrd-stuff/${FILENAME} ] ; then else if file initrd-stuff/${FILENAME}| grep "ELF" &>/dev/null ; then cp initrd-stuff/${FILENAME} ${INSTDIR}/${FILENAME} + elif [ -L initrd-stuff/${FILENAME} ] ; then + cp -a initrd-stuff/${FILENAME} ${INSTDIR}/${FILENAME%/*} else sed -e "s,@@@INSTDIR@@@,${INSTDIR},g" \ -e "s,@@@NWMODULES@@@,${NWMODULES},g" \ |