summaryrefslogtreecommitdiffstats
path: root/etc/init.d/zfs.redhat.in
diff options
context:
space:
mode:
authorMatthew Thode <[email protected]>2013-11-06 16:56:50 -0600
committerBrian Behlendorf <[email protected]>2013-11-08 10:55:20 -0800
commit760ec997dfde8cf7dcbe1f367456423668e0cf76 (patch)
treede7ce1b550f4f0276ce46231c814811b5590bbb9 /etc/init.d/zfs.redhat.in
parentfd4f76160cb34539f875781fe7f2dea4b937ace5 (diff)
Updating init scripts to have more robust grepping
The previous pattern could accidentally match on things like 'real_root=ZFS=node02-zp00/ROOT/rootfs' due to the 'ZFS=no' substring. Signed-off-by: Matthew Thode <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1837
Diffstat (limited to 'etc/init.d/zfs.redhat.in')
-rw-r--r--etc/init.d/zfs.redhat.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/init.d/zfs.redhat.in b/etc/init.d/zfs.redhat.in
index fb5187f05..227787d22 100644
--- a/etc/init.d/zfs.redhat.in
+++ b/etc/init.d/zfs.redhat.in
@@ -27,7 +27,7 @@ export PATH=/usr/local/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
if [ -z "$init" ]; then
# Not interactive
- grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
+ grep -qE '(^|[^\\](\\\\)* )zfs=(off|no)( |$)' /proc/cmdline && exit 3
fi
# Source function library & LSB routines