Re: assignment of eth* devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-02-07 at 11:59 -0800, Rick Stevens wrote:
> Sameer Kamat wrote:
> > I believe the HWADDR assigns a particular MAC address to the card, if I 
> > not wrong.
> > I do not know an easy way for it to decide to load the device based on 
> > the mac addr ?
> 
> I believe it'll force the mapping.  Here's the relevant part of the
> /etc/sysconfig/network-scripts/ifup script (reformatted to fit):
> 
> # remap, if the device is bound with a MAC address and not the right
> # device num.
> # bail out, if the MAC does not fit
> if [ -n "${HWADDR}" ]; then     FOUNDMACADDR=`get_hwaddr ${REALDEVICE}`
>      if [ "${FOUNDMACADDR}" != "${HWADDR}" ]; then
>          curdev=`ip -o link | awk -F ':' -vIGNORECASE=1 '/$HWADDR/ { 
> print $2 }'`        rename_device "${REALDEVICE}" "${HWADDR}" 
> "${curdev}" || {
>              echo $"Device ${DEVICE} has different MAC address than 
> expected, ignoring."
>              exit 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ignores error, fails to configure, and bails out with false.
"exit 0" would indicate success.

>          }
>      fi
> fi
> 
> ----------------------------------------------------------------------
> - Rick Stevens, Senior Systems Engineer     rstevens@xxxxxxxxxxxxxxx -
> - VitalStream, Inc.                       http://www.vitalstream.com -
> -                                                                    -
> -              Where there's a will, I want to be in it.             -
> ----------------------------------------------------------------------
> 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux