[Libguestfs] [PATCH v2 09/11] appliance: skip /etc/mtab creation is already existing

Cédric Bosdonnat cbosdonnat at suse.com
Wed May 18 12:00:57 UTC 2016


At least on openSUSE and SLES, the /etc/mtab file is already existing.
Skipping the symlink creation in init removes one error message during
the appliance boot.
---
 appliance/init | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/appliance/init b/appliance/init
index eb60d06..3fdf4d0 100755
--- a/appliance/init
+++ b/appliance/init
@@ -66,7 +66,9 @@ ln -s ../run/lock /var/lock
 
 # On Fedora 23, util-linux creates /etc/mtab in %post .. stupid
 # and e2fsprogs fails if the link doesn't exist .. stupid stupid
-ln -s /proc/mounts /etc/mtab
+if ! test -e /etc/mtab; then
+  ln -s /proc/mounts /etc/mtab
+fi
 
 # devtmpfs is required since udev 176
 mount -t devtmpfs /dev /dev
-- 
2.6.6




More information about the Libguestfs mailing list