Guard qvm-start-daemon with generic 'guivm' or 'audiovm' services

Not a flavor-specific one (guivm-gui-agent).

QubesOS/qubes-issues#4186
This commit is contained in:
Marek Marczykowski-Górecki 2021-05-21 21:03:36 +02:00
parent 416532ba42
commit 8be74249df
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 4 additions and 4 deletions

View File

@ -56,8 +56,8 @@ Options
.. option:: --force
Force running, even if this isn't GUI/Audio domain. GUI domain is a domain
with 'guivm-gui-agent' qvm-service enabled. Similarly for Audio domain it is
'audiovm-audio-agent' qvm-service.
with 'guivm' qvm-service enabled. Similarly for Audio domain it is
'audiovm' qvm-service.
.. option:: --kde

View File

@ -710,12 +710,12 @@ parser.add_argument('--kde', action='store_true',
# Add it for the help only
parser.add_argument('--force', action='store_true', default=False,
help='Force running daemon without enabled services'
' \'guivm-gui-agent\' or \'audiovm-audio-agent\'')
' \'guivm\' or \'audiovm\'')
def main(args=None):
""" Main function of qvm-start-daemon tool"""
only_if_service_enabled = ['guivm-gui-agent', 'audiovm-audio-agent']
only_if_service_enabled = ['guivm', 'audiovm']
enabled_services = [service for service in only_if_service_enabled if
os.path.exists('/var/run/qubes-service/%s' % service)]
if not enabled_services and '--force' not in sys.argv and \