Browse Source

qubes/features: rename 'services/ntpd' to 'service/ntpd'

It makes much more sense to use singular form here - ntpd is a single
service.
Marek Marczykowski-Górecki 7 years ago
parent
commit
c08766e157
2 changed files with 5 additions and 5 deletions
  1. 4 4
      qubes/app.py
  2. 1 1
      qubes/ext/r3compatibility.py

+ 4 - 4
qubes/app.py

@@ -709,13 +709,13 @@ class Qubes(qubes.PropertyHolder):
         # Disable ntpd in ClockVM - to not conflict with ntpdate (both are
         # using 123/udp port)
         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(
                     'VM set as clockvm (%r) has enabled \'ntpd\' service! '
                     'Expect failure when syncing time in dom0.',
                     self.clockvm)
             else:
-                self.clockvm.features['services/ntpd'] = ''
+                self.clockvm.features['service/ntpd'] = ''
 
         for vm in self.domains:
             vm.events_enabled = True
@@ -1033,12 +1033,12 @@ class Qubes(qubes.PropertyHolder):
         # pylint: disable=unused-argument,no-self-use
         if newvalue is None:
             return
-        if newvalue.features.get('services/ntpd', False):
+        if newvalue.features.get('service/ntpd', False):
             raise qubes.exc.QubesVMError(newvalue,
                 'Cannot set {!r} as {!r} since it has ntpd enabled.'.format(
                     newvalue.name, name))
         else:
-            newvalue.features['services/ntpd'] = ''
+            newvalue.features['service/ntpd'] = ''
 
 
     @qubes.events.handler(

+ 1 - 1
qubes/ext/r3compatibility.py

@@ -39,7 +39,7 @@ class R3Compatibility(qubes.ext.Extension):
     '''
 
     features_to_services = {
-        'services/ntpd': 'ntpd',
+        'service/ntpd': 'ntpd',
         'check-updates': 'qubes-update-check',
         'dvm': 'qubes-dvm',