Skip to content

Commit 38fea51

Browse files
committed
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.
1 parent a943cc1 commit 38fea51

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ deactivate_crypt() {
5050
if [ -x /sbin/dmsetup -o -x /bin/dmsetup ]; then
5151
msg "Deactivating Crypt Volumes"
5252
for v in $(dmsetup ls --target crypt --exec "dmsetup info -c --noheadings -o open,name"); do
53-
[ ${v%%:*} -eq 0 ] && cryptsetup close ${v##*:}
53+
[ ${v%%:*} = "0" ] && cryptsetup close ${v##*:}
5454
done
5555
deactivate_vgs "Crypt"
5656
fi

0 commit comments

Comments
 (0)