create-vmachine: Set the time zone in the VM
parent
55664477e3
commit
f63f157199
|
@ -16,6 +16,7 @@ fi
|
||||||
: ${DOMXML_TMPL:=/etc/libvirt/qemu/_template.xml}
|
: ${DOMXML_TMPL:=/etc/libvirt/qemu/_template.xml}
|
||||||
: ${MOUNTPOINT:=/mnt/new_vmachine}
|
: ${MOUNTPOINT:=/mnt/new_vmachine}
|
||||||
: ${PORTAGE_PROFILE:="default/linux/amd64/13.0"}
|
: ${PORTAGE_PROFILE:="default/linux/amd64/13.0"}
|
||||||
|
: ${VM_TZ:=America/Chicago}
|
||||||
|
|
||||||
|
|
||||||
quit() {
|
quit() {
|
||||||
|
@ -95,6 +96,11 @@ tar -xjpf "${STAGE_TBZ}" -C "${MOUNTPOINT}"
|
||||||
echo "Setting hostname..."
|
echo "Setting hostname..."
|
||||||
sed -i "s/localhost/${VMNAME}/" "${MOUNTPOINT}"/etc/conf.d/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 "Configuring network..."
|
||||||
echo 'config_eth0="dhcp"' > "${MOUNTPOINT}"/etc/conf.d/net
|
echo 'config_eth0="dhcp"' > "${MOUNTPOINT}"/etc/conf.d/net
|
||||||
ln -s net.lo "${MOUNTPOINT}"/etc/init.d/net.eth0
|
ln -s net.lo "${MOUNTPOINT}"/etc/init.d/net.eth0
|
||||||
|
|
Loading…
Reference in New Issue