]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
run: recognize clock change timer properties (#42949)
authorDongShengyuan <545258830@qq.com>
Fri, 10 Jul 2026 08:35:19 +0000 (16:35 +0800)
committerGitHub <noreply@github.com>
Fri, 10 Jul 2026 08:35:19 +0000 (17:35 +0900)
--on-clock-change and --on-timezone-change are documented as shortcuts for
setting the corresponding timer properties with --timer-property=.

However, --timer-property= only treated the monotonic and calendar timer
settings as actual timer triggers. OnClockChange= and OnTimezoneChange=
were stored as timer properties, but arg_with_timer remained false and the
command was rejected as having no timer options.

Treat both properties as timer triggers too, matching the shortcut options
and the documented equivalent command line.

src/run/run.c

index 068e0cc29feafca08b3f314c54d950cff703e6be..63c0718ad94a2633bb8a23047f4a1334260eb341 100644 (file)
@@ -607,7 +607,9 @@ static int parse_argv(int argc, char *argv[]) {
                                                "OnStartupSec=",
                                                "OnUnitActiveSec=",
                                                "OnUnitInactiveSec=",
-                                               "OnCalendar=");
+                                               "OnCalendar=",
+                                               "OnClockChange=",
+                                               "OnTimezoneChange=");
                         break;
                 }