Skip to content

Commit bf6d7da

Browse files
committed
runvm-osbuild: update periodic fs usage check
This ensures the ./cache directory exists before running df against it. This shouldn't happen, but in the case where we run outside of supermin it can happen and we might as well be a little less fragile here.
1 parent eae0017 commit bf6d7da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/runvm-osbuild

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ log_disk_usage(){
3737
# 10 seconds.
3838
yellow="\033[33m"; default="\033[39m"
3939
(while true; do
40-
echo -e "$yellow"; df -kh ./cache; echo -e "$default";
4140
sleep 10;
41+
test -e ./cache || continue
42+
echo -e "$yellow"; df -kh ./cache; echo -e "$default";
4243
pgrep --exact osbuild >/dev/null || break;
4344
done) &
4445
}

0 commit comments

Comments
 (0)