On 2012/11/26 22:24, Christian Weisgerber wrote:
> Mark Kettenis:
>
> > I don't really see what this buys us. You still have to maintain the
> > backwards compat code. You'll end up with an inconsistent mess of
> > hostname.if and if.whatever files. And all of this to fix what exactly?
>
> To preserve my sanity every time I need to figure out how to bring
> ifconfig commands into a format that passes through the transformations
> done by the hostname.if parser.
>
> Remember how we were struggling with -autoconfprivacy a few months
> ago?
I am "mostly" happy with hostname.if, but I would find it useful
to have a nicer syntax that allows ignoring other parsing and
feeds the line directly to ifconfig <interface>. In sample config
files posted in various places I have often seen people abuse "up"
for this but that's no good, I don't want the interface up half-way
through config.
If there are no changes to the parser then I think it would help
to be explicit in the manual,
"The packed format is not compatible with the ifconfig(8)
command line format.
To pass a line directly to ifconfig and prevent it from being
interpreted as a packed format, use !ifconfig \$if <flags>."
This is one of the first things that was run into by some people
who I suggested tried bgpd, so it clearly affects people who are
familiar with networking and used to making somewhat careful
configuration changes.
I have to check both ifconfig and hostname.if manpages pretty
much every time I add an alias, as I'm not keen on running
netstart just to add an address to an existing interface (as
it wipes out existing aliases temporarily) so I need to use
both formats, and neither are particularly memorable
(I think I may change my files to "!ifconfig ..." format
now, it's ugly but it will avoid errors; not least because
then I can use /prefix notation rather than netmasks).