On Mon, Mar 12, 2012 at 12:40 AM, Laine Stump <laine(a)laine.org> wrote:
On 03/11/2012 08:16 PM, hiren panchasara wrote:
> <start mode="none"/> or <start mode="onboot"/>
>
> How is it decided?
This is an indicator of when the interface should be started, and its
value is derived from the system config somehow. On RHEL and Fedora, for
example, the ifcfg-* file of each interface can have a line like this:
ONBOOT=yes
and another like this:
HOTPLUG=yes
In the first case, this is translated to <start mode='onboot'/>, and in
the 2nd case to <start mode='hotplug'/>.
Suse also supports those modes in a slightly different way - it has a
single config setting "STARTMODE" in its ifcfg-* files that can be set
to 'auto' ( == 'onboot'), 'manual' ( == 'none'), or
'ifplugd' (==
'hotplug')
Your other message regarding the "ifconfig_em0" setting in rc.conf led
me to look back at some old NetBSD config files, and see that on NetBSD
(at least of that vintage, which was 3.something I think) there was a
variable "net_interfaces", and another called "auto_ifconfig" in
rc.conf
- if auto_ifconfig was YES, all interfaces were started at boot time.
Otherwise, only the interfaces listed in net_interfaces were started. If
FreeBSD is similar, you could use the settings of these two variables to
determine if start mode should be none or onboot.
afaik, FreeBSD does not have any such variables. So, if for an interface,
rc.conf has "ifconfig_<interface>" entry, start mode = onboot.
(Keep in mind that for ncf_define(), you will need to edit all of
these
items in /etc/rc.conf - that's where augeas can be useful.)
that makes me wonder..even if I am printing interface desc xmls without
augeas, does it make sense to keep it around for getting values out of
rc.conf and updating it ....I will look into it.
Thanks again,
Hiren