aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Sommer <e5ten.arch@gmail.com>2020-01-02 09:28:25 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2020-01-11 12:09:10 -0600
commita7e7fd2b37a7666f26c2d4de9386b2d04f583b41 (patch)
tree0e366fcd77289fe705a55f1dea105fa9b0cab2e8
parent12e147a107c6e27172734c660624343a3c092437 (diff)
make grep usage POSIX compliant
use grep -E instead of egrep check for space or end of line instead of GNU-specific word boundary This fixes #345
-rw-r--r--sh/init-early.sh.Linux.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/init-early.sh.Linux.in b/sh/init-early.sh.Linux.in
index b7082a02..f304e924 100644
--- a/sh/init-early.sh.Linux.in
+++ b/sh/init-early.sh.Linux.in
@@ -20,7 +20,7 @@ service_present()
# succeed if $RC_SYS empty, can't check further, assume script will run
[ -z "$RC_SYS" ] && return 0
# fail if file contains "-$RC_SYS", because then it won't run
- egrep -qi "^[[:space:]]*keyword[[:space:]].*-$RC_SYS\>" "$p" && return 1
+ grep -Eqi "^[[:space:]]*keyword[[:space:]].*-$RC_SYS([[:space:]]|$)" "$p" && return 1
# succeed otherwise
return 0
}