From 6bf9995ed54f023e4147c6011de6a1d5191e766d Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Mon, 27 Oct 2008 16:13:44 -0700 Subject: Fix Bug 3840 System error reported on initial SNMP commit with trap target redirect error to /dev/null --- scripts/snmp/vyatta-snmp.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/snmp/vyatta-snmp.pl b/scripts/snmp/vyatta-snmp.pl index 6de63fb0..58dc374f 100644 --- a/scripts/snmp/vyatta-snmp.pl +++ b/scripts/snmp/vyatta-snmp.pl @@ -163,7 +163,7 @@ sub snmp_write_snmpv3_user { my $vyatta_user = shift; my $user = "rouser $vyatta_user\n"; - system ("sed -i '/user[[:space:]]*vyatta[[:alnum:]]*/d' $snmp_snmpv3_user_conf;"); + system ("sed -i '/user[[:space:]]*vyatta[[:alnum:]]*/d' $snmp_snmpv3_user_conf 2>/dev/null;"); open(my $fh, '>>', $snmp_snmpv3_user_conf) || die "Couldn't open $snmp_snmpv3_user_conf - $!"; print $fh $user; close $fh; -- cgit v1.2.3