aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-06-19 14:55:51 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-06-19 14:55:51 -0300
commitd75a748507597604e1fd7d6d03f1959ecc338bc1 (patch)
treebc760784eedc467031b66df7b3993fb9b911f587
parente165cce70ed005f5f20bb339971725da8ff74552 (diff)
downloadkvmx-d75a748507597604e1fd7d6d03f1959ecc338bc1.tar.gz
kvmx-d75a748507597604e1fd7d6d03f1959ecc338bc1.tar.bz2
Fix: defaults for hostname and domain
-rwxr-xr-xkvmx6
1 files changed, 6 insertions, 0 deletions
diff --git a/kvmx b/kvmx
index 4f0ff6e..2afc9b3 100755
--- 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