GNU df refuses -i together with --output, so the script stopped right
after mounting the container ("options -i and --output are mutually
exclusive"). The iused field needs no -i: use df --output=iused.
The df stub in the tests accepted the combination and hid the bug; it now
rejects it the way GNU df does.
Generated with AI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
792667897a
commit
890b6b115b
2 files changed
+4
-2
No files matched your search
@@ -133,7 +133,7 @@ main() {
|
||||
mounted=1
|
||||
pct mount "$ctid"
|
||||
used=$(df -B1 --output=used "$root" | tail -n1 | tr -d ' ')
|
||||
iused=$(df -i --output=iused "$root" | tail -n1 | tr -d ' ')
|
||||
iused=$(df --output=iused "$root" | tail -n1 | tr -d ' ')
|
||||
unmount_or_die
|
||||
[[ $used =~ ^[0-9]+$ && $iused =~ ^[0-9]+$ ]] || die "cannot read df output"
|
||||
|
||||
|
||||
Reference in new issue
Block a user