diff options
author | Roy Marples <uberlord@gentoo.org> | 2007-03-30 14:57:01 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2007-03-30 14:57:01 +0000 |
commit | 60e14fbf898427dd97a22ddb2015dd0ecb9068b9 (patch) | |
tree | dd54fc1238096835778bc11c22f22bd998f9a607 /net-dns | |
parent | Version bump (diff) | |
download | gentoo-2-60e14fbf898427dd97a22ddb2015dd0ecb9068b9.tar.gz gentoo-2-60e14fbf898427dd97a22ddb2015dd0ecb9068b9.tar.bz2 gentoo-2-60e14fbf898427dd97a22ddb2015dd0ecb9068b9.zip |
The reload function of the init script now checks to see if the service has been started or not, erroring appropriately.
(Portage version: 2.1.2.3)
Diffstat (limited to 'net-dns')
-rw-r--r-- | net-dns/dnsmasq/ChangeLog | 6 | ||||
-rw-r--r-- | net-dns/dnsmasq/files/dnsmasq-init | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/net-dns/dnsmasq/ChangeLog b/net-dns/dnsmasq/ChangeLog index 43f789aea3a9..a9062ede9ab3 100644 --- a/net-dns/dnsmasq/ChangeLog +++ b/net-dns/dnsmasq/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-dns/dnsmasq # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/ChangeLog,v 1.118 2007/03/26 07:51:13 antarus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/ChangeLog,v 1.119 2007/03/30 14:57:01 uberlord Exp $ + + 30 Mar 2007; Roy Marples <uberlord@gentoo.org> files/dnsmasq-init: + The reload function of the init script now checks to see if the service has + been started or not, erroring appropriately. 26 Mar 2007; Alec Warner <antarus@gentoo.org> dnsmasq-2.31.ebuild, dnsmasq-2.34.ebuild, dnsmasq-2.38.ebuild, dnsmasq-2.38-r1.ebuild: diff --git a/net-dns/dnsmasq/files/dnsmasq-init b/net-dns/dnsmasq/files/dnsmasq-init index 91c1211a65b1..b9d0034e1d82 100644 --- a/net-dns/dnsmasq/files/dnsmasq-init +++ b/net-dns/dnsmasq/files/dnsmasq-init @@ -1,19 +1,17 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/files/dnsmasq-init,v 1.11 2007/03/23 15:14:18 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/dnsmasq/files/dnsmasq-init,v 1.12 2007/03/30 14:57:01 uberlord Exp $ opts="reload" depend() { provide dns need net - # Comment out dbus until dbus doesn't dep on dns - #use dbus } start() { - ebegin "Starting dnsmasq" + ebegin "Starting ${SVCNAME}" start-stop-daemon --start --exec /usr/sbin/dnsmasq \ --pidfile /var/run/dnsmasq.pid \ -- -x /var/run/dnsmasq.pid ${DNSMASQ_OPTS} @@ -21,14 +19,18 @@ start() { } stop() { - ebegin "Stopping dnsmasq" + ebegin "Stopping ${SVCNAME}" start-stop-daemon --stop --exec /usr/sbin/dnsmasq \ --pidfile /var/run/dnsmasq.pid eend $? } reload() { - ebegin "Reloading dnsmasq" + ebegin "Reloading ${SVCNAME}" + if ! service_started "${SVCNAME}" ; then + eend 1 "${SVCNAME} is not started" + return 1 + fi start-stop-daemon --stop --oknodo --signal HUP \ --exec /usr/sbin/dnsmasq --pidfile /var/run/dnsmasq.pid eend $? |