summaryrefslogtreecommitdiffstats
path: root/appliance/init
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-06-22 16:43:42 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-06-22 16:43:42 +0100
commit6f63b699aa03271468f4af9f90933e2d8dbd3db0 (patch)
treeabcc1964d843596bd830ec60c99ac1ad5610d9ab /appliance/init
parent227b1eea90713d190a9cf5463af106af0b4eee2c (diff)
downloadlibguestfs-6f63b699aa03271468f4af9f90933e2d8dbd3db0.tar.gz
libguestfs-6f63b699aa03271468f4af9f90933e2d8dbd3db0.tar.xz
libguestfs-6f63b699aa03271468f4af9f90933e2d8dbd3db0.zip
Issue MAKEDEV commands in a loop (RHBZ#507374).
Diffstat (limited to 'appliance/init')
-rwxr-xr-xappliance/init8
1 files changed, 6 insertions, 2 deletions
diff --git a/appliance/init b/appliance/init
index 41ce9166..96d785c5 100755
--- a/appliance/init
+++ b/appliance/init
@@ -3,8 +3,12 @@ echo Starting /init script ...
PATH=/sbin:/usr/sbin:$PATH
mount -t tmpfs none /dev
mkdir /dev/pts /dev/shm /dev/mapper
-MAKEDEV mem null port zero core full ram tty console fd \
- hda hdb hdc hdd sda sdb sdc sdd loop sd
+# Must do each MAKEDEV individually, because if one device fails,
+# MAKEDEV will quit without creating the rest (RHBZ#507374).
+for dev in mem null port zero core full ram tty console fd \
+ hda hdb hdc hdd sda sdb sdc sdd loop sd; do
+ MAKEDEV $dev ||:
+done
mknod /dev/ptmx c 5 2; chmod 0666 /dev/ptmx
mknod /dev/random c 1 8; chmod 0666 /dev/random
mknod /dev/urandom c 1 9; chmod 0444 /dev/urandom