File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- COUNT=40
3
+ # On Ubuntu, you may want this:
4
+ # echo "core.%e.%p" > /proc/sys/kernel/core_pattern
5
+ # http://stackoverflow.com/a/18368068
6
+
7
+ ulimit -c unlimited
8
+ ulimit -a
4
9
10
+ COUNT=40
5
11
echo " Make sure to configure GatewayInterface in wifidog_mock.conf"
6
12
7
13
./generate_interfaces.sh start $COUNT || exit 1
8
14
9
15
./mock_auth.py &
16
+ MA_PID=" $! "
10
17
11
18
# trace-children is necessary because of the libtool wrapper -.-
12
19
# sudo valgrind --leak-check=full --trace-children=yes --trace-children-skip=/bin/sh \
13
20
# --log-file=valgrind.log ../../src/wifidog -d 7 -f -c wifidog-mock.conf 2> wifidog.log &
14
21
15
22
../../src/wifidog -d 7 -f -c wifidog-mock.conf -a /tmp/arp 2> wifidog.log &
23
+ WD_PID=" $! "
16
24
17
25
IF=` grep GatewayInterface wifidog-mock.conf | cut -f 2 -d ' ' `
18
26
@@ -23,4 +31,12 @@ sleep 10
23
31
24
32
# ./generate_interfaces.sh stop
25
33
34
+ function cleanup() {
35
+
36
+ kill $MA_PID
37
+ kill $WD_PID
38
+ ./generate_interfaces.sh stop $COUNT
39
+
40
+ }
26
41
42
+ trap cleanup EXIT
You can’t perform that action at this time.
0 commit comments