Subject: Re: rc.d script for adding static ARP entries
To: Nino Dehne <ndehne@gmail.com>
From: Geert Hendrickx <geert.hendrickx@ua.ac.be>
List: tech-pkg
Date: 06/28/2005 16:30:10
--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, Jun 28, 2005 at 03:59:59PM +0200, Nino Dehne wrote:
> Also, may I suggest "staticarp" as a name for the script and maybe
> /etc/arp.conf as a filename? There already is staticroute and route.conf,
> hence the thought.
Sure. Here's an updated script. It now requires mountcitremote, and also
NETWORKING, because the network interfaces must have their ip and netmask
assigned already, otherwise arp will not be able to figure out which
interface it should associate with each given hostname/ether_addr pair. It
must be run before SERVERS for security reasons.
Thanks again for your comments.
GH
--
:wq
--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=staticarp
#!/bin/sh
#
# $NetBSD$
#
# PROVIDE: staticarp
# REQUIRE: NETWORKING mountcritremote
# BEFORE: SERVERS
. /etc/rc.subr
name="staticarp"
rcvar="staticarp"
command="/usr/sbin/arp"
conf_file="/etc/arp.conf"
required_files="${conf_file}"
command_args="-f ${conf_file}"
stop_cmd=":"
load_rc_config $name
run_rc_command "$1"
--mP3DRpeJDSE+ciuQ--