diff options
author | Aloz1 <kno0001@gmail.com> | 2017-10-15 18:00:32 +1100 |
---|---|---|
committer | Aloz1 <kno0001@gmail.com> | 2017-10-15 21:15:21 +1100 |
commit | 38fea5196ff083971a15bab95e1de974fe0f821a (patch) | |
tree | a31828222f12108f4be510652abf12efa9bcca9e | |
parent | a943cc1971f855e5ceac49edb9428fbf3d255360 (diff) | |
download | runit-void-38fea5196ff083971a15bab95e1de974fe0f821a.tar.gz runit-void-38fea5196ff083971a15bab95e1de974fe0f821a.tar.xz runit-void-38fea5196ff083971a15bab95e1de974fe0f821a.zip |
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.
-rw-r--r-- | functions | 2 |
1 files changed, 1 insertions, 1 deletions
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 |