Browse Source

Example linux services: rootfscheck.sh: Fix #117 (#118)

For some reasons; `findmnt` prints full path of root (/) when root created on btrfs subvolume partition but `fsck` can't parse that!
so `rootfscheck.sh` Can't checks btrfs subvol roots.

This commit fixs thats thing via adding `-v` flag to `findmnt` tool.

Signed-off-by: Mobin Aydinfar <mobin@mobintestserver.ir>
Reviewed-by: Davin McCall <EMAIL HIDDEN>
Mobin 1 year ago
parent
commit
6f02ce9d5a
1 changed files with 4 additions and 4 deletions
  1. 4 4
      doc/linux/services/rootfscheck.sh

+ 4 - 4
doc/linux/services/rootfscheck.sh

@@ -2,9 +2,9 @@
 export PATH=/usr/bin:/usr/sbin:/bin:/sbin
 
 if [ "$1" != "stop" ]; then
-  
-  ROOTDEV=`findmnt -o SOURCE -n -M /`
-  
+
+  ROOTDEV=`findmnt -v -o SOURCE -n -M /`
+
   echo "Checking root file system (^C to skip)..."
   if [ -x /sbin/fsck ]; then
     /sbin/fsck -C -a "$ROOTDEV"
@@ -28,5 +28,5 @@ if [ "$1" != "stop" ]; then
   else
     echo "WARNING - Could not find /sbin/fsck"
   fi
-  
+
 fi;