~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

Viewing changes to debian/ntpdate.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2004-10-11 16:10:27 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041011161027-icyjbji8ujym633o
Tags: 1:4.2.0a-10ubuntu2
Use ntp.ubuntulinux.org instead of pool.ntp.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
3
 
NS="/etc/default/ntp-servers"
4
 
NTPSERVERS=""
5
 
 
6
 
# get list of servers from debconf and write shared info file
7
 
 
8
 
. /usr/share/debconf/confmodule
9
 
 
10
 
db_get shared/ntp/servers && NTPSERVERS="$RET"
11
 
 
12
 
if test -f $NS; then
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 &&
16
 
        mv $NS.new $NS
17
 
else
18
 
    # the ntp-servers file does not yet exist, so create it
19
 
    echo "NTPSERVERS=\"$NTPSERVERS\"" > $NS
20
 
fi
21
 
 
22
3
#DEBHELPER#
23
4
 
 
5
exit 0