From 2bb0c9f0596ef616992a248dec535c3dffc0337d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 19 Mar 2016 18:27:07 +0000 Subject: [PATCH] appliance: init: Move cmdline parsing earlier. Since commit bb5d30ab2af5720775c63179afdec3ad9efd510d, we don't require any external programs like grep to parse the command line. We only use bash intrinsics. Therefore we can do it early (but after /proc is mounted). This allows verbose mode to enable set -x early on, so we can trace most things that the init script does. (cherry picked from commit cb8f69e95929e512fcb8882ffb647dc72fc4a865) --- appliance/init | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/appliance/init b/appliance/init index 239b50e..55b1a35 100755 --- a/appliance/init +++ b/appliance/init @@ -33,9 +33,29 @@ done mkdir -p /sysroot +# Mount /proc. if [ ! -d /proc ]; then rm -f /proc; fi mkdir -p /proc mount -t proc /proc /proc + +# Parse the kernel command line early (must be after /proc is mounted). +cmdline=$(