Merge pull request #22941 from mayflower/systemd-tmpfiles

systemd: setup tmpfiles on switching configuration
This commit is contained in:
Robin Gloster 2017-02-20 23:14:31 +01:00 committed by GitHub
commit 2f8aaf0c0a

View file

@ -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) {