From 05cd2ffd945f409eeb9fdbb020c41584a8d1536e Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Mon, 5 Jul 2010 14:52:14 -0300 Subject: Use findmnt to make mtab 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 (added a check whether /proc/self/mountinfo exists -- Thomas) --- rc.sysinit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3