Subject: Re: /etc/ifaliases, or $ifaliases_ne0
To: None <itojun@iijlab.net>
From: Luke Mewburn <lukem@goanna.cs.rmit.edu.au>
List: tech-userlevel
Date: 11/29/1999 08:26:51
itojun@iijlab.net writes:
> >it's a shame that /etc/ifaliases wasn't as flexible as the /etc/ifconfig.XXX
> >format.
> >how about supporting /etc/ifaliases.XXX, with syntax of
> >	family aliasaddress [optional parameters]
> >where optional parameters includes netmask, prefixlen, etc...
> >that doesn't help on the variable side (e.g $ifalias_XXX). however,
> >since you may have a number of aliases per interface, it would make
> >it tricky to support a variable number of args *and* multiple aliases
> >per interface in the one shell variable, so don't try and support
> >extending the $if* syntax in your rework.
> 
> 	Actually we can have "alias" configuration into /etc/ifconfig.XXX
> 	(not ifaliases.XXX) like:
> 		inet 10.0.0.1 netmask 0xffffff00 	<-- first address
> 		inet 10.0.0.2 netmask 0xffffff00 alias	<-- alias
> 	so we'd better make the use of /etc/ifaliases obsolete.

I'd forgotten about /etc/ifconfig.XXX supporting multiple lines.
That sounds like a reasonable solution.

The only problem I can see is that you probably can't do
	ifconfig XXX `cat /etc/ifconfig.XXX`
when there's multiple lines, but since multiple line support already
exists, it's not like you're breaking that behaviour...

We could continue to support /etc/ifaliases, but mention that it's
deprecated.