2020-03-07 21:31:45 +00:00
|
|
|
From fd9c882581877eef8ba1b34a9502a1ff546b3833 Mon Sep 17 00:00:00 2001
|
2020-01-26 13:56:41 +00:00
|
|
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
|
|
|
Date: Fri, 12 Apr 2013 13:16:57 +0200
|
|
|
|
Subject: [PATCH 03/27] Don't try to unmount /nix or /nix/store
|
|
|
|
|
|
|
|
They'll still be remounted read-only.
|
|
|
|
|
|
|
|
https://github.com/NixOS/nixos/issues/126
|
|
|
|
---
|
2020-03-07 21:31:45 +00:00
|
|
|
src/core/mount.c | 4 +++-
|
2020-01-26 13:56:41 +00:00
|
|
|
src/shutdown/umount.c | 2 ++
|
2020-03-07 21:31:45 +00:00
|
|
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
2020-01-26 13:56:41 +00:00
|
|
|
|
2020-03-07 21:31:45 +00:00
|
|
|
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
|
|
index eef362f0c8..600393ffc1 100644
|
|
|
|
--- a/src/core/mount.c
|
|
|
|
+++ b/src/core/mount.c
|
|
|
|
@@ -409,7 +409,9 @@ static bool mount_is_extrinsic(Mount *m) {
|
|
|
|
|
|
|
|
if (PATH_IN_SET(m->where, /* Don't bother with the OS data itself */
|
|
|
|
"/",
|
|
|
|
- "/usr"))
|
|
|
|
+ "/usr",
|
|
|
|
+ "/nix/",
|
|
|
|
+ "/nix/store"))
|
|
|
|
return true;
|
|
|
|
|
|
|
|
if (PATH_STARTSWITH_SET(m->where,
|
2020-01-26 13:56:41 +00:00
|
|
|
diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
|
2020-03-07 21:31:45 +00:00
|
|
|
index 2d07d3d6c1..8b112f464e 100644
|
2020-01-26 13:56:41 +00:00
|
|
|
--- a/src/shutdown/umount.c
|
|
|
|
+++ b/src/shutdown/umount.c
|
|
|
|
@@ -373,6 +373,8 @@ static int delete_dm(dev_t devnum) {
|
|
|
|
|
|
|
|
static bool nonunmountable_path(const char *path) {
|
|
|
|
return path_equal(path, "/")
|
|
|
|
+ || path_equal(path, "/nix")
|
|
|
|
+ || path_equal(path, "/nix/store")
|
|
|
|
#if ! HAVE_SPLIT_USR
|
|
|
|
|| path_equal(path, "/usr")
|
|
|
|
#endif
|
|
|
|
--
|
2020-03-07 21:31:45 +00:00
|
|
|
2.25.1
|
2020-01-26 13:56:41 +00:00
|
|
|
|