aboutsummaryrefslogtreecommitdiff
path: root/kvmx-create
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-03-09 22:20:41 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-03-09 22:20:41 -0300
commit3924a146c54ebe0ca19ef1aaace05ebf043738bc (patch)
treecc6323670ff96ba8d4d850bc99b52346a64d44a3 /kvmx-create
parentb5c94b16d5228dc4dc744135ec52b81502d7f688 (diff)
downloadkvmx-3924a146c54ebe0ca19ef1aaace05ebf043738bc.tar.gz
kvmx-3924a146c54ebe0ca19ef1aaace05ebf043738bc.tar.bz2
Hostfwd and misc fixes
Diffstat (limited to 'kvmx-create')
-rwxr-xr-xkvmx-create14
1 files changed, 9 insertions, 5 deletions
diff --git a/kvmx-create b/kvmx-create
index b460705..f2709f6 100755
--- a/kvmx-create
+++ b/kvmx-create
@@ -185,7 +185,6 @@ function kvmx_create_custom {
kvmx_sudo_run mount none -t proc $WORK/proc
kvmx_sudo_run mount none -t sysfs $WORK/sys
kvmx_sudo_run mount -o bind /dev/ $WORK/dev
- echo LANG=C | $SUDO tee $WORK/etc/default/locale > /dev/null
# Hostname configuration.
echo $hostname.$domain | $SUDO tee $WORK/etc/hostname > /dev/null
@@ -201,6 +200,12 @@ function kvmx_create_custom {
# Fstab
echo "/dev/vda2 / ext4 errors=remount-ro 0 1" | $SUDO tee $WORK/etc/fstab > /dev/null
+ # Locale
+ $APT_INSTALL locales
+ echo "LANG=$LANG" | $SUDO tee $WORK/etc/default/locale > /dev/null
+ echo "$LANG UTF-8" | $SUDO tee -a $WORK/etc/locale.gen > /dev/null
+ kvmx_sudo_run chroot $WORK/ locale-gen
+
# Initial upgrade
echo "Applying initial upgrades..."
kvmx_sudo_run chroot $WORK/ apt-get update
@@ -213,7 +218,6 @@ function kvmx_create_custom {
fi
# Basic packages
- $APT_INSTALL locales
$APT_INSTALL screen cron lsb-release openssl -y
$APT_INSTALL spice-vdagent qemu-guest-agent
@@ -249,9 +253,9 @@ function kvmx_create_custom {
/usr/sbin/service spice-vdagent start
# Ensure file sharing between host and guest
-if [ ! -z "$shared_mountpoint" ]; then
- /bin/mkdir -p $shared_mountpoint
- /bin/mount -t 9p -o trans=virtio shared $shared_mountpoint -oversion=9p2000.L,posixacl,cache=loose
+if [ ! -z "$shared_folder_mountpoint" ]; then
+ /bin/mkdir -p $shared_folder_mountpoint
+ /bin/mount -t 9p -o trans=virtio shared $shared_folder_mountpoint -oversion=9p2000.L,posixacl,cache=loose
fi
exit 0