* Speed up activating the configuration: don't do a find
on all of /etc, skip /etc/nixos. (Actually, the NixOS/Nixpkgs sources probably shouldn't be stored in /etc...) svn path=/nixos/trunk/; revision=11261
This commit is contained in:
parent
249fc3c135
commit
d6e1828c13
1 changed files with 3 additions and 2 deletions
|
@ -37,8 +37,9 @@ done
|
|||
|
||||
# Remove dangling symlinks that point to /etc/static. These are
|
||||
# configuration files that existed in a previous configuration but not
|
||||
# in the current one.
|
||||
for i in $(find /etc/ -type l); do
|
||||
# in the current one. For efficiency, don't look under /etc/nixos
|
||||
# (where all the NixOS sources live).
|
||||
for i in $(find /etc/ \( -path /etc/nixos -prune \) -o -type l); do
|
||||
target=$(readlink "$i")
|
||||
if test "${target:0:${#staticEtc}}" = "$staticEtc" -a ! -e "$i"; then
|
||||
rm -f "$i"
|
||||
|
|
Loading…
Reference in a new issue