From e323d3f4bd3daddc90a850ecee28c45dd9a9bdc9 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sun, 22 Nov 2015 21:55:51 +0000 Subject: [PATCH] Have qubes-sysinit create /var/run/qubes VM type files. - /var/run/qubes/this-is-appvm - /var/run/qubes/this-is-netvm - /var/run/qubes/this-is-proxyvm - /var/run/qubes/this-is-templatevm This is useful for checking ConditionPathExists from within systemd units. (Came up in https://phabricator.whonix.org/T432#7206.) --- vm-systemd/qubes-sysinit.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vm-systemd/qubes-sysinit.sh b/vm-systemd/qubes-sysinit.sh index 9f808b7..bea6e28 100755 --- a/vm-systemd/qubes-sysinit.sh +++ b/vm-systemd/qubes-sysinit.sh @@ -49,10 +49,10 @@ chmod 666 /proc/u2mfn # Set default services depending on VM type TYPE=`$QDB_READ /qubes-vm-type 2> /dev/null` -[ "$TYPE" = "AppVM" ] && DEFAULT_ENABLED=$DEFAULT_ENABLED_APPVM -[ "$TYPE" = "NetVM" ] && DEFAULT_ENABLED=$DEFAULT_ENABLED_NETVM -[ "$TYPE" = "ProxyVM" ] && DEFAULT_ENABLED=$DEFAULT_ENABLED_PROXYVM -[ "$TYPE" = "TemplateVM" ] && DEFAULT_ENABLED=$DEFAULT_ENABLED_TEMPLATEVM +[ "$TYPE" = "AppVM" ] && DEFAULT_ENABLED=$DEFAULT_ENABLED_APPVM && touch /var/run/qubes/this-is-appvm +[ "$TYPE" = "NetVM" ] && DEFAULT_ENABLED=$DEFAULT_ENABLED_NETVM && touch /var/run/qubes/this-is-netvm +[ "$TYPE" = "ProxyVM" ] && DEFAULT_ENABLED=$DEFAULT_ENABLED_PROXYVM && touch /var/run/qubes/this-is-proxyvm +[ "$TYPE" = "TemplateVM" ] && DEFAULT_ENABLED=$DEFAULT_ENABLED_TEMPLATEVM && touch /var/run/qubes/this-is-templatevm # Enable default services for srv in $DEFAULT_ENABLED; do