[Mon-commit] mon/mon.d reboot.monitor,1.1.1.1,1.1.1.1.2.1
Brought to you by:
trockij
From: Jim T. <tr...@us...> - 2004-06-28 20:43:06
|
Update of /cvsroot/mon/mon/mon.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1117 Modified Files: Tag: mon-1-0-0pre1 reboot.monitor Log Message: added --community to set the snmp community Index: reboot.monitor =================================================================== RCS file: /cvsroot/mon/mon/mon.d/reboot.monitor,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** reboot.monitor 9 Jun 2004 05:18:04 -0000 1.1.1.1 --- reboot.monitor 28 Jun 2004 20:42:58 -0000 1.1.1.1.2.1 *************** *** 7,11 **** # options: # ! # reboot.monitor --statefile=filename --dir=dir host1 host2... # # Since this is scheduled from mon, it must maintain state between --- 7,11 ---- # options: # ! # reboot.monitor --statefile=filename --dir=dir [--community=com] host1 host2... # # Since this is scheduled from mon, it must maintain state between *************** *** 47,51 **** ($ME = $0) =~ s-.*/--; ! GetOptions (\%opt, "statefile=s", "dir=s", "verbose"); $STATEDIR = $opt{"dir"} ? $opt{"dir"} --- 47,51 ---- ($ME = $0) =~ s-.*/--; ! GetOptions (\%opt, "statefile=s", "dir=s", "community=s", "verbose"); $STATEDIR = $opt{"dir"} ? $opt{"dir"} *************** *** 56,59 **** --- 56,60 ---- $STATE = "$STATEDIR/$STATEFILE"; + $COMM = $opt{"community"} || "public"; die "$ME: reboot state dir $STATEDIR does not exist\n" *************** *** 90,94 **** foreach $host (@ARGV) { ! if (!defined($s = new SNMP::Session (DestHost => $host, "Version" => 2))) { print "reboot.monitor: cannot create SNMP session to $host\n"; next; --- 91,96 ---- foreach $host (@ARGV) { ! if (!defined($s = new SNMP::Session (DestHost => $host, ! Community => $COMM, "Version" => 2))) { print "reboot.monitor: cannot create SNMP session to $host\n"; next; |