From ecd00f6f4d0381a08257671849fea5850357b5b3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 4 Jul 2024 11:56:56 +0200 Subject: global-functions: $MkDir: enable tmpfs if disabled --- global-functions.rsc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3-70-g09d2