summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/snmp/vyatta-snmp.pl2
-rw-r--r--templates/protocols/snmp/node.def1
2 files changed, 2 insertions, 1 deletions
diff --git a/scripts/snmp/vyatta-snmp.pl b/scripts/snmp/vyatta-snmp.pl
index 7e1f8e63..42988fef 100644
--- a/scripts/snmp/vyatta-snmp.pl
+++ b/scripts/snmp/vyatta-snmp.pl
@@ -72,7 +72,7 @@ sub snmp_get_constants {
}
sub snmp_get_values {
- my $output;
+ my $output = '';
my $config = new VyattaConfig;
$config->setLevel("protocols snmp community");
diff --git a/templates/protocols/snmp/node.def b/templates/protocols/snmp/node.def
index 4c35e2b0..b140f7f6 100644
--- a/templates/protocols/snmp/node.def
+++ b/templates/protocols/snmp/node.def
@@ -1,4 +1,5 @@
help: "Configure SNMP"
+commit: $(community/) != ""; "must configure a community"
create: "/opt/vyatta/sbin/vyatta-snmp.pl --init-snmp"
delete: "touch /tmp/snmp.\\$PPID"
end: "if [ -f \"/tmp/snmp.\\$PPID\" ]; then \