From a9ce8e635ebac7e3924757c93a84619943862167 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 22 Mar 2016 15:48:53 +0100 Subject: [PATCH] appliance: use bash features for string matching in files Read the content of /proc/cmdline using bash features, and use its [[ ... ]] expression to find texts in a variable. This shaves off 5 grep invocations. (cherry picked from commit bb5d30ab2af5720775c63179afdec3ad9efd510d) --- appliance/init | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/appliance/init b/appliance/init index 3b76486..fd56033 100755 --- a/appliance/init +++ b/appliance/init @@ -77,7 +77,9 @@ $UDEVD --daemon #--debug udevadm trigger udevadm settle --timeout=600 -if grep -sq selinux=1 /proc/cmdline; then +cmdline=$(