Displaying 2 results from an estimated 2 matches for "8d662fa".
Did you mean:
ad662fa
2016 Mar 22
1
[PATCH] appliance: use bash features for string matching in files
...ad the content of /proc/cmdline using bash features, and use its
[[ ... ]] expression to find texts in a variable.
This shaves off 5 grep invocations.
---
appliance/init | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/appliance/init b/appliance/init
index f6fe9b9..8d662fa 100755
--- a/appliance/init
+++ b/appliance/init
@@ -75,7 +75,9 @@ $UDEVD --daemon #--debug
udevadm trigger
udevadm settle --timeout=600
-if grep -sq selinux=1 /proc/cmdline; then
+cmdline=$(</proc/cmdline)
+
+if [[ $cmdline == *selinux=1* ]]; then
mount -t selinuxfs none /sys/fs/selinux...
2016 Mar 23
7
[PATCH v4 0/6] tests/qemu: Add program for tracing and analyzing boot times.
v4:
- Lots more analysis of the /init script and other parts.
- Display a list of the longest to shortest activities.
- Rebase on top of current head.
Rich.