aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/init.d/zfs-functions.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/etc/init.d/zfs-functions.in b/etc/init.d/zfs-functions.in
index f5b74d458..490503e91 100644
--- a/etc/init.d/zfs-functions.in
+++ b/etc/init.d/zfs-functions.in
@@ -423,9 +423,14 @@ is_mounted()
mount | \
while read line; do
if echo "$line" | grep -q " on $mntpt "; then
- return 0
+ # returns:
+ # 0 on unsuccessful match
+ # 1 on a successful match
+ return 1
fi
done
- return 1
+ # The negation will flip the subshell return result where the default
+ # return value is 0 when a match is not found.
+ return $(( !$? ))
}