/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos

  • Committer: teddy at recompile
  • Date: 2020-02-07 20:53:34 UTC
  • Revision ID: teddy@recompile.se-20200207205334-dp41p8c8vw0ytik5
Allow users to more easily alter mandos.service

The sysvinit script uses /etc/default/mandos as an environment file,
and supports adding additional server options to a DAEMON_ARGS
environment variable.  This should be supported by the systemd
service, too.

* mandos.service ([Service]/EnvironmentFile): New; set to
  "/etc/default/mandos ".
  ([Service]/ExecStart): Append "$DAEMON_ARGS".

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
import collections
79
79
import codecs
80
80
import unittest
 
81
import random
81
82
 
82
83
import dbus
83
84
import dbus.service
93
94
    __metaclass__ = type
94
95
    str = unicode
95
96
 
 
97
# Add collections.abc.Callable if it does not exist
 
98
try:
 
99
    collections.abc.Callable
 
100
except AttributeError:
 
101
    class abc:
 
102
        Callable = collections.Callable
 
103
    collections.abc = abc
 
104
    del abc
 
105
 
96
106
# Show warnings by default
97
107
if not sys.warnoptions:
98
108
    import warnings
1035
1045
        if self.checker_initiator_tag is not None:
1036
1046
            GLib.source_remove(self.checker_initiator_tag)
1037
1047
        self.checker_initiator_tag = GLib.timeout_add(
1038
 
            int(self.interval.total_seconds() * 1000),
 
1048
            random.randrange(int(self.interval.total_seconds() * 1000
 
1049
                                 + 1)),
1039
1050
            self.start_checker)
1040
1051
        # Schedule a disable() when 'timeout' has passed
1041
1052
        if self.disable_initiator_tag is not None:
2746
2757
        if command == 'getattr':
2747
2758
            attrname = request[1]
2748
2759
            if isinstance(client_object.__getattribute__(attrname),
2749
 
                          collections.Callable):
 
2760
                          collections.abc.Callable):
2750
2761
                parent_pipe.send(('function', ))
2751
2762
            else:
2752
2763
                parent_pipe.send((