Small fixes for dhcp-all-interfaces

I3166951c6fbb2faec53ffc339edd2fd0c3512300 recently landed without two
fixes that I suggested, namely using rm -f rather than testing for
file existance, and a comment fix.

Change-Id: I68e187e20802f3482d4c524a6c435fec7526178e
This commit is contained in:
Steve Kowalik
2014-04-17 13:45:46 +10:00
parent b588e4af05
commit 0072a39b2b

View File

@@ -1,16 +1,13 @@
#!/bin/bash #!/bin/bash
# Cloud images may hard code the eth0 interfaces so they # Cloud images may hard code the eth0 interfaces so they
# boots w/ DHCP. # boot with DHCP.
# Fedora # Fedora
IFCFG_NETSCRIPT="/etc/sysconfig/network-scripts/ifcfg-eth0" rm -f /etc/sysconfig/network-scripts/ifcfg-eth0
if [ -f $IFCFG_NETSCRIPT ]; then
rm $IFCFG_NETSCRIPT
fi
# Ubuntu # Ubuntu
ENI_ETH0_CFG="/etc/network/interfaces.d/eth0.cfg" rm -f /etc/network/interfaces.d/eth0.cfg
if [ -f $ENI_ETH0_CFG ]; then
rm $ENI_ETH0_CFG # Debian
fi rm -f /etc/network/interfaces.d/eth0