Skip to content

Commit

Permalink
Don't try to unmount /nix or /nix/store
Browse files Browse the repository at this point in the history
33f4586 wasn't enough.
  • Loading branch information
edolstra authored and wkennington committed Nov 4, 2016
1 parent 6ee3d20 commit c9411a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ static int mount_add_quota_links(Mount *m) {
static bool should_umount(Mount *m) {
MountParameters *p;

if (PATH_IN_SET(m->where, "/", "/usr") ||
if (PATH_IN_SET(m->where, "/", "/nix", "/nix/store") ||
path_startswith(m->where, "/run/initramfs"))
return false;

Expand Down Expand Up @@ -421,7 +421,7 @@ static int mount_add_default_dependencies(Mount *m) {
* Also, don't bother with anything mounted below virtual
* file systems, it's also going to be virtual, and hence
* not worth the effort. */
if (PATH_IN_SET(m->where, "/", "/usr") ||
if (PATH_IN_SET(m->where, "/", "/nix", "/nix/store") ||
path_startswith(m->where, "/run/initramfs") ||
path_startswith(m->where, "/proc") ||
path_startswith(m->where, "/sys") ||
Expand Down

0 comments on commit c9411a2

Please sign in to comment.