From beaa5288558fc78304bcd008b9254ae2725017f2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 25 Apr 2012 22:58:25 +0100 Subject: appliance: Remove some unnecessary errors. virt-rescue prints errors such as: rm: cannot remove `/proc': Is a directory mkdir: cannot create directory `/proc': File exists rm: cannot remove `/sys': Is a directory mkdir: cannot create directory `/sys': File exists People have reported these errors (which are nothing to worry about) as bugs in the past, so avoid them where possible. --- appliance/init | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appliance/init b/appliance/init index 52e46655..4461e302 100755 --- a/appliance/init +++ b/appliance/init @@ -12,9 +12,11 @@ export RUNLEVEL PREVLEVEL mkdir -p /sysroot -rm -f /proc; mkdir /proc +if [ ! -d /proc ]; then rm -f /proc; fi +mkdir -p /proc mount -t proc /proc /proc -rm -f /sys; mkdir /sys +if [ ! -d /sys ]; then rm -f /sys; fi +mkdir -p /sys mount -t sysfs /sys /sys mkdir -p /run/lock -- cgit