summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-07-19 13:02:36 +0000
committerRoy Marples <uberlord@gentoo.org>2006-07-19 13:02:36 +0000
commita7a821af6dad43c01d8dab325ac9666321fe5ce7 (patch)
tree743b4aa88698ee0f50b256817bd76d7677866fd0 /net-misc/radvd/files
parentStable on hppa. (diff)
downloadhistorical-a7a821af6dad43c01d8dab325ac9666321fe5ce7.tar.gz
historical-a7a821af6dad43c01d8dab325ac9666321fe5ce7.tar.bz2
historical-a7a821af6dad43c01d8dab325ac9666321fe5ce7.zip
Fix some potential quoting issues.
Add information to help setup radvd for grsec users. Package-Manager: portage-2.1.1_pre3-r1
Diffstat (limited to 'net-misc/radvd/files')
-rw-r--r--net-misc/radvd/files/radvd.conf11
-rw-r--r--net-misc/radvd/files/radvd.init47
2 files changed, 58 insertions, 0 deletions
diff --git a/net-misc/radvd/files/radvd.conf b/net-misc/radvd/files/radvd.conf
new file mode 100644
index 000000000000..e025c6862f67
--- /dev/null
+++ b/net-misc/radvd/files/radvd.conf
@@ -0,0 +1,11 @@
+# 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.conf,v 1.1 2006/07/19 13:02:36 uberlord Exp $
+
+# Extra options to pass to radvd
+OPTIONS=""
+
+# Set this to "no" to tell the init script NOT to set up IPv6 forwarding
+# using /proc/sys/net/ipv6/conf/all/forwarding
+# Only change this if you know what you're doing!
+FORWARD="yes"
diff --git a/net-misc/radvd/files/radvd.init b/net-misc/radvd/files/radvd.init
new file mode 100644
index 000000000000..af2659926cb2
--- /dev/null
+++ b/net-misc/radvd/files/radvd.init
@@ -0,0 +1,47 @@
+#!/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 $
+
+CONFIGFILE=/etc/radvd.conf
+PIDFILE=/var/run/radvd/radvd.pid
+SYSCTL_FORWARD=net.ipv6.conf.all.forwarding
+
+depend () {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f ${CONFIGFILE} ]; then
+ eerror "Configuration file ${CONFIGFILE} not found"
+ return 1
+ fi
+}
+
+start () {
+ checkconfig || return 1
+
+ if [[ ${FORWARD} != "no" ]]; then
+ ebegin "Enabling IPv6 forwarding"
+ sysctl "${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 "${SYSCTL_FORWARD}=0" > /dev/null
+ eend $?
+ fi
+}