diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-21 15:19:01 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-21 15:55:50 +0200 |
commit | c54eb790633c85bc22c4328e0f035cfa0be06780 (patch) | |
tree | 9c45eba03241d7a5d04d34646f4e916b4424184f /pkgs/tools/filesystems | |
parent | 5e364503d5b219e81c54e3616e3bf8e61a2cf1c7 (diff) | |
download | nixlib-c54eb790633c85bc22c4328e0f035cfa0be06780.tar nixlib-c54eb790633c85bc22c4328e0f035cfa0be06780.tar.gz nixlib-c54eb790633c85bc22c4328e0f035cfa0be06780.tar.bz2 nixlib-c54eb790633c85bc22c4328e0f035cfa0be06780.tar.lz nixlib-c54eb790633c85bc22c4328e0f035cfa0be06780.tar.xz nixlib-c54eb790633c85bc22c4328e0f035cfa0be06780.tar.zst nixlib-c54eb790633c85bc22c4328e0f035cfa0be06780.zip |
Don't kill unionfs-fuse during shutdown
Killing the daemon backing /nix/store prevents a clean shutdown. See http://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/
Diffstat (limited to 'pkgs/tools/filesystems')
-rw-r--r-- | pkgs/tools/filesystems/unionfs-fuse/default.nix | 8 | ||||
-rw-r--r-- | pkgs/tools/filesystems/unionfs-fuse/prevent-kill-on-shutdown.patch | 14 |
2 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/unionfs-fuse/default.nix b/pkgs/tools/filesystems/unionfs-fuse/default.nix index 4da1a84e937a..bff5aaf242ba 100644 --- a/pkgs/tools/filesystems/unionfs-fuse/default.nix +++ b/pkgs/tools/filesystems/unionfs-fuse/default.nix @@ -8,6 +8,14 @@ stdenv.mkDerivation rec { sha256 = "0qpnr4czgc62vsfnmv933w62nq3xwcbnvqch72qakfgca75rsp4d"; }; + patches = + [ # Prevent the unionfs daemon from being killed during + # shutdown. See + # http://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons/ + # for details. + ./prevent-kill-on-shutdown.patch + ]; + buildInputs = [ cmake fuse ]; # Put the unionfs mount helper in place as mount.unionfs-fuse. This makes it diff --git a/pkgs/tools/filesystems/unionfs-fuse/prevent-kill-on-shutdown.patch b/pkgs/tools/filesystems/unionfs-fuse/prevent-kill-on-shutdown.patch new file mode 100644 index 000000000000..0a98b83282b6 --- /dev/null +++ b/pkgs/tools/filesystems/unionfs-fuse/prevent-kill-on-shutdown.patch @@ -0,0 +1,14 @@ +diff -ru -x '*~' unionfs-fuse-0.26-orig/src/unionfs.c unionfs-fuse-0.26/src/unionfs.c +--- unionfs-fuse-0.26-orig/src/unionfs.c 2012-09-11 00:06:32.000000000 +0200 ++++ unionfs-fuse-0.26/src/unionfs.c 2014-05-21 14:22:03.597861805 +0200 +@@ -831,6 +831,10 @@ + } + #endif + ++ /* Prevent systemd's shutdown from killing us. */ ++ if (access("/etc/initrd-release", F_OK) >= 0) ++ argv[0][0] = '@'; ++ + umask(0); + int res = fuse_main(args.argc, args.argv, &unionfs_oper, NULL); + RETURN(uopt.doexit ? uopt.retval : res); |