Compare commits

...

2 Commits

Author SHA1 Message Date
poeplva
2e331edab7
Merge 5ac6bde1d1be40392793f202b6981cc02d8d61b6 into 86f05abcce1fd270032975775adb40040c746cfe 2023-08-26 14:15:18 +02:00
poeplva
5ac6bde1d1
none of the encrypted devices are listed if no drives are decrypted already
The part
```
for open in $decrypted; do
		[ "$uuid" = "$open" ] && break 1
done
```
exits with `0` if the variable `$decrypted` is empty, causing none of the encrypted devices to be put into the `$unopenedluks` variable. This commit fixes this problem.
2023-06-09 18:34:30 +03:00

View File

@ -36,7 +36,7 @@ filter() { sed "s/ /:/g" | awk -F':' '$7==""{printf "%s%s (%s) %s\n",$1,$3,$5,$6
unopenedluks="$(for drive in $allluks; do
uuid="${drive%% *}"
uuid="${uuid//-}" # This is a bashism.
for open in $decrypted; do
[ -n "$decrypted" ] && for open in $decrypted; do
[ "$uuid" = "$open" ] && break 1
done && continue 1
echo "🔒 $drive"