Merge pull request #29949 from mrc0mmand/even-more-ntp-followups

busctl: send READY=1 when we become a monitor
This commit is contained in:
Yu Watanabe 2023-11-09 15:08:31 +09:00 committed by GitHub
commit 0bc649d6b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -1311,6 +1311,8 @@ static int monitor(int argc, char **argv, int (*dump)(sd_bus_message *m, FILE *f
if (!arg_quiet && arg_json_format_flags == JSON_FORMAT_OFF)
log_info("Monitoring bus message stream.");
(void) sd_notify(/* unset_environment=false */ false, "READY=1");
for (;;) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;

View File

@ -263,8 +263,8 @@ EOF
systemctl daemon-reload
fi
systemd-run --unit busctl-monitor.service --service-type=exec \
busctl monitor --json=short --match="type='signal',sender=org.freedesktop.timedate1,member='PropertiesChanged',path=/org/freedesktop/timedate1"
systemd-run --unit busctl-monitor.service --service-type=notify \
busctl monitor --json=short --match="type=signal,sender=org.freedesktop.timedate1,member=PropertiesChanged,path=/org/freedesktop/timedate1"
: 'Disable NTP'
timedatectl set-ntp false
@ -357,8 +357,8 @@ EOF
systemctl restart systemd-networkd
networkctl status ntp99
systemd-run --unit busctl-monitor.service --service-type=exec \
busctl monitor --json=short --match="type='signal',sender=org.freedesktop.timesync1,member='PropertiesChanged',path=/org/freedesktop/timesync1"
systemd-run --unit busctl-monitor.service --service-type=notify \
busctl monitor --json=short --match="type=signal,sender=org.freedesktop.timesync1,member=PropertiesChanged,path=/org/freedesktop/timesync1"
# LinkNTPServers
#