]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Fix: defaults for hostname and domain
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 19 Jun 2024 17:55:51 +0000 (14:55 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 19 Jun 2024 17:55:51 +0000 (14:55 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 4f0ff6e71e831588b72b69a8dfb2c223a1148927..2afc9b3c9c2ccc076140e8e279fcda2b0e7a5ee2 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -127,6 +127,12 @@ function __kvmx_initialize {
     source $GLOBAL_USER_CONFIG_FILE
   fi
 
+  # Set hostname
+  hostname="${hostname:-$VM}"
+
+  # Set domain
+  domain="${domain:-example.org}"
+
   # Load and check guest config
   if [ "$ACTION" != "ls" ] && [ "$ACTION" != "edit" ] && [ "$ACTION" != "usage" ]; then
     if [ ! -e "$GLOBAL_USER_CONFIG_FOLDER/$VM" ]; then