~ubuntu-branches/ubuntu/oneiric/ntp/oneiric

« back to all changes in this revision

Viewing changes to debian/ntp.init

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-04-08 16:24:42 UTC
  • mfrom: (34.4.5 lucid)
  • Revision ID: james.westby@ubuntu.com-20100408162442-we41i5fzehptyhvu
Tags: 1:4.2.4p8+dfsg-1ubuntu2
debian/apparmor-profile: allow reading of /var/lib/ntp/ntp.conf.dhcp
(LP: #517701)

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        fi
45
45
}
46
46
 
47
 
 
48
47
RUNASUSER=ntp
49
48
UGID=$(getent passwd $RUNASUSER | cut -f 3,4 -d:) || true
 
49
if test "$(uname -s)" = "Linux"; then
 
50
        NTPD_OPTS="$NTPD_OPTS -u $UGID"
 
51
fi
50
52
 
51
53
case $1 in
52
54
        start)
56
58
                        exit 1
57
59
                fi
58
60
                lock_ntpdate
59
 
                start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -p $PIDFILE -u $UGID $NTPD_OPTS
 
61
                start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -p $PIDFILE $NTPD_OPTS
60
62
                status=$?
61
63
                unlock_ntpdate
62
64
                log_end_msg $status