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.
This commit is contained in:
Robin Gloster 2017-02-18 15:01:32 +01:00
parent 17c5ca9018
commit 4e4161c212
No known key found for this signature in database
GPG key ID: 5E4C836C632C2882

View file

@ -383,6 +383,10 @@ system("@systemd@/bin/systemctl", "reset-failed");
# Make systemd reload its units. # Make systemd reload its units.
system("@systemd@/bin/systemctl", "daemon-reload") == 0 or $res = 3; 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 # Reload units that need it. This includes remounting changed mount
# units. # units.
if (scalar(keys %unitsToReload) > 0) { if (scalar(keys %unitsToReload) > 0) {