Subject: Re: $ifaliases_* vs p2p interfaces
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 02/11/2000 02:15:00
>> ifconfig sl0 netmask -link0 -link1 -link2 mtu 1500 up
>> ifconfig sl0 alias netmask
>> 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
+	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
 # /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

		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B