mktmpdir: fixed sort key
The sort key field value has been off-by-one apparently, "6" corresponds to "capacity" field of df -PT output while the "available" one was meant: Filesystem Type 1024-blocks Used Available Capacity Mounted on /dev/sda9 ext4 15350768 12799972 1747980 88% / tmpfs tmpfs 1967204 27396 1939808 2% /tmp 1 2 3 4 5 6 This lapse has been five years old, looks like it's only been masked by lower available space limit *and* filesystem ordering by type so far. It didn't hit me even now, rather inspected the code while implementing volumes-profile-starterkit...
This commit is contained in:
parent
881163dcff
commit
025e611057
@ -45,7 +45,7 @@ choose_tmpdir() {
|
||||
echo -n "$i "
|
||||
df -PT "$i" | tail -1
|
||||
done \
|
||||
| sort -unk6 \
|
||||
| sort -unk5 \
|
||||
| while read dir dev fstype size used free percent mnt; do
|
||||
check_options "$dev" "$mnt" || continue
|
||||
[ "$free" -gt "$MINSIZE" ] || continue
|
||||
|
Loading…
Reference in New Issue
Block a user