3
NS="/etc/default/ntp-servers"
6
# get list of servers from debconf and write shared info file
8
. /usr/share/debconf/confmodule
10
db_get shared/ntp/servers && NTPSERVERS="$RET"
13
# the ntp-servers file already exists...
14
# keep any admin changes, while replacing the variable content
15
sed "s/^NTPSERVERS=\".*\"/NTPSERVERS=\"$NTPSERVERS\"/" < $NS > $NS.new &&
18
# the ntp-servers file does not yet exist, so create it
19
echo "NTPSERVERS=\"$NTPSERVERS\"" > $NS