/var/empty: silently ignore errors (if on tmpfs) #18781

This commit is contained in:
Domen Kožar 2016-09-21 10:29:04 +02:00
parent dfadfdd018
commit 80437576f9

View File

@ -142,10 +142,10 @@ in
# Empty, immutable home directory of many system accounts.
mkdir -p /var/empty
# Make sure it's really empty
${pkgs.e2fsprogs}/bin/chattr -i /var/empty
${pkgs.e2fsprogs}/bin/chattr -f -i /var/empty || true
find /var/empty -mindepth 1 -delete
chmod 0555 /var/empty
${pkgs.e2fsprogs}/bin/chattr +i /var/empty
${pkgs.e2fsprogs}/bin/chattr -f +i /var/empty || true
'';
system.activationScripts.usrbinenv = if config.environment.usrbinenv != null