summaryrefslogtreecommitdiff
path: root/setup-xen-dom0.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-06-20 17:03:00 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-06-20 19:57:50 +0200
commit34d9ecbc0740216026bb3c49d958183842a9f095 (patch)
tree64b693ef2b76f740675efd17f4f08a0fc257e481 /setup-xen-dom0.in
parent70dab89b61e1e6ad9ed8b96d3c948385d1b07f53 (diff)
downloadalpine-conf-34d9ecbc0740216026bb3c49d958183842a9f095.zip
setup-xen-dom0: setup script to set up basic xen dom0
Diffstat (limited to 'setup-xen-dom0.in')
-rw-r--r--setup-xen-dom0.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/setup-xen-dom0.in b/setup-xen-dom0.in
new file mode 100644
index 0000000..a9c993a
--- /dev/null
+++ b/setup-xen-dom0.in
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# simple script to setup basic xen dom0
+
+# kernel modules
+for mod in xen_netback xen_blkback xenfs xen-platform-pci xen_wdt tun; do
+ modprobe $mod
+ grep -q -w $mod /etc/modules || echo $mod >> /etc/modules
+done
+
+# install packages
+apk add -q xen udev
+
+# setup and start services
+rc-update -q del mdev sysinit
+rc-update -q add udev sysinit
+for svc in udev-postmount xenstored xenconsoled; do
+ rc-update -q add $svc default
+done
+
+if ! rc-service -q udev status; then
+ rc-service udev start
+ rc-service udev-postmount start
+fi
+
+rc-service xenstored start
+rc-service xenconsoled start
+