~ubuntu-branches/ubuntu/utopic/dnsmasq/utopic

« back to all changes in this revision

Viewing changes to debian/init

  • Committer: Package Import Robot
  • Author(s): Simon Kelley
  • Date: 2014-05-04 21:34:11 UTC
  • mfrom: (12.2.18 sid)
  • Revision ID: package-import@ubuntu.com-20140504213411-9bqskud7iayb8scv
Tags: 2.70-2
 * Ensure daemon not stared if dnsmasq package has been removed,
   even if dnsmasq-base is still installed. (closes: #746941)
 * Tidy cruft in initscript. (closes: #746940)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
        export LANG
30
30
fi
31
31
 
 
32
# /etc/dnsmasq.d/README is a non-conffile installed by the dnsmasq package.
 
33
# Should the dnsmasq package be removed, the following test ensures that
 
34
# the daemon is no longer started, even if the dnsmasq-base package is
 
35
# still in place.
 
36
test -e /etc/dnsmasq.d/README || exit 0
 
37
 
32
38
test -x $DAEMON || exit 0
33
39
 
34
40
# Provide skeleton LSB log functions for backports which don't have LSB functions.
152
158
        #   2 if daemon could not be stopped
153
159
        #   other if a failure occurred
154
160
        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile /var/run/dnsmasq/$NAME.pid --name $NAME
155
 
        RETVAL="$?"
156
 
        [ "$RETVAL" = 2 ] && return 2
157
 
        return "$RETVAL"
158
161
}
159
162
 
160
163
stop_resolvconf()