]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Fix: hostname: fallback to the guest name (2)
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 19 Jun 2024 20:05:51 +0000 (17:05 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 19 Jun 2024 20:05:51 +0000 (17:05 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 5e336a94ff219764561385438b41004f300bbfe2..8071edbf414c5ad49cdcbee7560166f73f737d6d 100755 (executable)
--- 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}"