From cb8f69e95929e512fcb8882ffb647dc72fc4a865 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. --- appliance/init | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/appliance/init b/appliance/init index 04afbd66f..c4cf9646f 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=$(