diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:56:41 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 20:56:41 +0100 |
commit | d87262dd706fec50cd150aab3e93883b6337466d (patch) | |
tree | 246b44c33ad7a57550430b0a60fa0df86a3c9e68 /app-emulation/xen-tools/files/xencommons.initd | |
parent | 71bc00c87bba1ce31de0dac6c3b7fd1aee6917fc (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-emulation/xen-tools/files/xencommons.initd')
-rw-r--r-- | app-emulation/xen-tools/files/xencommons.initd | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/app-emulation/xen-tools/files/xencommons.initd b/app-emulation/xen-tools/files/xencommons.initd deleted file mode 100644 index a7c1efed9abe..000000000000 --- a/app-emulation/xen-tools/files/xencommons.initd +++ /dev/null @@ -1,79 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -depend() { - before xenstored -} - -is_privileged_domain() { - grep -qsE '^control_d$' /proc/xen/capabilities - return $? -} - -handle_kernel_modules() { - local XEN_DEFAULT_KERNEL_MODULES=" - xen-evtchn - xen-gntdev - xen-gntalloc - xen-blkback - xen-netback - xen-pciback - gntdev - netbk - blkbk - xen-scsibk - usbbk - pciback - xen-acpi-processor - blktap2 - blktap - " - - [ "$1" = "remove" ] && OPTS="-r" - - XEN_KERNEL_MODULES="${XEN_KERNEL_MODULES:-${XEN_DEFAULT_KERNEL_MODULES}}" - for i in ${XEN_KERNEL_MODULES}; do - modprobe ${OPTS} $i 2>/dev/null - done - return 0 -} - -start() { - ebegin "Starting xencommons daemon" - - # not running in Xen dom0 or domU - if [ ! -d /proc/xen ]; then - eend 1 "Not running in Xen mode" - return 1 - fi - - # mount xenfs in dom0 or domU with a pv_ops kernel - if ! test -f /proc/xen/capabilities && \ - ! grep '^xenfs ' /proc/mounts >/dev/null; - then - mount -t xenfs xenfs /proc/xen - fi - - if ! is_privileged_domain; then - eend 1 "Not running on a privileged domain. xencommons not started" - return 1 - fi - - handle_kernel_modules - - eend $? "Failed to start xencommons" -} - -stop () { - ebegin "Stopping xencommons" - if ! is_privileged_domain; then - eend 1 "Not running on a privileged domain. xencommons not started" - return 1 - fi - - handle_kernel_modules remove - - eend $? "Failed to stop xencommons" -} - |