blob: 690f3ab71cc300bae1b44a124430dbfd65420793 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
SERVERFILE=/var/lib/dhcp/chrony.servers.$interface
chrony_config() {
rm -f $SERVERFILE
for server in $new_ntp_servers; do
echo "$server iburst" >> $SERVERFILE
done
/usr/lib/chrony/chrony-helper update-daemon || :
}
chrony_restore() {
if [ -f $SERVERFILE ]; then
rm -f $SERVERFILE
/usr/lib/chrony/chrony-helper update-daemon || :
fi
}
case $reason in
BOUND|RENEW|REBIND|REBOOT)
chrony_config
;;
EXPIRE|FAIL|RELEASE|STOP)
chrony_restore
;;
esac
|