Files
ntp/ntp.NetworkManager
Reinhard Max 85652f99a5 Accepting request 957171 from home:JonathanKang:branches:network:time
- Modified ntp.NetworkManager: Update ntp servers on
  dhcp4-change and dhcp6-change, instead of up condition. This is
  because ntp options are available during dhcp renewed or rebound,
  and not available when the interface has been activated
  (bsc#1171547).

OBS-URL: https://build.opensuse.org/request/show/957171
OBS-URL: https://build.opensuse.org/package/show/network:time/ntp?expand=0&rev=210
2022-02-24 07:15:18 +00:00

25 lines
483 B
Bash

#! /bin/sh
#
# ntp dispatcher script for NetworkManager
#
# Dominique Leuenberger <dimstar@suse.de>
#
case "$2" in
dhcp4-change)
# Call netconfig in to reconfigure NTPd with the current time servers
netconfig modify -s NetworkManager -m ntp <<-EOT
NTPSERVERS='$DHCP4_NTP_SERVERS'
EOT
;;
dhcp6-change)
netconfig modify -s NetworkManager -m ntp <<-EOT
NTPSERVERS='$DHCP6_NTP_SERVERS'
EOT
;;
*)
exit 0
;;
esac