Compare commits
1
Commits
792667897a
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
890b6b115b |
No files matched your search
@@ -133,7 +133,7 @@ main() {
|
|||||||
mounted=1
|
mounted=1
|
||||||
pct mount "$ctid"
|
pct mount "$ctid"
|
||||||
used=$(df -B1 --output=used "$root" | tail -n1 | tr -d ' ')
|
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
|
unmount_or_die
|
||||||
[[ $used =~ ^[0-9]+$ && $iused =~ ^[0-9]+$ ]] || die "cannot read df output"
|
[[ $used =~ ^[0-9]+$ && $iused =~ ^[0-9]+$ ]] || die "cannot read df output"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ STUBS = {
|
|||||||
"ha-manager": 'echo "${STUB_HA_OUT:-}"',
|
"ha-manager": 'echo "${STUB_HA_OUT:-}"',
|
||||||
"pvesr": 'echo "${STUB_PVESR_OUT:-}"',
|
"pvesr": 'echo "${STUB_PVESR_OUT:-}"',
|
||||||
"df": """echo "df $*" >> "$STUB_LOG"
|
"df": """echo "df $*" >> "$STUB_LOG"
|
||||||
if [[ "$*" == *-i* ]]; then echo IUsed; echo "${STUB_IUSED:-1000}"
|
# like GNU df: -i and --output cannot be combined
|
||||||
|
if [[ " $* " == *" -i "* && "$*" == *--output* ]]; then echo "df: options -i and --output are mutually exclusive" >&2; exit 1; fi
|
||||||
|
if [[ "$*" == *--output=iused* ]]; then echo IUsed; echo "${STUB_IUSED:-1000}"
|
||||||
else echo Used; echo "${STUB_USED:-1073741824}"; fi""",
|
else echo Used; echo "${STUB_USED:-1073741824}"; fi""",
|
||||||
"rsync": """echo "rsync $*" >> "$STUB_LOG"
|
"rsync": """echo "rsync $*" >> "$STUB_LOG"
|
||||||
[[ -z ${STUB_RSYNC_FAIL:-} ]]""",
|
[[ -z ${STUB_RSYNC_FAIL:-} ]]""",
|
||||||
|
|||||||
Reference in new issue
Block a user