diff options
Diffstat (limited to 'sys-freebsd/freebsd-usbin/files/rarpd.initd')
-rw-r--r-- | sys-freebsd/freebsd-usbin/files/rarpd.initd | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-usbin/files/rarpd.initd b/sys-freebsd/freebsd-usbin/files/rarpd.initd new file mode 100644 index 000000000000..34105eb838d9 --- /dev/null +++ b/sys-freebsd/freebsd-usbin/files/rarpd.initd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/rarpd.initd,v 1.1 2006/11/19 17:02:29 flameeyes Exp $ + +depend() { + if [[ -z ${RARPD_ONLY_INTERFACE} ]]; then + need net + else + need net."${RARPD_ONLY_INTERFACE}" + fi +} + +start() { + local rarpd_opts + + if [[ -z ${RARPD_ONLY_INTERFACE} ]]; then + rarpd_opts="${rarpd_opts} -a" + else + rarpd_opts="${rarpd_opts} ${RARPD_ONLY_INTERFACE}" + fi + + ebegin "Starting reverse ARP daemon" + start-stop-daemon --start --exec /usr/sbin/rarpd -- ${rarpd_opts} + eend $? +} + +stop() { + ebegin "Stopping reverse ARP daemon" + start-stop-daemon --stop --exec /usr/sbin/rarpd -- ${rarpd_opts} + eend $? +} |