From 6300998604a706d70e699f97d9ad7e8262eb0632 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 30 Mar 2007 14:57:01 +0000 Subject: [PATCH] The reload function of the init script now checks to see if the service has been started or not, erroring appropriately. Package-Manager: portage-2.1.2.3 --- net-dns/dnsmasq/ChangeLog | 6 +++++- net-dns/dnsmasq/Manifest | 16 ++++++++-------- net-dns/dnsmasq/files/dnsmasq-init | 14 ++++++++------ 3 files changed, 21 insertions(+), 15 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 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 dnsmasq-2.31.ebuild, dnsmasq-2.34.ebuild, dnsmasq-2.38.ebuild, dnsmasq-2.38-r1.ebuild: diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest index 16011aa6dafc..b094952e3ac8 100644 --- a/net-dns/dnsmasq/Manifest +++ b/net-dns/dnsmasq/Manifest @@ -2,10 +2,10 @@ AUX dnsmasq-fbsd-config.patch 451 RMD160 c9103d329ff429cdadea346db59678815fe3317 MD5 76c037c6372d10106bfaddc92bc6f898 files/dnsmasq-fbsd-config.patch 451 RMD160 c9103d329ff429cdadea346db59678815fe3317d files/dnsmasq-fbsd-config.patch 451 SHA256 8973971c4a161f48815c41045cb350394f330276085e9b8f3c578077abc0f359 files/dnsmasq-fbsd-config.patch 451 -AUX dnsmasq-init 848 RMD160 b2c81417f6599192e7040554fc151f8a5b56cfd9 SHA1 23f7ce1433afcb462d0a031e1d8fb8b4bd4f20df SHA256 e174e9e2b33544a9ff400a1f11c6a0a635e4d86afa5240f6e15d7f08220824e1 -MD5 9dbf23cb9fb84ac40ab6112056b5f0a6 files/dnsmasq-init 848 -RMD160 b2c81417f6599192e7040554fc151f8a5b56cfd9 files/dnsmasq-init 848 -SHA256 e174e9e2b33544a9ff400a1f11c6a0a635e4d86afa5240f6e15d7f08220824e1 files/dnsmasq-init 848 +AUX dnsmasq-init 896 RMD160 e17f1b5b79bdf92487cdc0fc7552feafa45c2f92 SHA1 ef8947ab5a85cbcd2eff5280b6a9e68ee9d02ac5 SHA256 66ec3ed65c32690172a11fa0c4b9ef7c8ac397a3074f42b20804ffe64c7f81ac +MD5 08ce40c718d3417696da4c724b9dd5cc files/dnsmasq-init 896 +RMD160 e17f1b5b79bdf92487cdc0fc7552feafa45c2f92 files/dnsmasq-init 896 +SHA256 66ec3ed65c32690172a11fa0c4b9ef7c8ac397a3074f42b20804ffe64c7f81ac files/dnsmasq-init 896 AUX dnsmasq.confd 140 RMD160 33f6370377b38bf33acab72d8de86cba5e197d79 SHA1 83461d2964dc3f0db777fc26141b07f6f3f5a762 SHA256 8bbc2634ab537ed3a17ee98be9c2667013a2b048f6981138017414e54fe90746 MD5 5990c2d2cb92209feacf8f3a5a7d0831 files/dnsmasq.confd 140 RMD160 33f6370377b38bf33acab72d8de86cba5e197d79 files/dnsmasq.confd 140 @@ -33,10 +33,10 @@ EBUILD dnsmasq-2.38.ebuild 1500 RMD160 cb92783097813525fd470bb54a8c379426eee0b6 MD5 c0c6aa49db5281bd87dbd24d83f1dc72 dnsmasq-2.38.ebuild 1500 RMD160 cb92783097813525fd470bb54a8c379426eee0b6 dnsmasq-2.38.ebuild 1500 SHA256 c6e195455b9167fd296bbe9af5900414fe62a78dd4d6ab05382c2a5b46b06910 dnsmasq-2.38.ebuild 1500 -MISC ChangeLog 14679 RMD160 946201bc2c6f9d5688feb26aa78bea54079404d2 SHA1 4bd0bf938afc602e82f6a6196ed83137962e487d SHA256 b2d0ac595bb3eded32dde06b53a9afa9f52e287104474c1e1b977ad1bfda9d36 -MD5 02e47f92af9b633517fec2629a2f4a7a ChangeLog 14679 -RMD160 946201bc2c6f9d5688feb26aa78bea54079404d2 ChangeLog 14679 -SHA256 b2d0ac595bb3eded32dde06b53a9afa9f52e287104474c1e1b977ad1bfda9d36 ChangeLog 14679 +MISC ChangeLog 14875 RMD160 d5f8546f7348bea087ec92f05e7e11e18f61299b SHA1 f88371ccea0b9e83466cd9d7e30c3e5d2e11fa69 SHA256 8cf9ff1cd6fcf47eebe27a8b9b0c21e651dac143b34b5cf49bf36e884565bae9 +MD5 059563f57ff18a9c1c5fb2c57baecd83 ChangeLog 14875 +RMD160 d5f8546f7348bea087ec92f05e7e11e18f61299b ChangeLog 14875 +SHA256 8cf9ff1cd6fcf47eebe27a8b9b0c21e651dac143b34b5cf49bf36e884565bae9 ChangeLog 14875 MISC metadata.xml 251 RMD160 9f6c5022895c245c7b1fdbaa24ae19cab04502c8 SHA1 4f7b27e3a8043f87fea8d4bc308e4b947f0e8675 SHA256 fd85d2faaf1d0c0eab6a4d2ab9eaa493e087a6108aafd0a5db6436bfc181783b MD5 f115572f9475ea98b22ceeb627ba07f0 metadata.xml 251 RMD160 9f6c5022895c245c7b1fdbaa24ae19cab04502c8 metadata.xml 251 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 $? -- 2.26.2