aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-03-10 00:39:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-03-10 00:39:55 -0300
commita5a95816d9bf218d237ca2138762fd98ea15557d (patch)
tree6f1a846f67a37383a8ee77488b2fa0fdb8788530
parentb25353e87fbf6b21ff6112f24262eb93195fd1ec (diff)
downloadkvmx-a5a95816d9bf218d237ca2138762fd98ea15557d.tar.gz
kvmx-a5a95816d9bf218d237ca2138762fd98ea15557d.tar.bz2
Provision: script params
-rwxr-xr-xkvmx2
-rwxr-xr-xprovision/desktop-basic9
-rwxr-xr-xprovision/desktop-full5
3 files changed, 14 insertions, 2 deletions
diff --git a/kvmx b/kvmx
index 5d555dc..7cfce3c 100755
--- a/kvmx
+++ b/kvmx
@@ -364,7 +364,7 @@ function kvmx_provision {
rsync -av -e "$SSH_COMMAND -o Port=$SSH" --rsync-path "sudo rsync" $ORIG/ $SSH_LOGIN@127.0.0.1:$DEST/
fi
- echo "sudo $provision_command" | kvmx_ssh
+ echo "sudo $provision_command $hostname $domain $mirror" | kvmx_ssh
}
# Print guest image file name
diff --git a/provision/desktop-basic b/provision/desktop-basic
index 8567474..5438b67 100755
--- a/provision/desktop-basic
+++ b/provision/desktop-basic
@@ -5,8 +5,17 @@
# Parameters
DIRNAME="`dirname $0`"
+BASENAME="`basename $0`"
+HOSTNAME="$1"
+DOMAIN="$2"
+MIRROR="$3"
APT_INSTALL="LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
+# Set hostname
+echo "$HOSTNAME.$DOMAIN" | sudo tee /etc/hostname > /dev/null
+echo "127.0.0.1 $HOSTNAME.$DOMAIN" | sudo tee /etc/hosts > /dev/null
+
+# Configure keyboard
cat <<-EOF | sudo tee /etc/default/keyboard > /dev/null
# KEYBOARD CONFIGURATION FILE
diff --git a/provision/desktop-full b/provision/desktop-full
index 7075b72..8c2d516 100755
--- a/provision/desktop-full
+++ b/provision/desktop-full
@@ -3,5 +3,8 @@
# Full desktop
#
+# Parameters
+APT_INSTALL="LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
+
# Install cinnamon
-sudo apt-get install -y cinnamon
+$APT_INSTALL cinnamon