chiark / gitweb /
systemctl: try to reload daemon after enable/disable only when not running in a chroot
[elogind.git] / src / timedate / timedated.c
index f5430e9f78a76c34c7fe5fb1c28306776b1d6027..80c24eb62b029f67470ddd3f919f350711d15b44 100644 (file)
@@ -35,6 +35,8 @@
 #include "hwclock.h"
 #include "conf-files.h"
 #include "path-util.h"
+#include "fileio-label.h"
+#include "label.h"
 
 #define NULL_ADJTIME_UTC "0.0 0 0\n0\nUTC\n"
 #define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n"
@@ -269,8 +271,8 @@ static int write_data_local_rtc(void) {
                         return 0;
                 }
         }
-
-        r = write_one_line_file_atomic("/etc/adjtime", w);
+        label_init("/etc");
+        r = write_one_line_file_atomic_label("/etc/adjtime", w);
         free(w);
 
         return r;
@@ -280,7 +282,7 @@ static char** get_ntp_services(void) {
         char **r = NULL, **files, **i;
         int k;
 
-        k = conf_files_list(&files, ".list",
+        k = conf_files_list(&files, ".list", NULL,
                             "/etc/systemd/ntp-units.d",
                             "/run/systemd/ntp-units.d",
                             "/usr/local/lib/systemd/ntp-units.d",