aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-06-19 17:05:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-06-19 17:05:51 -0300
commit7e104c572a52beb67017e594c5f3b1db5d307f64 (patch)
treef7de62560eed1f452e31683616b9cd7c4cae715d
parentdaf9696753a3f15c5bd01077813b967f9c7d535a (diff)
downloadkvmx-7e104c572a52beb67017e594c5f3b1db5d307f64.tar.gz
kvmx-7e104c572a52beb67017e594c5f3b1db5d307f64.tar.bz2
Fix: hostname: fallback to the guest name (2)
-rwxr-xr-xkvmx4
1 files changed, 3 insertions, 1 deletions
diff --git a/kvmx b/kvmx
index 5e336a9..8071edb 100755
--- a/kvmx
+++ b/kvmx
@@ -126,7 +126,9 @@ function __kvmx_initialize {
source $APP_BASE/kvmxfile || exit 1
# Set hostname
- hostname="${hostname:-$VM}"
+ if [ "$hostname" == "kvmx" ] && [ "$VM" != "kvmx" ]; then
+ hostname="$VM"
+ fi
# Set domain (this is already done with the default config)
#domain="${domain:-example.org}"