diff options
Diffstat (limited to 'init')
-rwxr-xr-x | init | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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 |