Skip to content

Commit

Permalink
Merge pull request #683 from e-minguez/ifcfg-baremetal_avoid_multiple…
Browse files Browse the repository at this point in the history
…_bootstrap

Avoid multiple BOOTPROTO=dhcp in ifcfg-baremetal
  • Loading branch information
russellb committed Jul 23, 2019
2 parents f7ce19c + 089e394 commit 71d2216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 02_configure_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if [ "$MANAGE_INT_BRIDGE" == "y" ]; then
if [ "$INT_IF" ]; then
echo -e "DEVICE=$INT_IF\nTYPE=Ethernet\nONBOOT=yes\nNM_CONTROLLED=no\nBRIDGE=baremetal" | sudo dd of=/etc/sysconfig/network-scripts/ifcfg-$INT_IF
if sudo nmap --script broadcast-dhcp-discover -e $INT_IF | grep "IP Offered" ; then
echo -e "\nBOOTPROTO=dhcp\n" | sudo tee -a /etc/sysconfig/network-scripts/ifcfg-baremetal
echo -e "\nBOOTPROTO=dhcp\n" | sudo tee -a /etc/sysconfig/network-scripts/ifcfg-$INT_IF
sudo systemctl restart network
else
sudo systemctl restart network
Expand Down

0 comments on commit 71d2216

Please sign in to comment.