mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 12:13:33 +08:00
Merge pull request #29949 from mrc0mmand/even-more-ntp-followups
busctl: send READY=1 when we become a monitor
This commit is contained in:
commit
0bc649d6b0
@ -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;
|
||||
|
||||
|
@ -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
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user