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 <mthode@mthode.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1837
This commit is contained in:
parent
fd4f76160c
commit
760ec997df
|
@ -27,7 +27,7 @@ export PATH=/usr/local/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
|
||||||
|
|
||||||
if [ -z "$init" ]; then
|
if [ -z "$init" ]; then
|
||||||
# Not interactive
|
# Not interactive
|
||||||
grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
|
grep -qE '(^|[^\\](\\\\)* )zfs=(off|no)( |$)' /proc/cmdline && exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Source function library & LSB routines
|
# Source function library & LSB routines
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
if [ -z "$init" ]; then
|
if [ -z "$init" ]; then
|
||||||
# Not interactive
|
# Not interactive
|
||||||
grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
|
grep -qE '(^|[^\\](\\\\)* )zfs=(off|no)( |$)' /proc/cmdline && exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
|
|
|
@ -38,7 +38,7 @@ ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
|
||||||
|
|
||||||
if [ -z "$init" ]; then
|
if [ -z "$init" ]; then
|
||||||
# Not interactive
|
# Not interactive
|
||||||
grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
|
grep -qE '(^|[^\\](\\\\)* )zfs=(off|no)( |$)' /proc/cmdline && exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
start()
|
start()
|
||||||
|
|
|
@ -16,7 +16,7 @@ ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
|
||||||
|
|
||||||
if [ -z "$init" ]; then
|
if [ -z "$init" ]; then
|
||||||
# Not interactive
|
# Not interactive
|
||||||
grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
|
grep -qE '(^|[^\\](\\\\)* )zfs=(off|no)( |$)' /proc/cmdline && exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
|
@ -27,7 +27,7 @@ export PATH=/usr/local/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
|
||||||
|
|
||||||
if [ -z "$init" ]; then
|
if [ -z "$init" ]; then
|
||||||
# Not interactive
|
# Not interactive
|
||||||
grep -Eqi 'zfs=off|zfs=no' /proc/cmdline && exit 3
|
grep -qE '(^|[^\\](\\\\)* )zfs=(off|no)( |$)' /proc/cmdline && exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Source function library & LSB routines
|
# Source function library & LSB routines
|
||||||
|
|
Loading…
Reference in New Issue