summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorRobin Lee <cheeselee@fedoraproject.org>2019-05-07 19:24:28 +0800
committerRobin Lee <cheeselee@fedoraproject.org>2019-05-08 14:47:11 +0800
commit77a058f7d2bb49b63274defa23da4410c09a996b (patch)
treebf3877a4e8822c7814f6cfc7fe17e0aa12d35ea6 /mk
parentcfe088c09c2f1c98cf4443f961a7c68521cff3f1 (diff)
downloadvyos-xe-guest-utilities-77a058f7d2bb49b63274defa23da4410c09a996b.tar.gz
vyos-xe-guest-utilities-77a058f7d2bb49b63274defa23da4410c09a996b.zip
Take effect only on Xen virtualization
So this package is safe to be installed on Non-xen hosts.
Diffstat (limited to 'mk')
-rw-r--r--mk/xe-linux-distribution.service1
-rw-r--r--mk/xen-vcpu-hotplug.rules2
2 files changed, 2 insertions, 1 deletions
diff --git a/mk/xe-linux-distribution.service b/mk/xe-linux-distribution.service
index a1cf4b1..4e60a85 100644
--- a/mk/xe-linux-distribution.service
+++ b/mk/xe-linux-distribution.service
@@ -1,5 +1,6 @@
[Unit]
Description=Linux Guest Agent
+ConditionVirtualization=xen
[Service]
ExecStartPre=/usr/share/oem/xs/xe-linux-distribution /var/cache/xe-linux-distribution
diff --git a/mk/xen-vcpu-hotplug.rules b/mk/xen-vcpu-hotplug.rules
index ecb200e..a28f895 100644
--- a/mk/xen-vcpu-hotplug.rules
+++ b/mk/xen-vcpu-hotplug.rules
@@ -1 +1 @@
-ACTION=="add", SUBSYSTEM=="cpu", RUN+="/bin/sh -c '[ ! -e /sys$devpath/online ] || echo 1 > /sys$devpath/online'"
+ACTION=="add", SUBSYSTEM=="cpu", RUN+="/bin/sh -c '( ! /usr/bin/xenstore-exists unique-domain-id 2>/dev/null ) || [ ! -e /sys$devpath/online ] || echo 1 > /sys$devpath/online'"