mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
Modify hardeths portscripts for Cumulus Linux Switch OS
This commit is contained in:
parent
f59354c65e
commit
3e32b3be3c
@ -106,7 +106,21 @@ for nic in `ip link |grep "BROADCAST" |awk '{print $2}' | sed s/://`; do
|
||||
gateway_line=""
|
||||
fi
|
||||
# add info to interfaces file on ubuntu, TBD does unbuntu change to systemd, this will not exist
|
||||
cat >>/etc/network/interfaces <<EOF
|
||||
if ( pmatch $OSVER "cumulus" )
|
||||
then
|
||||
cat >>/etc/network/interfaces <<EOF
|
||||
source /etc/network/interfaces.d/*.intf
|
||||
auto $nic
|
||||
iface $nic inet static
|
||||
address $IPADDR
|
||||
netmask $NETMASK
|
||||
broadcast $BROADCAST
|
||||
$gateway_line
|
||||
|
||||
|
||||
EOF
|
||||
else
|
||||
cat >>/etc/network/interfaces <<EOF
|
||||
auto $nic
|
||||
iface $nic inet static
|
||||
address $IPADDR
|
||||
@ -117,6 +131,8 @@ iface $nic inet static
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
fi
|
||||
# not ubuntu
|
||||
else
|
||||
if [ -f ${NICFILEPRE}${nic} ]
|
||||
|
Loading…
x
Reference in New Issue
Block a user