From 81ebaa15140527b69f23f9e22ab041c580988029 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Mon, 9 Mar 2009 17:47:57 +0000 Subject: [PATCH] - use /proc/mounts if available for checking mounted fs svn-id: @10179 --- rc.d/init.d/functions | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 65e1e6c4..a92335c7 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -998,10 +998,15 @@ is_fsmounted() { [ -n "$fstype" -a -n "$mntpoint" ] || return 1 - if [ "$(/bin/stat -L -f -c %T $mntpoint 2>/dev/null)" = "$fstype" ]; then - return 0 + if [ -r /proc/mounts ]; then + LC_ALL=C grep -qE " $mntpoint +$fstype " /proc/mounts 2>/dev/null + return $? else - return 1 + if [ "$(/bin/stat -L -f -c %T $mntpoint 2>/dev/null)" = "$fstype" ]; then + return 0 + else + return 1 + fi fi } -- 2.44.0