1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00
nixpkgs/nixos
Alexey Shmalko fe9cabedf0
etc: remove obsolete directories
This patch adds handling of a directory becoming a symlink in
/etc. Before this patch, the directory wasn't removed and then
symlinking failed, which caused directory not being updated at all.

The idea for the patch goes to @abbradar at
https://github.com/NixOS/nixpkgs/issues/16978#issuecomment-232921903:
> A heuristic idea for this -- a function `isStatic :: Path -> Bool`:
>
> * if path `/etc/foo` is a file, return True iff it's a symlink to `/etc/static/foo`.
> * if path is a directory, return True iff for all items in it `isStatic` is True.
>
> On any conflicts, if old path is static, it's safe to replace and/or
> delete stale. Otherwise make a backup and notify the user via a
> journal entry and console output.

The only difference here -- it will not replace user configs.

This also fixes https://github.com/NixOS/nixpkgs/issues/16978.
2016-07-25 15:50:53 +03:00
..
doc/manual Add some more info to the nixos-version manpage 2016-07-15 12:02:39 +02:00
lib nixos: throw an error on invalid shell package 2016-07-04 15:12:27 +01:00
maintainers Add AMIs in ap-northeast-2 and ap-south-1 2016-07-12 17:26:25 +02:00
modules etc: remove obsolete directories 2016-07-25 15:50:53 +03:00
tests nixos/tests/installer: Fix matching LUKS prompt 2016-07-17 11:20:25 +02:00
COPYING
default.nix nix: Add a "dev" output 2016-04-18 21:13:18 +02:00
README
release-combined.nix ecryptfs: add test to release-combined.nix 2016-07-14 11:52:50 +02:00
release-small.nix containers: test imperative and ipv4 in small-release (#15015) 2016-04-26 22:38:47 +02:00
release.nix ecryptfs: add test to release (#16910) 2016-07-13 14:57:13 +02:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.