diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2016-08-05 15:05:12 +0800 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-08-08 16:39:40 +1000 |
commit | 8f0e069fc43ed6f6a230329839f970415147d1aa (patch) | |
tree | 316350e7c1f3a8200f68fa5b52aa53fe5331f140 /utils/hooks/20-set-stdout | |
parent | 0611a74491328d9ce346957c2320310a21caa8a9 (diff) | |
download | talos-petitboot-8f0e069fc43ed6f6a230329839f970415147d1aa.tar.gz talos-petitboot-8f0e069fc43ed6f6a230329839f970415147d1aa.zip |
hooks/set-stdout: move hook to after automatic stdout settingsv1.2.2
If a console is defined in NVRAM, we want it to take precedence over
anything that 30-add-offb calculates automatically. This change shifts
the 20-set-stdout script to later in the hook processing, so that it
will override any automatic settings.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'utils/hooks/20-set-stdout')
-rwxr-xr-x | utils/hooks/20-set-stdout | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/utils/hooks/20-set-stdout b/utils/hooks/20-set-stdout deleted file mode 100755 index 92ff030..0000000 --- a/utils/hooks/20-set-stdout +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -# Hook to set the linux,stdout-path property from an nvram property -# (named $nvram_prop). - -nvram_prop=petitboot,console - -# we need to be using a dtb -[ -n "$boot_dtb" ] || exit - -console=$(nvram --print-config="$nvram_prop") - -[ $? = 0 -a -n "$console" ] || exit - -dtb_in=$boot_dtb -dtb_out=$(mktemp) - -( - dtc -I dtb -O dts $dtb_in - echo '/ { chosen { linux,stdout-path = "'$console'"; }; }; ' -) | dtc -I dts -O dtb -o $dtb_out - -[ $? = 0 ] && mv $dtb_out $dtb_in |