[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rarp

Quoting Jacob Kuntz <jake@megabite.net>:
> i'd like to see rarp support available at boot. right now there's no
> automatic way to load /etc/ethers into the rarp table automatically. for
> example, it would be nice to have a rarp=yes statement in
> /etc/network/options, a template /etc/ethers installed by default, and some
> way to call rarp -f at bootup (from init.d/networking?). what do you folks
> think?

I made a new script. I think this is a cleaner approach than
clogging networking. This way I could have a different runlevel
for RARP (and BOOTP) support.

# start/stop reverse arp server.

case "$1" in
	echo -n "Starting reverse arp daemon:"
	echo -n " rarp"
	/sbin/modprobe rarp
	/sbin/rarp -f
	echo "."
	echo -n "Stopping reverse arp daemon:"
	echo -n " rarp"
	/sbin/rmmod rarp 2>/dev/null || {
	ed -s <<'eof' | while read line; do rarp -d $line; done
r !/sbin/rarp -a
%s/ .*$//
	/sbin/rmmod rarp
	echo "."
	echo "Usage: /etc/init.d/rarp {start|stop}"
	exit 1

exit 0

Obviously, this could trivially source /etc/network/options and
check whether it was supposed to be doing this as well. BTW, the
garbage with the ed script is because it has to remove all the
lines from the rarp table before exiting.


Andrew Stribblehill
Systems programmer, IT Service, University of Durham, England

Reply to: