diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-04-25 22:58:25 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-04-25 22:58:25 +0100 |
commit | beaa5288558fc78304bcd008b9254ae2725017f2 (patch) | |
tree | 0badfdbd16435e7e2e5e8339d48758304fe0b083 /appliance/init | |
parent | 2d414112f7439d3f5b1b56b2392ab080c961f90c (diff) | |
download | libguestfs-beaa5288558fc78304bcd008b9254ae2725017f2.tar.gz libguestfs-beaa5288558fc78304bcd008b9254ae2725017f2.tar.xz libguestfs-beaa5288558fc78304bcd008b9254ae2725017f2.zip |
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.
Diffstat (limited to 'appliance/init')
-rwxr-xr-x | appliance/init | 6 |
1 files 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 |