Generating ifcfg-eth0 from scratch

Alex mysqlstudent at gmail.com
Sat May 14 00:03:26 UTC 2011


Hi,

On Wed, May 11, 2011 at 10:45 AM, JB <jb.1234abcd at gmail.com> wrote:
> The results of scan for UUID:
>
> # grep -ir uuid /etc/init.d/
> /etc/init.d/messagebus:        /bin/dbus-uuidgen --ensure
>
> The above relates to machine-id.
>
> # grep -ir uuid /etc/sysconfig/
> /etc/sysconfig/network-scripts/ifup:if [ "$USE_NM" = "true" -a -n "$UUID" ];
>  then
> /etc/sysconfig/network-scripts/ifup:    nmcli con up uuid "$UUID"
> /etc/sysconfig/network-scripts/ifdown:    if [ -n "$UUID" -a -z "$DEVICE" ];
> then
> /etc/sysconfig/network-scripts/ifdown:  DEVICE=$(nmcli -t --fields uuid,devices
> con status | awk -F ':' "\$1 == \"$UUID\" { print \$2 }")
> /etc/sysconfig/network-scripts/network-functions:get_uuid_by_config ()
> /etc/sysconfig/network-scripts/network-functions:    if [ -z "$UUID" -a
> "$USE_NM" = "true" ]; then
> /etc/sysconfig/network-scripts/network-functions:
> UUID=$(get_uuid_by_config $CONFIG)
[snip..]

Yes, it does appear that much of that file is for the purpose of
NetworkManager, which I'm not using. I was just concerned about the
interfaces somehow getting switched, such as from a kernel upgrade or
some kind of module loading race.

In any case, thanks for your help, as always. It appears to be
reliable now, but I'll continue to search for possible ways to
permanently bind an IP to an interface without using NetworkManager.

Thanks,
Alex


More information about the users mailing list