]> Frank Brehm's Git Trees - config/bruni/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorfrank <frank@bruni.home.brehm-online.com>
Wed, 30 May 2012 16:40:44 +0000 (18:40 +0200)
committerFrank Brehm <root@bruni.home.brehm-online.com>
Wed, 30 May 2012 16:40:44 +0000 (18:40 +0200)
init.d/._cfg0000_radvd [new file with mode: 0755]

diff --git a/init.d/._cfg0000_radvd b/init.d/._cfg0000_radvd
new file mode 100755 (executable)
index 0000000..ce8c825
--- /dev/null
@@ -0,0 +1,66 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/files/radvd-1.8.5.init,v 1.1 2012/05/29 13:38:53 xmw Exp $
+
+CONFIGFILE=/etc/radvd.conf
+PIDFILE=/var/run/radvd/radvd.pid
+SYSCTL_FORWARD=net.ipv6.conf.all.forwarding
+
+extra_started_commands="reload"
+
+depend() {
+       need net
+}
+
+checkconfig() {
+       if [ ! -f "${CONFIGFILE}" ]; then
+               eerror "Configuration file ${CONFIGFILE} not found"
+               return 1
+       fi
+
+       checkpath -d -o radvd:radvd ${PIDFILE%/*}
+}
+
+start() {
+       checkconfig || return 1
+
+       if [ "${FORWARD}" != "no" ]; then
+               ebegin "Enabling IPv6 forwarding"
+               sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+               eend $?
+       fi
+
+       ebegin "Starting IPv6 Router Advertisement Daemon"
+       start-stop-daemon --start --exec /usr/sbin/radvd \
+               --pidfile "${PIDFILE}" \
+               -- -C "${CONFIGFILE}" -p "${PIDFILE}" -u radvd ${OPTIONS}
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping IPv6 Router Advertisement Daemon"
+       start-stop-daemon --stop --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+       eend $?
+
+       if [ "${FORWARD}" != "no" ]; then
+               ebegin "Disabling IPv6 forwarding"
+               sysctl -w "${SYSCTL_FORWARD}=0" > /dev/null
+               eend $?
+       fi
+}
+
+reload() {
+       checkconfig || return 1
+
+       if [ "${FORWARD}" != "no" ]; then
+               ebegin "Enabling IPv6 forwarding"
+               sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+               eend $?
+       fi
+
+       ebegin "Reloading IPv6 Router Advertisement Daemon"
+       start-stop-daemon --signal HUP \
+               --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+       eend $?
+}