chrony/chrony.dhclient
2014-09-11 16:17:51 +02:00

24 lines
571 B
Bash

#!/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 is-running &&
/usr/libexec/chrony-helper add-dhclient-servers &&
/usr/libexec/chrony-helper remove-dhclient-servers || :
fi
}
chrony_restore() {
if [ -f $SERVERFILE ]; then
rm -f $SERVERFILE
/usr/libexec/chrony-helper is-running &&
/usr/libexec/chrony-helper remove-dhclient-servers || :
fi
}