mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 10:43:27 +00:00
Further reducing writes on boot.. Do not copy /etc unless it changed
svn path=/nixos/trunk/; revision=17948
This commit is contained in:
parent
893f13bb14
commit
ca6f5e6cd4
@ -63,9 +63,15 @@ in
|
||||
etc = pkgs.lib.fullDepEntry ''
|
||||
# Set up the statically computed bits of /etc.
|
||||
echo "setting up /etc..."
|
||||
/etc/kill-etc || true
|
||||
${makeEtc}/bin/fill-etc
|
||||
echo "/etc is set up"
|
||||
if [ "$(readlink /etc/kill-etc)" != "${makeEtc}/bin/kill-etc" ]; then
|
||||
/etc/kill-etc || true
|
||||
${makeEtc}/bin/fill-etc
|
||||
echo -e "#! /bin/sh\n${makeEtc}/bin/kill-etc\n${makeEtc}/bin/fill-etc" > /etc/refill-etc
|
||||
chmod 0755 /etc/refill-etc
|
||||
echo "/etc is set up"
|
||||
else
|
||||
echo "/etc unchanged"
|
||||
fi
|
||||
'' [
|
||||
"systemConfig"
|
||||
"defaultPath" # path to cp, chmod, chown
|
||||
|
Loading…
Reference in New Issue
Block a user