mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
hardeths: when multiple default routes are defined, only select one
This commit is contained in:
parent
a9d48dc251
commit
e37b462c42
@ -50,7 +50,7 @@ if [ -f /etc/os-release ] && (cat /etc/os-release |grep -i '^NAME=[ "]*Cumulus
|
||||
OSVER="cumulus"
|
||||
fi
|
||||
|
||||
defgw=`ip route | grep default | awk '{print $3}'`
|
||||
defgw=`ip route | grep default | awk '{print $3}' | head -n1`
|
||||
if ( pmatch $OSVER "ubuntu*" ) || (pmatch $OSVER "cumulus")
|
||||
then
|
||||
echo `hostname` >/etc/hostname
|
||||
|
Loading…
x
Reference in New Issue
Block a user