Unverified Commit 11ca1b2e authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Check DMI is available (#731)

parent 7c726f12
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -115,6 +115,9 @@ else
fi

SM_BIOS=""

if [ -s "/sys/class/dmi/id/product_serial" ]; then

  BIOS_SERIAL=$(</sys/class/dmi/id/product_serial)
  BIOS_SERIAL="${BIOS_SERIAL//[![:alnum:]]/}"

@@ -122,6 +125,8 @@ if [ -n "$BIOS_SERIAL" ]; then
    SM_BIOS="-smbios type=1,serial=$BIOS_SERIAL"
  fi

fi

if [[ "$TPM" == [Yy1]* ]]; then

  rm -f /var/run/tpm.pid