diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-11-19 17:02:29 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-11-19 17:02:29 +0000 |
commit | f446390e2b4e0154095b87cb5350d7cf7ce016a3 (patch) | |
tree | a412c4192444cf3b958435e9571912f6d10a03f1 /sys-freebsd/freebsd-usbin/files | |
parent | Stable on hppa. (diff) | |
download | gentoo-2-f446390e2b4e0154095b87cb5350d7cf7ce016a3.tar.gz gentoo-2-f446390e2b4e0154095b87cb5350d7cf7ce016a3.tar.bz2 gentoo-2-f446390e2b4e0154095b87cb5350d7cf7ce016a3.zip |
Add init.d and conf.d files for reverse ARP daemon (rarpd).
(Portage version: 2.1.2_rc2)
Diffstat (limited to 'sys-freebsd/freebsd-usbin/files')
-rw-r--r-- | sys-freebsd/freebsd-usbin/files/rarpd.confd | 7 | ||||
-rw-r--r-- | sys-freebsd/freebsd-usbin/files/rarpd.initd | 32 |
2 files changed, 39 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-usbin/files/rarpd.confd b/sys-freebsd/freebsd-usbin/files/rarpd.confd new file mode 100644 index 000000000000..63c7fac4883b --- /dev/null +++ b/sys-freebsd/freebsd-usbin/files/rarpd.confd @@ -0,0 +1,7 @@ +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/rarpd.confd,v 1.1 2006/11/19 17:02:29 flameeyes Exp $ + +# Configuration file for /etc/init.d/rarpd + +# To start rarpd only for a given interface, set the +# following variable +# RARPD_ONLY_INTERFACE="rl0" 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 $? +} |