qubes/features: rename 'services/ntpd' to 'service/ntpd'
It makes much more sense to use singular form here - ntpd is a single service.
This commit is contained in:
parent
2b0ad51b18
commit
c08766e157
@ -709,13 +709,13 @@ class Qubes(qubes.PropertyHolder):
|
|||||||
# Disable ntpd in ClockVM - to not conflict with ntpdate (both are
|
# Disable ntpd in ClockVM - to not conflict with ntpdate (both are
|
||||||
# using 123/udp port)
|
# using 123/udp port)
|
||||||
if hasattr(self, 'clockvm') and self.clockvm is not None:
|
if hasattr(self, 'clockvm') and self.clockvm is not None:
|
||||||
if self.clockvm.features.get('services/ntpd', False):
|
if self.clockvm.features.get('service/ntpd', False):
|
||||||
self.log.warning(
|
self.log.warning(
|
||||||
'VM set as clockvm (%r) has enabled \'ntpd\' service! '
|
'VM set as clockvm (%r) has enabled \'ntpd\' service! '
|
||||||
'Expect failure when syncing time in dom0.',
|
'Expect failure when syncing time in dom0.',
|
||||||
self.clockvm)
|
self.clockvm)
|
||||||
else:
|
else:
|
||||||
self.clockvm.features['services/ntpd'] = ''
|
self.clockvm.features['service/ntpd'] = ''
|
||||||
|
|
||||||
for vm in self.domains:
|
for vm in self.domains:
|
||||||
vm.events_enabled = True
|
vm.events_enabled = True
|
||||||
@ -1033,12 +1033,12 @@ class Qubes(qubes.PropertyHolder):
|
|||||||
# pylint: disable=unused-argument,no-self-use
|
# pylint: disable=unused-argument,no-self-use
|
||||||
if newvalue is None:
|
if newvalue is None:
|
||||||
return
|
return
|
||||||
if newvalue.features.get('services/ntpd', False):
|
if newvalue.features.get('service/ntpd', False):
|
||||||
raise qubes.exc.QubesVMError(newvalue,
|
raise qubes.exc.QubesVMError(newvalue,
|
||||||
'Cannot set {!r} as {!r} since it has ntpd enabled.'.format(
|
'Cannot set {!r} as {!r} since it has ntpd enabled.'.format(
|
||||||
newvalue.name, name))
|
newvalue.name, name))
|
||||||
else:
|
else:
|
||||||
newvalue.features['services/ntpd'] = ''
|
newvalue.features['service/ntpd'] = ''
|
||||||
|
|
||||||
|
|
||||||
@qubes.events.handler(
|
@qubes.events.handler(
|
||||||
|
@ -39,7 +39,7 @@ class R3Compatibility(qubes.ext.Extension):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
features_to_services = {
|
features_to_services = {
|
||||||
'services/ntpd': 'ntpd',
|
'service/ntpd': 'ntpd',
|
||||||
'check-updates': 'qubes-update-check',
|
'check-updates': 'qubes-update-check',
|
||||||
'dvm': 'qubes-dvm',
|
'dvm': 'qubes-dvm',
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user