diff options
author | 2024-07-04 11:56:56 +0200 | |
---|---|---|
committer | 2024-07-04 11:56:56 +0200 | |
commit | ecd00f6f4d0381a08257671849fea5850357b5b3 (patch) | |
tree | 39bcdb3a43c22cea9952242c34fbc823e70dbf05 | |
parent | da035b8ab3a8065a5d5690d7dbe13cde05ebb19d (diff) |
global-functions: $MkDir: enable tmpfs if disabled
-rw-r--r-- | global-functions.rsc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/global-functions.rsc b/global-functions.rsc index 121c5ec..eb49a3b 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -829,7 +829,13 @@ :global LogPrint; :global WaitForFile; - :if ([ :len [ /disk/find where slot=tmpfs type=tmpfs ] ] = 1) do={ + :if ([ :len [ /disk/find where slot=tmpfs type=tmpfs disabled=no ] ] = 1) do={ + :return true; + } + + :if ([ :len [ /disk/find where slot=tmpfs type=tmpfs disabled=yes ] ] = 1) do={ + $LogPrint info $0 ("The tmpfs is disabled, enabling."); + /disk/enable [ /disk/find where slot=tmpfs type=tmpfs disabled=yes ]; :return true; } |