代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/rear 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/usr/share/rear/rescue/GNU/Linux/310_network_devices.sh b/usr/share/rear/rescue/GNU/Linux/310_network_devices.sh
index 6b3194bd..57e8777a 100644
--- a/usr/share/rear/rescue/GNU/Linux/310_network_devices.sh
+++ b/usr/share/rear/rescue/GNU/Linux/310_network_devices.sh
@@ -562,7 +562,12 @@ function handle_team () {
local network_interface=$1
local sysfspath=/sys/class/net/$network_interface
- if [ "$( ethtool -i $network_interface | awk '$1 == "driver:" { print $2 }' )" != "team" ] ; then
+ if has_binary ethtool ; then
+ if [ "$( ethtool -i $network_interface | awk '$1 == "driver:" { print $2 }' )" != "team" ] ; then
+ return $rc_error
+ fi
+ else
+ LogPrintError "Couldn't determine if network interface '$network_interface' is a Team, skipping."
return $rc_error
fi
@@ -854,10 +859,17 @@ function handle_physdev () {
DebugPrint "$network_interface is a physical device"
- if [ -e $sysfspath/bonding_slave/perm_hwaddr ] ; then
- mac="$( cat $sysfspath/bonding_slave/perm_hwaddr )"
- else
- mac="$( cat $sysfspath/address )" || BugError "Could not read a MAC address for '$network_interface'."
+ local mac=""
+
+ if has_binary ethtool ; then
+ mac="$( ethtool -P $network_interface 2>/dev/null | awk '{ print $NF }' )"
+ fi
+ if [ -z "$mac" ] ; then
+ if [ -e $sysfspath/bonding_slave/perm_hwaddr ] ; then
+ mac="$( cat $sysfspath/bonding_slave/perm_hwaddr )"
+ else
+ mac="$( cat $sysfspath/address )" || BugError "Could not read a MAC address for '$network_interface'."
+ fi
fi
# Skip fake interfaces without MAC address
[ "$mac" != "00:00:00:00:00:00" ] || return $rc_error
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。