mirror of https://github.com/apache/cloudstack.git
virtual router: edithosts.sh cleanup fails on existing hosts
The already deleted same hostname is not deleted from /etc/hosts of vRouter. vRouter's /etc/hosts format: $ip $host This patch fixes deletion logic below. sed -i /"$host "/d $HOSTS Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
988ccfc45d
commit
15704cfa6c
|
|
@ -88,7 +88,7 @@ echo "0 $mac $ip $host *" >> $DHCP_LEASES
|
|||
|
||||
#edit hosts file as well
|
||||
sed -i /"$ip "/d $HOSTS
|
||||
sed -i /"$host "/d $HOSTS
|
||||
sed -i /" $host$"/d $HOSTS
|
||||
echo "$ip $host" >> $HOSTS
|
||||
|
||||
if [ "$dflt" != "" ]
|
||||
|
|
|
|||
Loading…
Reference in New Issue