coco at executive-computing.de
Mon Nov 7 00:26:01 UTC 2011
On Sun, 6 Nov 2011, Moritz Wilhelmy wrote:
> according to the rc.conf(5) manual page, the
> ifconfig_<interface>_alias_<n> mechanism has been deprecated:
> And so on. For each ifconfig_<interface>_alias<n> entry that
> is found, its contents are passed to ifconfig(8).
> Execution stops at the first unsuccessful access, so if
> something like this is present:
> ifconfig_ed0_alias0="inet 127.0.0.251 netmask 0xffffffff"
> ifconfig_ed0_alias1="inet 127.0.0.252 netmask 0xffffffff"
> ifconfig_ed0_alias2="inet 127.0.0.253 netmask 0xffffffff"
> ifconfig_ed0_alias4="inet 127.0.0.254 netmask 0xffffffff"
> Then note that alias4 would not be added since the search
> would stop with the missing `alias3'' entry. Due to this
> difficult to manage behavior, the
> ifconfig_<interface>_alias<n> form is deprecated.
> I can't see any further hints by what it has been deprecated, and the
> net is full of examples using this mechanism. Can someone point me to
> whereever some equivalent functionality has been implemented? Should I
> file a PR, or am I just being blind? (Machine is running 9.1-RC1, maybe
> it has been deprecated after 8)
I'd say there isn't one. You're expected to use /etc/start_if.<interface>, accordingly.
The next paragraph in the rc.conf(5) man page states:
If the /etc/start_if.<interface> file is present, it is read
and executed by the sh(1) interpreter before configuring the
interface as specified in the ifconfig_<interface> and
The wording might be a bit misleading here. Actually, there's no need to have any ifconfig_* statements in rc.conf, unless you need or want to make use of the facilties provided by network startup scripts.
Just drop any ifconfig and possibly other shell commands to configure the interface in question into /etc/start_if.<interface>.
Maybe opening a PR, asking for different wording or an additional paragraph is a good idea, nonetheless.
More information about the freebsd-questions