summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-02-09 16:57:13 +0000
committerRoy Marples <uberlord@gentoo.org>2007-02-09 16:57:13 +0000
commit9242c04c3cdf3c9a301d4653a15047a5c692f4c2 (patch)
treeabef934a825f165d0a1f677c7bd50e01a9c654d9 /net-misc/radvd/files
parentVersion bump (diff)
downloadgentoo-2-9242c04c3cdf3c9a301d4653a15047a5c692f4c2.tar.gz
gentoo-2-9242c04c3cdf3c9a301d4653a15047a5c692f4c2.tar.bz2
gentoo-2-9242c04c3cdf3c9a301d4653a15047a5c692f4c2.zip
Add reload option to init script, #166095 thanks to Martin von Gagern.
(Portage version: 2.1.2-r9)
Diffstat (limited to 'net-misc/radvd/files')
-rw-r--r--net-misc/radvd/files/digest-radvd-0.92
-rw-r--r--net-misc/radvd/files/digest-radvd-1.0-r13
-rw-r--r--net-misc/radvd/files/radvd.init25
3 files changed, 26 insertions, 4 deletions
diff --git a/net-misc/radvd/files/digest-radvd-0.9 b/net-misc/radvd/files/digest-radvd-0.9
index 8337ec3c177a..e3c70ca16ee9 100644
--- a/net-misc/radvd/files/digest-radvd-0.9
+++ b/net-misc/radvd/files/digest-radvd-0.9
@@ -1 +1,3 @@
MD5 128c1825975cd81168fe607e41587fbf radvd-0.9.tar.gz 104356
+RMD160 a1bc693c30d6d929dfe012a53dc22428a7022a64 radvd-0.9.tar.gz 104356
+SHA256 751fa0e5e536c1b57cc09e63440a0f01209dc4297a3c58e69058e741ef28ea15 radvd-0.9.tar.gz 104356
diff --git a/net-misc/radvd/files/digest-radvd-1.0-r1 b/net-misc/radvd/files/digest-radvd-1.0-r1
new file mode 100644
index 000000000000..4ea586cdd5d0
--- /dev/null
+++ b/net-misc/radvd/files/digest-radvd-1.0-r1
@@ -0,0 +1,3 @@
+MD5 8bce4a21757cf069f5a69e2f9bee9e5b radvd-1.0.tar.gz 110170
+RMD160 a6d5aa3fe25b7751e5b0188add1d68633b20174e radvd-1.0.tar.gz 110170
+SHA256 fbc44fac8356426c115914eb5dce6fc84afea923ad6aba1670a3402c06bda7ab radvd-1.0.tar.gz 110170
diff --git a/net-misc/radvd/files/radvd.init b/net-misc/radvd/files/radvd.init
index af2659926cb2..243c79872a26 100644
--- a/net-misc/radvd/files/radvd.init
+++ b/net-misc/radvd/files/radvd.init
@@ -1,18 +1,20 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/files/radvd.init,v 1.1 2006/07/19 13:02:36 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/files/radvd.init,v 1.2 2007/02/09 16:57:13 uberlord Exp $
CONFIGFILE=/etc/radvd.conf
PIDFILE=/var/run/radvd/radvd.pid
SYSCTL_FORWARD=net.ipv6.conf.all.forwarding
+opts="reload"
+
depend () {
need net
}
checkconfig() {
- if [ ! -f ${CONFIGFILE} ]; then
+ if [ ! -f "${CONFIGFILE}" ]; then
eerror "Configuration file ${CONFIGFILE} not found"
return 1
fi
@@ -21,7 +23,7 @@ checkconfig() {
start () {
checkconfig || return 1
- if [[ ${FORWARD} != "no" ]]; then
+ if [ "${FORWARD}" != "no" ]; then
ebegin "Enabling IPv6 forwarding"
sysctl "${SYSCTL_FORWARD}=1" >/dev/null
eend $?
@@ -39,9 +41,24 @@ stop() {
start-stop-daemon --stop --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
eend $?
- if [[ ${FORWARD} != "no" ]]; then
+ if [ "${FORWARD}" != "no" ]; then
ebegin "Disabling IPv6 forwarding"
sysctl "${SYSCTL_FORWARD}=0" > /dev/null
eend $?
fi
}
+
+reload() {
+ checkconfig || return 1
+
+ if [ "${FORWARD}" != "no" ]; then
+ ebegin "Enabling IPv6 forwarding"
+ sysctl "${SYSCTL_FORWARD}=1" >/dev/null
+ eend $?
+ fi
+
+ ebegin "Reloading IPv6 Router Advertisement Daemon"
+ start-stop-daemon --stop --signal HUP --oknodo \
+ --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+ eend $?
+}