Disable meminfo-writer if there is any PCI device attached

This code used to be in dom0, but it's easier to maintain it in VM.

QubesOS/qubes-issues#2101
This commit is contained in:
Marek Marczykowski-Górecki 2016-06-21 19:08:16 +02:00
parent 76e12cae2d
commit c3d630f288
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -2,10 +2,20 @@
# List of services enabled by default (in case of absence of qubesdb entry)
DEFAULT_ENABLED_NETVM="network-manager qubes-network qubes-update-check qubes-updates-proxy"
DEFAULT_ENABLED_PROXYVM="meminfo-writer qubes-network qubes-firewall qubes-netwatcher qubes-update-check"
DEFAULT_ENABLED_APPVM="meminfo-writer cups qubes-update-check"
DEFAULT_ENABLED_PROXYVM="qubes-network qubes-firewall qubes-netwatcher qubes-update-check"
DEFAULT_ENABLED_APPVM="cups qubes-update-check"
DEFAULT_ENABLED_TEMPLATEVM="$DEFAULT_ENABLED_APPVM updates-proxy-setup"
DEFAULT_ENABLED="meminfo-writer"
DEFAULT_ENABLED=""
if [ -z "`ls /sys/bus/pci/devices/`" ]; then
# do not enable meminfo-writer (so qmemman for this domain) when any PCI
# device is present
DEFAULT_ENABLED="$DEFAULT_ENABLED meminfo-writer"
DEFAULT_ENABLED_APPVM="$DEFAULT_ENABLED_APPVM meminfo-writer"
DEFAULT_ENABLED_PROXYVM="$DEFAULT_ENABLED_PROXYVM meminfo-writer"
DEFAULT_ENABLED_TEMPLATEVM="$DEFAULT_ENABLED_TEMPLATEVM meminfo-writer"
fi
QDB_READ=qubesdb-read
QDB_LS=qubesdb-multiread