diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2024-11-01 08:56:48 -0300 | 
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2024-11-01 08:56:48 -0300 | 
| commit | 5132dfc5526f46ae3fe8daa179b3c9aeca934816 (patch) | |
| tree | 66c17f42bf61eae6dff163b1c6547a423671546f | |
| parent | 0ca354d8c921c75a2e8b350f51c4f362a93bb2b8 (diff) | |
| download | kvmx-5132dfc5526f46ae3fe8daa179b3c9aeca934816.tar.gz kvmx-5132dfc5526f46ae3fe8daa179b3c9aeca934816.tar.bz2  | |
Fix: avoid ambiguous matchings at kvmx_hostname
| -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 #######  | 
