summaryrefslogtreecommitdiff
path: root/testing/fulltests/default/T100agenthup_simple
blob: d4949e1970aae02d8315f0e4edf1330e830791f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

. ../support/simple_eval_tools.sh

HEADER that the agent responds properly to a kill -HUP

SKIPIF NETSNMP_DISABLE_SNMPV1

SKIPIFNOT HAVE_SIGHUP

#
# Begin test
#

# standard V1 configuration: testcomunnity
. ./Sv1config

STARTAGENT

# add a agent configuration line that wouldn't have been there when
# the started up.
CONFIGAGENT syslocation not-anywhere-in-particular

# kill -HUP the agent to get it to re-read the .conf file.
DELAY
kill -HUP `cat $SNMP_SNMPD_PID_FILE` > /dev/null 2>&1
DELAY

# And see if it has the new value.
CAPTURE "snmpget -On $SNMP_FLAGS -c testcommunity -v 1 $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.6.0"

STOPAGENT

CHECK "not-anywhere-in-particular"

FINISHED