about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nitro.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nitro.c b/nitro.c
index 1f99560..14587c9 100644
--- a/nitro.c
+++ b/nitro.c
@@ -1509,6 +1509,11 @@ main(int argc, char *argv[])
 		    global_state == GLBL_WANT_REBOOT ? "reboot" : "halt");
 
 		sync();
+		if (mount("/", "/", "", MS_REMOUNT | MS_RDONLY, "") < 0)
+			prn(2, "- nitro: could not remount / read-only: errno=%d\n", errno);
+		else
+			prn(2, "- nitro: remounted / read-only\n");
+
 		sleep(1);
 
 		if (global_state == GLBL_WANT_REBOOT) {