From 38fea5196ff083971a15bab95e1de974fe0f821a Mon Sep 17 00:00:00 2001 From: Aloz1 Date: Sun, 15 Oct 2017 18:00:32 +1100 Subject: Fix "No devices found" error during shutdown This fixes an issue introduced by voidlinux/void-runit#75 whereby dmsetup returns "No devices found" on shutdown on systems with no encrypted volumes, which is then interpreted as integral vaules "No", "devices" and "found", resulting in Illegal number errors. --- functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions b/functions index 7f2e38c..e0c37c8 100644 --- a/functions +++ b/functions @@ -50,7 +50,7 @@ deactivate_crypt() { if [ -x /sbin/dmsetup -o -x /bin/dmsetup ]; then msg "Deactivating Crypt Volumes" for v in $(dmsetup ls --target crypt --exec "dmsetup info -c --noheadings -o open,name"); do - [ ${v%%:*} -eq 0 ] && cryptsetup close ${v##*:} + [ ${v%%:*} = "0" ] && cryptsetup close ${v##*:} done deactivate_vgs "Crypt" fi -- cgit 1.4.1