checking in before i change a regex pattern. this currently will grab commented out defaults, but we don't want that since it complicates things - so we hardcode in shipped defaults.
This commit is contained in:
@@ -37,7 +37,7 @@ class Connection(_common.BaseConnection):
|
||||
self.device = _common.getDefIface(self.connection_type)
|
||||
self.desc = ('A {0} profile for {1} (generated by AIF-NG)').format(self.connection_type,
|
||||
self.device)
|
||||
self._cfg = configparser.ConfigParser()
|
||||
self._cfg = configparser.ConfigParser(allow_no_value = True, interpolation = None)
|
||||
self._cfg.optionxform = str
|
||||
# configparser *requires* sections. netctl doesn't use them. We strip it when we write.
|
||||
self._cfg['BASE'] = {'Description': self.desc,
|
||||
@@ -130,7 +130,7 @@ class Connection(_common.BaseConnection):
|
||||
fulld = os.path.join(root, d)
|
||||
os.chmod(fulld, 0o0755)
|
||||
os.chown(fulld, 0, 0)
|
||||
systemd_cfg = configparser.ConfigParser()
|
||||
systemd_cfg = configparser.ConfigParser(allow_no_value = True, interpolation = None)
|
||||
systemd_cfg.optionxform = str
|
||||
systemd_cfg['Unit'] = {'Description': self.desc,
|
||||
'BindsTo': 'sys-subsystem-net-devices-{0}.device'.format(self.device),
|
||||
|
||||
@@ -32,7 +32,7 @@ class Connection(_common.BaseConnection):
|
||||
_logger.info('Building config.')
|
||||
if self.device == 'auto':
|
||||
self.device = _common.getDefIface(self.connection_type)
|
||||
self._cfg = configparser.ConfigParser()
|
||||
self._cfg = configparser.ConfigParser(allow_no_value = True, interpolation = None)
|
||||
self._cfg.optionxform = str
|
||||
self._cfg['connection'] = {'id': self.id,
|
||||
'uuid': self.uuid,
|
||||
|
||||
Reference in New Issue
Block a user