diff --git a/create-vmachine.sh b/create-vmachine.sh index 49c7e89..c67c4f1 100755 --- a/create-vmachine.sh +++ b/create-vmachine.sh @@ -16,6 +16,7 @@ fi : ${DOMXML_TMPL:=/etc/libvirt/qemu/_template.xml} : ${MOUNTPOINT:=/mnt/new_vmachine} : ${PORTAGE_PROFILE:="default/linux/amd64/13.0"} +: ${VM_TZ:=America/Chicago} quit() { @@ -95,6 +96,11 @@ tar -xjpf "${STAGE_TBZ}" -C "${MOUNTPOINT}" echo "Setting hostname..." sed -i "s/localhost/${VMNAME}/" "${MOUNTPOINT}"/etc/conf.d/hostname +echo "Setting time zone..." +rm -f "${MOUNTPOINT}"/etc/localtime +ln -s /usr/share/zoneinfo/${VM_TZ} "${MOUNTPOINT}"/etc/localtime +echo ${VM_TZ} > "${MOUNTPOINT}"/etc/timezone + echo "Configuring network..." echo 'config_eth0="dhcp"' > "${MOUNTPOINT}"/etc/conf.d/net ln -s net.lo "${MOUNTPOINT}"/etc/init.d/net.eth0