From: Arne Fitzenreiter Date: Fri, 9 Aug 2019 06:02:19 +0000 (+0200) Subject: partresize: check for apu only if dmi is present X-Git-Tag: v2.23-core135^2~4 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=99f2c6951123b5d961f4af92c2d9eb188204580e partresize: check for apu only if dmi is present Signed-off-by: Arne Fitzenreiter --- diff --git a/src/initscripts/system/partresize b/src/initscripts/system/partresize index f3d8dfe20e..040c6c3690 100644 --- a/src/initscripts/system/partresize +++ b/src/initscripts/system/partresize @@ -36,12 +36,14 @@ case "${1}" in if [ ! "$(grep "console=ttyS0" /proc/cmdline)" == "" ]; then scon="on"; fi - IFS= read -r DMI_PRODUCT_NAME < /sys/class/dmi/id/product_name; - case ${DMI_PRODUCT_NAME} in - APU|apu[1-4]|PC\ Engines\ apu[1-4] ) - scon="on"; - ;; - esac + if [ -e /sys/class/dmi/id/product_name ]; then + IFS= read -r DMI_PRODUCT_NAME < /sys/class/dmi/id/product_name; + case ${DMI_PRODUCT_NAME} in + APU|apu[1-4]|PC\ Engines\ apu[1-4] ) + scon="on"; + ;; + esac + fi # Enable the serial console on all systems on Azure if running_on_azure; then