chiark / gitweb /
unit: support wildcards in Environment=, EnvironmentFile=
[elogind.git] / src / main.c
index 11379f6bb434f0abc33c5fca04611ac7522170e2..e10441c862d7766ea06890afd33113712ce6c1bc 100644 (file)
@@ -1033,6 +1033,8 @@ int main(int argc, char *argv[]) {
 
         program_invocation_short_name = systemd;
         prctl(PR_SET_NAME, systemd);
+        saved_argv = argv;
+        saved_argc = argc;
 
         log_show_color(isatty(STDERR_FILENO) > 0);
         log_show_location(false);
@@ -1050,11 +1052,14 @@ int main(int argc, char *argv[]) {
                 if (label_init() < 0)
                         goto finish;
 
-                if (hwclock_is_localtime()) {
+                if (hwclock_is_localtime() > 0) {
                         int min;
 
                         min = hwclock_apply_localtime_delta();
-                        log_info("Hwclock configured in localtime, applying delta of %i minutes to system time", min);
+                        if (min < 0)
+                                log_error("Failed to apply local time delta: %s", strerror(-min));
+                        else
+                                log_info("RTC configured in localtime, applying delta of %i minutes to system time.", min);
                 }
         } else {
                 arg_running_as = MANAGER_USER;