diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2007-12-18 09:54:39 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2007-12-18 09:54:39 -0800 |
commit | 527ebe536c85691d79e5d81cd4f1fae4746db8c8 (patch) | |
tree | e821f97c50066133b058f28641965c4e4e6049f1 /scripts | |
parent | 1802eb010fb9b382dde4d3e1574fd578027c7dc0 (diff) | |
parent | 44a2449730a5c379c96a486a8161daa8ebe2504f (diff) | |
download | vyatta-cfg-system-527ebe536c85691d79e5d81cd4f1fae4746db8c8.tar.gz vyatta-cfg-system-527ebe536c85691d79e5d81cd4f1fae4746db8c8.zip |
Merge branch 'master' of http://phuket.vyatta.com/vyatta-cfg-system
Diffstat (limited to 'scripts')
-rwxr-xr-x[-rw-r--r--] | scripts/vyatta_net_name | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/vyatta_net_name b/scripts/vyatta_net_name index 5cc1f4c5..43c71c1d 100644..100755 --- a/scripts/vyatta_net_name +++ b/scripts/vyatta_net_name @@ -108,7 +108,8 @@ for name_hwid in ${cfg_net_hwid[@]} ; do if [ "$hwid" == "$attr_address" ] ; then # we mod the config file interface sub-clock in case it is missing # "link-detect" - ${vyatta_sbindir}/mod_bootfile_eth_hwid $BOOTFILE $name $attr_address + [[ "$BOOTFILE" != *test_* ]] && \ + ${vyatta_sbindir}/mod_bootfile_eth_hwid $BOOTFILE $name $attr_address echo $name exit 0 fi @@ -119,18 +120,17 @@ done [ -z "$kname" ] && \ exit 1 - # have not found matching hwid in config, see if we can use kernel name if [ -z "$match" ] ; then # the kernel interface name isnot in config # so, we might as well use it name=$kname - ${vyatta_sbindir}/add_bootfile_eth_hwid $BOOTFILE $name $attr_address + cmd=add elif [ -z "${match#*=}" ] ; then # the config has this interface but the sub-block is missing the hwid # so again, we might as well use the kernel name name=$kname - ${vyatta_sbindir}/mod_bootfile_eth_hwid $BOOTFILE $name $attr_address + cmd=mod else # The device mac address is not in the config but the config # has another hwid associated with the device name. This @@ -139,9 +139,12 @@ else # Since this is non-deterministic, we make a new name. (( ethn = last_ethn + 1 )) name=eth$ethn - ${vyatta_sbindir}/add_bootfile_eth_hwid $BOOTFILE $name $attr_address + cmd=add fi +[[ "$BOOTFILE" != *test_* ]] && \ + ${vyatta_sbindir}/${cmd}_bootfile_eth_hwid $BOOTFILE $name $attr_address + echo $name # Local Variables: |