main/devicepkg-dev: don't assume deviceinfo_chassis is set
The deviceinfo_chassis variable is not mandatory in the deviceinfo schema, so we shouldn't treat it as always being there. Signed-off-by: Stefan Hansson <newbyte@postmarketos.org> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7762>
This commit is contained in:
parent
3dfbc72312
commit
73ea3570c8
2 changed files with 6 additions and 3 deletions
|
|
@ -71,7 +71,10 @@ generate_machine_info()
|
|||
{
|
||||
local model="${deviceinfo_name#"${deviceinfo_manufacturer}" *}"
|
||||
echo "PRETTY_HOSTNAME=\"$deviceinfo_name\""
|
||||
echo "CHASSIS=\"$deviceinfo_chassis\""
|
||||
# deviceinfo_chassis is not mandatory, don't assume it to be set.
|
||||
if [ -n "${deviceinfo_chassis+set}" ]; then
|
||||
echo "CHASSIS=\"$deviceinfo_chassis\""
|
||||
fi
|
||||
echo "HARDWARE_VENDOR=\"$deviceinfo_manufacturer\""
|
||||
echo "HARDWARE_MODEL=\"$model\""
|
||||
} > "$srcdir/machine-info"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue