diff options
author | Felix Endres | 2006-04-30 04:03:13 +0200 |
---|---|---|
committer | Felix Endres | 2006-04-30 04:03:13 +0200 |
commit | 95c42e5352375c0bd08f597cad5a01fa29a73c41 (patch) | |
tree | 30c6c94f10ec20826ee21c40415fdc858cb49498 /initrd/distro-specs/debian/functions-3.1 | |
parent | fix for USB/VMware issue, removing unneeded dhcp user specified (diff) | |
download | core-95c42e5352375c0bd08f597cad5a01fa29a73c41.tar.gz core-95c42e5352375c0bd08f597cad5a01fa29a73c41.tar.xz core-95c42e5352375c0bd08f597cad5a01fa29a73c41.zip |
Work on debian, especially udev. Some documentation too.
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@204 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/distro-specs/debian/functions-3.1')
-rw-r--r-- | initrd/distro-specs/debian/functions-3.1 | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/initrd/distro-specs/debian/functions-3.1 b/initrd/distro-specs/debian/functions-3.1 index 144a7774..2a78ab6b 100644 --- a/initrd/distro-specs/debian/functions-3.1 +++ b/initrd/distro-specs/debian/functions-3.1 @@ -12,13 +12,39 @@ # distro specific stuff to initialize preinit () { - : + echo "Creating dhcp user" + echo "dhcp:x:101:">>/etc/group + echo "dhcp:x:101:101::/nonexistent:/bin/false" >>/etc/passwd + } postinit () { : } +# distro specific function called from servconfig script +config_distro () { +# add the halt link to the 0 and 6 runlevel directories + ln -sf ../init.d/halt /mnt/etc/rc0.d/S90halt + ln -sf ../init.d/reboot /mnt/etc/rc6.d/S90reboot + + # set default runlevel + sed -e "s/.*initdefault/id:${D_INITDEFAULT}:initdefault/" -i /mnt/etc/inittab +} + +# AUS SuSE-9.3 +# udev/hotplug - auto device discovery service +# Result: 1 is bad, 0 is good +udev_hotplug () { + local result=1 + [ -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 + return $result +} + # distro specific general function called from servconfig script config_distro () { # add the halt link to the 0 and 6 runlevel directories @@ -39,8 +65,13 @@ local stop="$3" # passed via configuration for i in rc2.d/K$stop$script rc3.d/K$stop$script \ rc2.d/S$start$script rc3.d/S$start$script ; do - ln -sf ../$script /mnt/etc/init.d/$i - echo "Linked $script" + if ! [ -f /mnt/etc/init.d/$script ]; then + echo "Target `pwd`../$script does not exist. Skipping links" + break + else + ln -sf ../init.d/$script /mnt/etc/$i + echo "Linked $script" + fi done } |