summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd/0003-Don-t-try-to-unmount-nix-or-nix-store.patch
blob: a1380a33f4585adf65b1dff7680817839a6a2d9f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 620047803b70b941606398e77f253645058007dd Mon Sep 17 00:00:00 2001
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
---
 src/shutdown/umount.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c
index 00e268855d..08f3590f2a 100644
--- 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
-- 
2.24.1