main/devicepkg-dev: add hardware vendor & model into machine-info (MR 3950)

Soon openrc-settingsd (hostnamed) will uses these properties so the
information can be exposed to apps like GNOME Settings.

Let's also move the shellcheck comment to the outer scope, otherwise
we'd need four of these comments now, and let's not use ${} but just $.
This commit is contained in:
Luca Weiss
2023-03-14 04:44:51 +00:00
committed by Caleb Connolly
parent 6b935f02fa
commit 6460e7c967
2 changed files with 6 additions and 5 deletions
+4 -3
View File
@@ -67,11 +67,12 @@ echo_libinput_calibration()
# Generate the contents for /etc/machine-info
generate_machine_info()
{
# shellcheck disable=SC2154
{
# shellcheck disable=SC2154
echo "PRETTY_HOSTNAME=\"$deviceinfo_name\""
# shellcheck disable=SC2154
echo "CHASSIS=\"${deviceinfo_chassis}\""
echo "CHASSIS=\"$deviceinfo_chassis\""
echo "HARDWARE_VENDOR=\"$deviceinfo_manufacturer\""
echo "HARDWARE_MODEL=\"$deviceinfo_name\""
} > "$srcdir/machine-info"
}