Initial commit.
This commit is contained in:
20
dhcp/dhclient.d/chrony.sh
Executable file
20
dhcp/dhclient.d/chrony.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
SERVERFILE=$SAVEDIR/chrony.servers.$interface
|
||||
|
||||
chrony_config() {
|
||||
rm -f "$SERVERFILE"
|
||||
if [ "$PEERNTP" != "no" ]; then
|
||||
for server in $new_ntp_servers; do
|
||||
echo "$server ${NTPSERVERARGS:-iburst}" >> "$SERVERFILE"
|
||||
done
|
||||
/usr/libexec/chrony-helper update-daemon || :
|
||||
fi
|
||||
}
|
||||
|
||||
chrony_restore() {
|
||||
if [ -f "$SERVERFILE" ]; then
|
||||
rm -f "$SERVERFILE"
|
||||
/usr/libexec/chrony-helper update-daemon || :
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user