diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/snmp.py | 2 | ||||
-rwxr-xr-x | src/conf_mode/system-syslog.py | 51 | ||||
-rwxr-xr-x | src/conf_mode/vpn_l2tp.py | 2 |
3 files changed, 27 insertions, 28 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py index 770d83744..eb0d20654 100755 --- a/src/conf_mode/snmp.py +++ b/src/conf_mode/snmp.py @@ -548,7 +548,7 @@ def apply(snmp): # Reload systemd manager configuration call('systemctl daemon-reload') # start SNMP daemon - call("systemctl start snmpd.service") + call("systemctl restart snmpd.service") while (call('systemctl -q is-active snmpd.service') != 0): print("service not yet started") diff --git a/src/conf_mode/system-syslog.py b/src/conf_mode/system-syslog.py index 8b20e1135..cfc1ca55f 100755 --- a/src/conf_mode/system-syslog.py +++ b/src/conf_mode/system-syslog.py @@ -162,32 +162,31 @@ def generate_selectors(c, config_node): # protocols and security are being mapped here # for backward compatibility with old configs # security and protocol mappings can be removed later - if c.is_tag(config_node): - nodes = c.list_nodes(config_node) - selectors = "" - for node in nodes: - lvl = c.return_value(config_node + ' ' + node + ' level') - if lvl == None: - lvl = "err" - if lvl == 'all': - lvl = '*' - if node == 'all' and node != nodes[-1]: - selectors += "*." + lvl + ";" - elif node == 'all': - selectors += "*." + lvl - elif node != nodes[-1]: - if node == 'protocols': - node = 'local7' - if node == 'security': - node = 'auth' - selectors += node + "." + lvl + ";" - else: - if node == 'protocols': - node = 'local7' - if node == 'security': - node = 'auth' - selectors += node + "." + lvl - return selectors + nodes = c.list_nodes(config_node) + selectors = "" + for node in nodes: + lvl = c.return_value(config_node + ' ' + node + ' level') + if lvl == None: + lvl = "err" + if lvl == 'all': + lvl = '*' + if node == 'all' and node != nodes[-1]: + selectors += "*." + lvl + ";" + elif node == 'all': + selectors += "*." + lvl + elif node != nodes[-1]: + if node == 'protocols': + node = 'local7' + if node == 'security': + node = 'auth' + selectors += node + "." + lvl + ";" + else: + if node == 'protocols': + node = 'local7' + if node == 'security': + node = 'auth' + selectors += node + "." + lvl + return selectors def generate(c): diff --git a/src/conf_mode/vpn_l2tp.py b/src/conf_mode/vpn_l2tp.py index febe8c3b7..7e40be32a 100755 --- a/src/conf_mode/vpn_l2tp.py +++ b/src/conf_mode/vpn_l2tp.py @@ -278,7 +278,7 @@ def get_config(): l2tp['lns_shared_secret'] = conf.return_value(['lns', 'shared-secret']) if conf.exists(['ccp-disable']): - l2tp[['ccp_disable']] = True + l2tp['ccp_disable'] = True # PPP options if conf.exists(['idle']): |