summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--setup-arch-vm6
-rwxr-xr-xviewvm4
2 files changed, 9 insertions, 1 deletions
diff --git a/setup-arch-vm b/setup-arch-vm
index 60fe8f6..dcadc9a 100644
--- a/setup-arch-vm
+++ b/setup-arch-vm
@@ -5,6 +5,7 @@ set -e
newuser="flo"
disk=/dev/vda
server=192.168.123.1
+pingcheckhost="mirror.server-speed.net"
die() {
echo "$@"
@@ -32,7 +33,10 @@ cmdline_arg() {
grep -qE '^flags\s+: .* hypervisor( |$)' /proc/cpuinfo || die "Not running in hypervisor. aborting automatic setup"
-dhcpcd eth0
+# wait for host to be reachable (including dns query)
+while ! ping -c1 -W0.3 "$pingcheckhost" >/dev/null; do
+ sleep 0.2
+done
parted -s -- $disk mklabel msdos mkpart primary 1 -0
diff --git a/viewvm b/viewvm
new file mode 100755
index 0000000..538fe85
--- /dev/null
+++ b/viewvm
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+vncviewer $(virsh vncdisplay $1) &>/dev/null &
+disown