forked from luck/tmp_suning_uos_patched
samples/pktgen: Trap SIGINT
Otherwise ^C stops the script, not just pktgen. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
db72aba30a
commit
16b5d0c4a2
|
@ -53,6 +53,7 @@ PGDEV=/proc/net/pktgen/eth1
|
||||||
PGDEV=/proc/net/pktgen/pgctrl
|
PGDEV=/proc/net/pktgen/pgctrl
|
||||||
|
|
||||||
echo "Running... ctrl^C to stop"
|
echo "Running... ctrl^C to stop"
|
||||||
|
trap true INT
|
||||||
pgset "start"
|
pgset "start"
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ PGDEV=/proc/net/pktgen/eth1
|
||||||
PGDEV=/proc/net/pktgen/pgctrl
|
PGDEV=/proc/net/pktgen/pgctrl
|
||||||
|
|
||||||
echo "Running... ctrl^C to stop"
|
echo "Running... ctrl^C to stop"
|
||||||
|
trap true INT
|
||||||
pgset "start"
|
pgset "start"
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ PGDEV=/proc/net/pktgen/eth1
|
||||||
PGDEV=/proc/net/pktgen/pgctrl
|
PGDEV=/proc/net/pktgen/pgctrl
|
||||||
|
|
||||||
echo "Running... ctrl^C to stop"
|
echo "Running... ctrl^C to stop"
|
||||||
|
trap true INT
|
||||||
pgset "start"
|
pgset "start"
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ PGDEV=/proc/net/pktgen/eth1
|
||||||
PGDEV=/proc/net/pktgen/pgctrl
|
PGDEV=/proc/net/pktgen/pgctrl
|
||||||
|
|
||||||
echo "Running... ctrl^C to stop"
|
echo "Running... ctrl^C to stop"
|
||||||
|
trap true INT
|
||||||
pgset "start"
|
pgset "start"
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ PGDEV=/proc/net/pktgen/eth1
|
||||||
PGDEV=/proc/net/pktgen/pgctrl
|
PGDEV=/proc/net/pktgen/pgctrl
|
||||||
|
|
||||||
echo "Running... ctrl^C to stop"
|
echo "Running... ctrl^C to stop"
|
||||||
|
trap true INT
|
||||||
pgset "start"
|
pgset "start"
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ PGDEV=/proc/net/pktgen/eth2
|
||||||
PGDEV=/proc/net/pktgen/pgctrl
|
PGDEV=/proc/net/pktgen/pgctrl
|
||||||
|
|
||||||
echo "Running... ctrl^C to stop"
|
echo "Running... ctrl^C to stop"
|
||||||
|
trap true INT
|
||||||
pgset "start"
|
pgset "start"
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ PGDEV=/proc/net/pktgen/eth1
|
||||||
PGDEV=/proc/net/pktgen/pgctrl
|
PGDEV=/proc/net/pktgen/pgctrl
|
||||||
|
|
||||||
echo "Running... ctrl^C to stop"
|
echo "Running... ctrl^C to stop"
|
||||||
|
trap true INT
|
||||||
pgset "start"
|
pgset "start"
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ PGDEV=/proc/net/pktgen/eth2
|
||||||
PGDEV=/proc/net/pktgen/pgctrl
|
PGDEV=/proc/net/pktgen/pgctrl
|
||||||
|
|
||||||
echo "Running... ctrl^C to stop"
|
echo "Running... ctrl^C to stop"
|
||||||
|
trap true INT
|
||||||
pgset "start"
|
pgset "start"
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user