aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2010-07-05 14:52:14 -0300
committerThomas Bächler <thomas@archlinux.org>2010-07-06 01:41:12 +0200
commit05cd2ffd945f409eeb9fdbb020c41584a8d1536e (patch)
tree48af2025269358296808a9076ca62a7e01b9e2c4
parent0937312b298e8604e12bbc3c8ab3bbfa89914be2 (diff)
downloadinitscripts-2010.07-1.tar.xz
Use findmnt to make mtab2010.07-1
Use findmnt command new in util-linux-ng 2.18 to make mtab based on /proc/self/mountinfo. Otherwise use current method. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> (added a check whether /proc/self/mountinfo exists -- Thomas)
-rwxr-xr-xrc.sysinit6
1 files changed, 5 insertions, 1 deletions
diff --git a/rc.sysinit b/rc.sysinit
index c62ae8d..fba11b2 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -297,7 +297,11 @@ fi
stat_busy "Mounting Local Filesystems"
/bin/mount -n -o remount,rw /
-cat /proc/mounts >| /etc/mtab
+if [ -x /bin/findmnt -a -e /proc/self/mountinfo ]; then
+ /bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab
+else
+ cat /proc/mounts >| /etc/mtab
+fi
run_hook sysinit_premount
# now mount all the local filesystems
/bin/mount -a -t $NETFS -O no_netdev