In _xfs_mounted, add quotes around the grep expression to prevent partial matches.
authorLachlan McIlroy <lachlan@sgi.com>
Sat, 8 Jul 2006 04:23:04 +0000 (04:23 +0000)
committerLachlan McIlroy <lachlan@sgi.com>
Sat, 8 Jul 2006 04:23:04 +0000 (04:23 +0000)
Merge of master-melb:xfs-cmds:26491a by kenmcd.

  In _xfs_mounted, add quotes around the grep expression to prevent partial matches.

common.rc

index 67c2488d8cc665da6035d4d119cedbeba0eebaf2..d3c2a0c08c57647f1459e70f79ae7959ca3fe13e 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -635,7 +635,7 @@ _xfs_mounted()
 
     device=$1
 
-    if _mount | grep $device | $AWK_PROG '
+    if _mount | grep "$device " | $AWK_PROG '
         /type xfs/  { print $3 ; exit 0 }
         END         { exit 1 }
     '