Commit 34d9ecbc authored by Natanael Copa's avatar Natanael Copa

setup-xen-dom0: setup script to set up basic xen dom0

parent 70dab89b
...@@ -27,6 +27,7 @@ SBIN_FILES := lbu\ ...@@ -27,6 +27,7 @@ SBIN_FILES := lbu\
setup-proxy\ setup-proxy\
setup-sshd\ setup-sshd\
setup-timezone\ setup-timezone\
setup-xen-dom0\
setup-xorg-base\ setup-xorg-base\
update-conf update-conf
......
...@@ -48,6 +48,12 @@ while getopts "af:c:hq" opt ; do ...@@ -48,6 +48,12 @@ while getopts "af:c:hq" opt ; do
done done
shift `expr $OPTIND - 1` shift `expr $OPTIND - 1`
# mount xenfs so we can detect xen dom0
if [ "$(rc --sys)" = "XENU" ] && ! grep -q '^xenfs' /proc/mounts; then
modprobe xenfs
mount -t xenfs xenfs /proc/xen
fi
if [ "$USEANSWERFILE" != "" ]; then if [ "$USEANSWERFILE" != "" ]; then
if [ -e "$USEANSWERFILE" ]; then if [ -e "$USEANSWERFILE" ]; then
. "$USEANSWERFILE" . "$USEANSWERFILE"
...@@ -178,6 +184,10 @@ if ! is_qemu; then ...@@ -178,6 +184,10 @@ if ! is_qemu; then
$PREFIX/sbin/setup-ntp ${NTPOPTS} $PREFIX/sbin/setup-ntp ${NTPOPTS}
fi fi
if is_xen_dom0; then
setup-xen-dom0
fi
DEFAULT_DISK=none \ DEFAULT_DISK=none \
$PREFIX/sbin/setup-disk -q ${DISKOPTS} $PREFIX/sbin/setup-disk -q ${DISKOPTS}
......
#!/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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment