aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-01-22 13:44:57 +0100
committerGravatar Christian Hesse <mail@eworm.de>2023-01-23 16:21:30 +0100
commitf9839647d46f87a5ffef3a8410bca3ef0812c41d (patch)
treef1423d19499a0bc588b6c9234c3e63a1313a0320
parentc8dcd92e6b03af17b2585188629d3949aaf75601 (diff)
global-functions: $MkDir: catch error on creating tmpfs
-rw-r--r--global-functions8
1 files changed, 7 insertions, 1 deletions
diff --git a/global-functions b/global-functions
index e674d7d..9654824 100644
--- a/global-functions
+++ b/global-functions
@@ -574,7 +574,13 @@
:if ([ :len [ /disk/find where slot=tmpfs type=tmpfs ] ] = 0) do={
$LogPrintExit2 info $0 ("Creating disk of type tmpfs.") false;
/file/remove [ find where name="tmpfs" type="directory" ];
- [ :parse "/disk/add slot=tmpfs type=tmpfs tmpfs-max-size=([ /system/resource/get total-memory ] / 3);" ];
+ :do {
+ [ :parse "/disk/add slot=tmpfs type=tmpfs tmpfs-max-size=([ /system/resource/get total-memory ] / 3);" ];
+ $WaitForFile "tmpfs";
+ } on-error={
+ $LogPrintExit2 warning $0 ("Creating disk of type tmpfs failed!") false;
+ :set Error true;
+ }
}
:set Continue true;
}