From 3924a146c54ebe0ca19ef1aaace05ebf043738bc Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 9 Mar 2017 22:20:41 -0300 Subject: Hostfwd and misc fixes --- kvmx-create | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'kvmx-create') 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 -- cgit v1.2.3