Bug #5796 ยป pcap_flood.patch
ttcn3-tcpdump-start.sh | ||
---|---|---|
21 | 21 |
kill_rm_pidfile() { |
22 | 22 |
# NOTE: This requires you to be root or something like |
23 | 23 |
# "laforge ALL=NOPASSWD: /usr/sbin/tcpdump, /bin/kill" in your sudoers file |
24 |
if ! [ -e "$1" ] && [ -s "$1" ]; then
|
|
24 |
if [ -e "$1" ] && [ -s "$1" ]; then |
|
25 | 25 |
$SUDOSTR kill "$(cat "$1")" 2>&1 | grep -v "No such process" |
26 | 26 |
rm $1 |
27 | 27 |
fi |
ttcn3-tcpdump-stop.sh | ||
---|---|---|
16 | 16 |
kill_rm_pidfile() { |
17 | 17 |
# NOTE: This requires you to be root or something like |
18 | 18 |
# "laforge ALL=NOPASSWD: /usr/sbin/tcpdump, /bin/kill" in your sudoers file |
19 |
if ! [ -e "$1" ] && [ -s "$1" ]; then
|
|
19 |
if [ -e "$1" ] && [ -s "$1" ]; then |
|
20 | 20 |
$SUDOSTR kill "$(cat "$1")" 2>&1 | grep -v "No such process" |
21 | 21 |
rm $1 |
22 | 22 |
fi |