summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2019-05-25 02:26:17 +0100
committerSteve McIntyre <steve@einval.com>2019-05-25 02:26:17 +0100
commitd86d67180264b6d3b7364d35c44f527738dc2ed6 (patch)
tree063b059aca8eede63c06bfd64486224b96e08069
parent858db3ac9b95c1d99b94192a515918ce97f29505 (diff)
downloadshim-signed-d86d67180264b6d3b7364d35c44f527738dc2ed6.tar.gz
shim-signed-d86d67180264b6d3b7364d35c44f527738dc2ed6.zip
fix error if /var/lib/dkms does not exist. Closes: #923718
-rw-r--r--debian/changelog7
-rwxr-xr-xupdate-secureboot-policy5
2 files changed, 10 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index d584194..390f19b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+shim-signed (1.31) UNRELEASED; urgency=medium
+
+ * update-secureboot-policy: fix error if /var/lib/dkms does not
+ exist. Closes: #923718
+
+ -- Steve McIntyre <93sam@debian.org> Sat, 25 May 2019 02:25:24 +0100
+
shim-signed (1.30) unstable; urgency=medium
* Force the built-using version to be 15+1533136590.3beb971-6. That
diff --git a/update-secureboot-policy b/update-secureboot-policy
index 5e7b4a8..85fc27a 100755
--- a/update-secureboot-policy
+++ b/update-secureboot-policy
@@ -142,8 +142,9 @@ elif echo "$args" | grep -qc -- '--help'; then
exit 0
fi
-if [ `find /var/lib/dkms -type d -print | wc -l ` -gt 1 ]; then
- setup_mok_validation $enable_secureboot
+if [ -d /var/lib/dkms ] &&
+ [ `find /var/lib/dkms -type d -print | wc -l ` -gt 1 ]; then
+ setup_mok_validation $enable_secureboot
else
echo "No DKMS packages installed: not changing Secure Boot validation state."
fi