aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rwxr-xr-xinit14
1 files changed, 10 insertions, 4 deletions
diff --git a/init b/init
index 64016a1..89191de 100755
--- a/init
+++ b/init
@@ -88,13 +88,19 @@ readarray -t cmdline < <(cat /proc/cmdline | \
#
info "command line:"
for v in "${cmdline[@]}"; do
- var="$(sed -r -n -e 's/^buildos\.([^=]+)=.*$/\1/p' <<<"$v")" # Extract name.
+ var="$(sed -n -re 's/^buildos\.([^=]+)=.*$/\1/p' <<<"$v")" # Extract name.
if [ -n "$var" ]; then
- val="$(sed -r -e 's/^[^=]+=(.*)$/\1/' <<<"$v")" # Extract value.
- val="$(sed -r -e "s/^('(.*)'|\"(.*)\")$/\2\3/" <<<"$val")" # Strip quoted.
+ val="$(sed -re 's/^[^=]+=(.*)$/\1/' <<<"$v")" # Extract value.
+ val="$(sed -re "s/^('(.*)'|\"(.*)\")$/\2\3/" <<<"$val")" # Strip quoted.
info " $var=$val"
- declare "$var=$val"
+
+ # If the variable contains a dot, then it is a toolchain variable and we
+ # don't care about those in init.
+ #
+ if [[ "$var" != *.* ]]; then
+ declare "$var=$val"
+ fi
fi
done