diff options
-rwxr-xr-x | kvmx | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -897,8 +897,8 @@ function kvmx_hostname { # Remove old hostname from hosts file if [ "\$OLD_HOST" != "$hostname.$domain" ]; then - if grep -q \$OLD_HOST /etc/hosts; then - sudo sed -i -e "/\$OLD_HOST/d" /etc/hosts 2> /dev/null + if grep -q " \$OLD_HOST "/etc/hosts; then + sudo sed -i -e "/ \$OLD_HOST /d" /etc/hosts 2> /dev/null fi fi ##### END REMOTE SCRIPT ####### |