hardcode e2fsprogs, idempotent chmod, remove care condition
This commit is contained in:
parent
3877ec5b2f
commit
8f95e6f6aa
@ -19,7 +19,6 @@ let
|
|||||||
glibc # needed for getent
|
glibc # needed for getent
|
||||||
shadow
|
shadow
|
||||||
nettools # needed for hostname
|
nettools # needed for hostname
|
||||||
e2fsprogs # needed for chattr
|
|
||||||
];
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
@ -140,13 +139,13 @@ in
|
|||||||
|
|
||||||
mkdir -m 1777 -p /var/tmp
|
mkdir -m 1777 -p /var/tmp
|
||||||
|
|
||||||
|
# Empty, immutable home directory of many system accounts.
|
||||||
|
mkdir -p /var/empty
|
||||||
# Make sure it's really empty
|
# Make sure it's really empty
|
||||||
chattr -i /var/empty
|
${pkgs.e2fsprogs}/bin/chattr -i /var/empty
|
||||||
rm -rf /var/empty
|
find /var/empty -mindepth 1 -delete
|
||||||
|
chmod 0555 /var/empty
|
||||||
# Empty, read-only home directory of many system accounts.
|
${pkgs.e2fsprogs}/bin/chattr +i /var/empty
|
||||||
mkdir -m 0555 -p /var/empty
|
|
||||||
chattr +i /var/empty
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.activationScripts.usrbinenv = if config.environment.usrbinenv != null
|
system.activationScripts.usrbinenv = if config.environment.usrbinenv != null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user