diff options
author | Matthew Thode <[email protected]> | 2013-11-06 16:56:50 -0600 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-11-08 10:55:20 -0800 |
commit | 760ec997dfde8cf7dcbe1f367456423668e0cf76 (patch) | |
tree | de7ce1b550f4f0276ce46231c814811b5590bbb9 /etc/init.d/zfs.fedora.in | |
parent | fd4f76160cb34539f875781fe7f2dea4b937ace5 (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.fedora.in')
-rw-r--r-- | etc/init.d/zfs.fedora.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/init.d/zfs.fedora.in b/etc/init.d/zfs.fedora.in index 3cece9ba4..178637800 100644 --- a/etc/init.d/zfs.fedora.in +++ b/etc/init.d/zfs.fedora.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 |