[netcf-devel] How to determine "start mode"?

Laine Stump laine at laine.org
Mon Mar 12 07:40:37 UTC 2012


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.

(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.)


More information about the netcf-devel mailing list