Subject: Re: $ifaliases_* vs p2p interfaces
To: None <tech-net@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 02/11/2000 02:15:00
>> ifconfig sl0 216.46.5.9 216.46.5.8 netmask 255.255.255.255 -link0 -link1 -link2 mtu 1500 up
>> ifconfig sl0 alias 132.206.78.33 132.206.78.32 netmask 255.255.255.255
>> but there's nothing I can put in ifaliases_sl0 that will get that
>> alias configuration done right!

> ifconfig_sl0 can take multiple lines.  it's noted in in
> /etc/netstart.

That agrees with neither /etc/netstart on the target system nor
/etc/netstart in my most recently supped source tree (which since the
last run succeeded means less than a day old).

Are you perhaps thinking of /etc/ifconfig.sl0, which *does* act as you
describe?  I am specifically trying to keep my configuration in one
place (/etc/rc.conf.local) as much as possible.

Since I'm writing anyway, here are the patches I've added.

--- OLD/etc/netstart	Thu Jan  1 00:00:00 1970
+++ NEW/etc/netstart	Thu Jan  1 00:00:00 1970
@@ -138,6 +138,17 @@
 			route add $addr 127.0.0.1
 		done
 	fi
+	num=1
+	while :; do
+		eval `echo 'args=$ifalias_'$int'_'$num`
+		if [ -n "$args" ]; then
+			ifconfig $int alias $args
+			echo -n " $int"_"$num"
+			num=$(($num+1))
+		else
+			break
+		fi
+	done
 done
 
 # /etc/ifaliases, if it exists, contains the names of additional IP

"Works for me."  You may want to remove the echo command at the
innermost nesting level.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B