diff --git a/lib/bootstrap.sh b/lib/bootstrap.sh index b04ea3dd4..2969544a6 100755 --- a/lib/bootstrap.sh +++ b/lib/bootstrap.sh @@ -91,8 +91,8 @@ network_ok() for i in /sys/class/net/*/ do [ "${i#*/lo/}" != "$i" ] && continue
[ "$(cat $i/operstate)" = 'up' ] && return 0
[ "$(cat $i/carrier 2>/dev/null)" = '1' ] && return 0
[ "$(cat $i/operstate)" = 'up' ] && export_ip_mac && return 0
[ "$(cat $i/carrier 2>/dev/null)" = '1' ] && export_ip_mac && return 0
done
is_clearlinux && {
@@ -296,6 +296,8 @@ export_ip_mac() export PUB_IP=$(ifconfig $PUB_NIC | awk '/inet / {print $2}') fi
- [ -n "$PUB_NIC" ] || return 1
add pub_ip check? [ -n "$PUB_IP" ] || return 1
-------- Thanks Yu Chuan
- export PUB_MAC=$(cat /sys/class/net/$PUB_NIC/address) [ -n "$SCHED_HOST" ] && PUB_MAC=$(echo "$PUB_MAC" | tr : -)
} @@ -746,7 +748,6 @@ boot_init()
setup_network run_ntpdate
export_ip_mac
announce_bootup
-- 2.23.0