diff options
author | zachir <zachir@librem.one> | 2023-12-11 12:41:43 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-12-11 12:41:43 -0600 |
commit | 5b1b85995adcbba2b6057d270c3637c8763eb0b3 (patch) | |
tree | 160f02e6dcf5a9a8cc3c7da584955a83321a74cc | |
parent | 32c470c815d3fe1e6bd8443c7d3fc51cc1208a1e (diff) |
dmount: Also show size of the partition when prompting to mount it.
It can be very useful to see the size of two partitions in a drive
before mounting it, to know which one to mount.
-rwxr-xr-x | dmount | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -65,9 +65,9 @@ unlock_crypto () { } -get_available () { lsblk -oPATH,FSTYPE,MOUNTPOINT | tail -n+2 | while read i; do - [ -z "$(echo "$i" | awk '{print $2}')" ] && continue - [ -n "$(echo "$i" | awk '{print $3}')" ] && continue +get_available () { lsblk -oPATH,SIZE,FSTYPE,MOUNTPOINT | tail -n+2 | while read i; do + [ -z "$(echo "$i" | awk '{print $3}')" ] && continue + [ -n "$(echo "$i" | awk '{print $4}')" ] && continue #echo "${i%% *}" #echo "$(lsblk -oMOUNTPOINT "${i%% *}" | tail -n+2 | grep -v -E '^\s*$')" [ -n "$(echo "$i" | grep -q "crypto_LUKS" && check_crypto "${i%% *}")" ] \ |