diff options
author | Robin Gloster <mail@glob.in> | 2017-02-18 15:01:32 +0100 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2017-02-18 15:04:52 +0100 |
commit | 4e4161c21268d6952f0f0f5130414e30dcf5cd97 (patch) | |
tree | 2c7d337daa50c1ceb3b8e879648beda6867d5991 /nixos/modules/system/activation/switch-to-configuration.pl | |
parent | 17c5ca9018619d819c48e25add78f47d7d575611 (diff) | |
download | nixlib-4e4161c21268d6952f0f0f5130414e30dcf5cd97.tar nixlib-4e4161c21268d6952f0f0f5130414e30dcf5cd97.tar.gz nixlib-4e4161c21268d6952f0f0f5130414e30dcf5cd97.tar.bz2 nixlib-4e4161c21268d6952f0f0f5130414e30dcf5cd97.tar.lz nixlib-4e4161c21268d6952f0f0f5130414e30dcf5cd97.tar.xz nixlib-4e4161c21268d6952f0f0f5130414e30dcf5cd97.tar.zst nixlib-4e4161c21268d6952f0f0f5130414e30dcf5cd97.zip |
systemd: setup tmpfiles on switching configuration
This fixes systemd.tmpfiles.rules on switching configuration so that does not only get applied on a fresh boot. This e.g. fixes kubernetes.
Diffstat (limited to 'nixos/modules/system/activation/switch-to-configuration.pl')
-rw-r--r-- | nixos/modules/system/activation/switch-to-configuration.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/system/activation/switch-to-configuration.pl b/nixos/modules/system/activation/switch-to-configuration.pl index 8747c1e3d4ac..ca7932a3c5cd 100644 --- a/nixos/modules/system/activation/switch-to-configuration.pl +++ b/nixos/modules/system/activation/switch-to-configuration.pl @@ -383,6 +383,10 @@ system("@systemd@/bin/systemctl", "reset-failed"); # Make systemd reload its units. system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3; +# Set the new tmpfiles +print STDERR "setting up tmpfiles\n"; +system("@systemd@/bin/systemd-tmpfiles", "--create", "--remove", "--exclude-prefix=/dev") == 0 or $res = 3; + # Reload units that need it. This includes remounting changed mount # units. if (scalar(keys %unitsToReload) > 0) { |