add scripts I've create yesterday

This commit is contained in:
statzitz 2024-07-23 12:54:54 +02:00
parent 848f18d683
commit 1e7b1f88c3
8 changed files with 101 additions and 0 deletions

4
proc-xen/proc-xen.check Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
mount | grep -q xenfs && exit 0
exit 1

3
proc-xen/proc-xen.finish Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
umount /proc/xen

11
proc-xen/proc-xen.run Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
[ ! -d /proc/xen ] && exit 0
[ -e /proc/xen/capabilities ] && exit 0
mount -t xenfs xenfs /proc/xen
exec chpst -b proc-xen pause

21
proc-xen/proc-xen.sysinit Executable file
View file

@ -0,0 +1,21 @@
#!/bin/sh
. /usr/lib/rc/functions
case "$1" in
start)
stat_busy "mounting xen"
[ ! -d /proc/xen ] && stat_die proc-xen
[ -e /proc/xen/capabilities ] && stat_die proc-xen
mount -t xenfs xenfs /proc/xen || stat_die proc-xen
add_daemon proc-xen
stat_done proc-xen
;;
*)
echo "usage: $0 {start}"
exit 1
;;
esac

15
xen-init-dom0.run Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
set -e
sv s proc-xen > /dev/null || exit 1
sv s xenstored > /dev/null || exit 1
[ -e /run/xen/xenstored.pid ] || exit 1
. /etc/conf.d/xencommons
/bin/grep -q control_d /proc/xen/capabilities || exit 0
/usr/lib/xen/bin/xen-init-dom0 $XEN_DOM0_UUID > /dev/null
exec chpst -b xen-init-dom0 pause

17
xenconsoled.run Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
set -e
sv s proc-xen > /dev/null || exit 1
sv s xenstored > /dev/null || exit 1
export XENCONSOLED_ARGS=""
export XENCONSOLED_TRACE="none"
export XENCONSOLED_LOG_DIR="/var/log/xen/console"
. /etc/conf.d/xencommons
/bin/grep -q control_d /proc/xen/capabilities || exit 1
/bin/mkdir -p ${XENCONSOLED_LOG_DIR} /run/xen || exit 1
exec /usr/bin/xenconsoled -i --log=${XENCONSOLED_TRACE} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS

16
xendomains.run Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
set -e
sv s proc-xen > /dev/null || exit 1
sv s xenstored > /dev/null || exit 1
sv s xenconsoled > /dev/null || exit 1
sv s xen-init-dom0 > /dev/null || exit 1
[ -e /proc/xen/capabilities ] || exit 1
/bin/grep -q control_d /proc/xen/capabilities || exit 1
/usr/lib/xen/bin/xendomains start > /dev/null
exec chpst -b xendomains pause

14
xenstored.run Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
set -e
[ -e /proc/xen/capabilities ] || exit 1
sv s proc-xen > /dev/null || exit 1
/bin/grep -q control_d /proc/xen/capabilities || exit 1
sleep 3
/etc/xen/scripts/launch-xenstore > /dev/null
exec chpst -b xenstored pause