Fabian Deutsch has uploaded a new change for review. Change subject: We should cat the old snmp_conf, not the snmp_conf dir ......................................................................
We should cat the old snmp_conf, not the snmp_conf dir Missed during the code review from the last patch -- don't try to cat a directory. cat the conf instead. Rename the variables so they make more sense and this won't get confused again if anyone touches it in the future Change-Id: I2662ca403f99de9c5c9f9603e27b2407d44c431b Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1261424 Signed-off-by: Ryan Barry <[email protected]> --- M src/ovirt/node/setup/snmp/snmp_model.py 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/14/50914/1 diff --git a/src/ovirt/node/setup/snmp/snmp_model.py b/src/ovirt/node/setup/snmp/snmp_model.py index 5be0507..3a99235 100644 --- a/src/ovirt/node/setup/snmp/snmp_model.py +++ b/src/ovirt/node/setup/snmp/snmp_model.py @@ -24,8 +24,8 @@ import os.path -snmp_conf = "/var/lib/net-snmp/" -old_conf = "/var/lib/net-snmp/snmpd.conf" +snmp_dir = "/var/lib/net-snmp/" +snmp_conf = "/var/lib/net-snmp/snmpd.conf" def enable_snmpd(password): @@ -56,7 +56,7 @@ "SHA", "-x", "AES", "root"]) system.service("snmpd", "start") - fs.Config().persist(snmp_conf) + fs.Config().persist(snmp_dir) firewall.open_port(port="161", proto="udp") @@ -67,7 +67,7 @@ process.check_call(["cp", "/etc/snmp/snmpd.conf", "/tmp"]) process.check_call("sed -c -ie '/^createUser root/d' %s" % snmp_conf, shell=True) - configs = [snmp_conf, old_conf] + configs = [snmp_conf, snmp_dir] [fs.Config().unpersist(c) for c in configs if fs.Config().exists(c)] -- To view, visit https://gerrit.ovirt.org/50914 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2662ca403f99de9c5c9f9603e27b2407d44c431b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Fabian Deutsch <[email protected]> Gerrit-Reviewer: Fabian Deutsch <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
