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.
This commit is contained in:
Richard W.M. Jones
2012-04-25 22:58:25 +01:00
parent 2d414112f7
commit beaa528855

View File

@@ -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