summaryrefslogtreecommitdiffstats
path: root/initramfs
diff options
context:
space:
mode:
authorFelix Endres2007-03-29 01:08:20 +0200
committerFelix Endres2007-03-29 01:08:20 +0200
commita1423e3e8a32b4f78d35baa78c1423503786d5a8 (patch)
tree397cf37cdba1c2aa22b42fbe1a49af12bc53781c /initramfs
parentCheck if IDE or SCSI is done automatically. (diff)
downloadcore-a1423e3e8a32b4f78d35baa78c1423503786d5a8.tar.gz
core-a1423e3e8a32b4f78d35baa78c1423503786d5a8.tar.xz
core-a1423e3e8a32b4f78d35baa78c1423503786d5a8.zip
Conditional creation of new links (removes "File Exists" errors)
Fixed Poweroff (NICs are shutdown prior to poweroff in the standard distribution) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@832 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r--initramfs/distro-specs/ubuntu/functions-6.105
-rwxr-xr-xinitramfs/initrd-stuff/bin/hwautocfg2
2 files changed, 4 insertions, 3 deletions
diff --git a/initramfs/distro-specs/ubuntu/functions-6.10 b/initramfs/distro-specs/ubuntu/functions-6.10
index 2943e885..c72878bf 100644
--- a/initramfs/distro-specs/ubuntu/functions-6.10
+++ b/initramfs/distro-specs/ubuntu/functions-6.10
@@ -28,12 +28,13 @@ 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
+ sed -i '/halt.*-i/s/ -i / /' /mnt/etc/init.d/halt
# set default runlevel
# how that is done for upstart??
# needed lateron (by hwsetup? - fixme, check if already copied by
# mkdxsinitrd!! If busybox is installed use tool directly ...)
- /mnt/bin/mknod /dev/zero c 1 5
- /mnt/bin/mknod /dev/mem c 1 1
+ [ -e /dev/zero ] || /mnt/bin/mknod /dev/zero c 1 5
+ [ -e /dev/mem ] || /mnt/bin/mknod /dev/mem c 1 1
}
# udev/hotplug - auto device discovery service
diff --git a/initramfs/initrd-stuff/bin/hwautocfg b/initramfs/initrd-stuff/bin/hwautocfg
index 127f3e22..4dae8810 100755
--- a/initramfs/initrd-stuff/bin/hwautocfg
+++ b/initramfs/initrd-stuff/bin/hwautocfg
@@ -359,7 +359,7 @@ if strinfile "SCSI" /tmp/hwsetup.info ; then
modprobe ${MODPRV} sg;
# just for compatibility to hwsetup (which generates links to scd*)
( waitfor /dev/sr0 1000 && for i in /dev/sr* ; do
- ln -s $i /dev/scd${i#/dev/sr} ; done; ) &
+ [ -e /dev/scd${i#/dev/sr} ] || ln -s $i /dev/scd${i#/dev/sr} ; done; ) &
}
strinfile "HD" /tmp/hwsetup.info && {
modprobe ${MODPRV} sd_mod