* [gentoo-commits] gentoo-x86 commit in net-misc/radvd/files: radvd-1.9.1.init
@ 2012-06-29 8:09 99% Michael Weber (xmw)
0 siblings, 0 replies; 1+ results
From: Michael Weber (xmw) @ 2012-06-29 8:09 UTC (permalink / raw
To: gentoo-commits
xmw 12/06/29 08:09:52
Added: radvd-1.9.1.init
Log:
Version bump (thanks euscan), improve config-check in initd
(Portage version: 2.1.11.3/cvs/Linux x86_64)
Revision Changes Path
1.1 net-misc/radvd/files/radvd-1.9.1.init
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/radvd/files/radvd-1.9.1.init?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/radvd/files/radvd-1.9.1.init?rev=1.1&content-type=text/plain
Index: radvd-1.9.1.init
===================================================================
#!/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.9.1.init,v 1.1 2012/06/29 08:09:52 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
if ! /usr/sbin/radvd -c -C "${CONFIGFILE}" ; then
eerror "Configuration file ${CONFIGFILE} failed test"
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 $?
}
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-06-29 8:09 99% [gentoo-commits] gentoo-x86 commit in net-misc/radvd/files: radvd-1.9.1.init Michael Weber (xmw)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox