From 0072a39b2bc8f2712d50868a935d5a6184eebe3c Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 17 Apr 2014 13:45:46 +1000 Subject: [PATCH] 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 --- .../install.d/60-remove-cloud-image-interfaces | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces b/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces index 6d5cf730..58864e60 100755 --- a/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces +++ b/elements/dhcp-all-interfaces/install.d/60-remove-cloud-image-interfaces @@ -1,16 +1,13 @@ #!/bin/bash # Cloud images may hard code the eth0 interfaces so they -# boots w/ DHCP. +# boot with DHCP. # Fedora -IFCFG_NETSCRIPT="/etc/sysconfig/network-scripts/ifcfg-eth0" -if [ -f $IFCFG_NETSCRIPT ]; then - rm $IFCFG_NETSCRIPT -fi +rm -f /etc/sysconfig/network-scripts/ifcfg-eth0 # Ubuntu -ENI_ETH0_CFG="/etc/network/interfaces.d/eth0.cfg" -if [ -f $ENI_ETH0_CFG ]; then - rm $ENI_ETH0_CFG -fi +rm -f /etc/network/interfaces.d/eth0.cfg + +# Debian +rm -f /etc/network/interfaces.d/eth0