From 10ca25091c3e56ec29d6ba4f6345317e110b3053 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Sun, 22 Mar 2020 01:15:56 +0000
Subject: [PATCH] Add some final instructional comments and timezone variable

---
 arch-install.sh |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/arch-install.sh b/arch-install.sh
index 3363572..cd9d22d 100644
--- a/arch-install.sh
+++ b/arch-install.sh
@@ -1,21 +1,17 @@
 #!/bin/bash
+# Basic install script for an archlinux VM
+# To use as a basic hardware install script, remove qemu-guest-agent from pacstrap's arguments and qemu-ga from systemctl
+# Can comment out my repository if you like, I tend to use it for my VMs
 
 HOSTNAME=VM
 RPASS=root
 DISK=/dev/vda
 PARTNO=1
 LOCALE=en_US.UTF-8
+TIMEZONE=UTC # location in zoneinfo, e.g. Australia/Melbourne
 
-# Partition disk
+# Partition disk will create a new partition on the rest of the empty free space
 printf "n\np\n\n\n\nw\n" | fdisk $DISK
-#(
-#echo n # Add a new partition
-#echo p # Primary partition
-#echo   # Partition number
-#echo   # First sector (Accept default: 1)
-#echo   # Last sector (Accept default: varies)
-#echo w # Write changes
-#) | fdisk $DISK
 mkfs.ext4 "$DISK$PARTNO"
 
 # Mount and install
@@ -24,7 +20,7 @@
 genfstab -U /mnt >> /mnt/etc/fstab
 
 # Setup locale
-arch-chroot /mnt ln -sf /usr/share/zoneinfo/UTC /etc/localtime
+arch-chroot /mnt ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
 sed -i -e "s/#$LOCALE/$LOCALE/" /mnt/etc/locale.gen
 arch-chroot /mnt locale-gen
 echo "LANG=$LOCALE" > /mnt/etc/locale.conf

--
Gitblit v1.9.3