From 16b5d0c4a24c793ca3584ca5c50fd5f8f2166120 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 24 Feb 2015 02:33:08 +0000 Subject: samples/pktgen: Trap SIGINT Otherwise ^C stops the script, not just pktgen. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- samples/pktgen/pktgen.conf-1-1 | 1 + samples/pktgen/pktgen.conf-1-1-flows | 1 + samples/pktgen/pktgen.conf-1-1-ip6 | 1 + samples/pktgen/pktgen.conf-1-1-ip6-rdos | 1 + samples/pktgen/pktgen.conf-1-1-rdos | 1 + samples/pktgen/pktgen.conf-1-2 | 1 + samples/pktgen/pktgen.conf-2-1 | 1 + samples/pktgen/pktgen.conf-2-2 | 1 + 8 files changed, 8 insertions(+) (limited to 'samples') diff --git a/samples/pktgen/pktgen.conf-1-1 b/samples/pktgen/pktgen.conf-1-1 index bb5398367d4b..fc1d15c98595 100755 --- a/samples/pktgen/pktgen.conf-1-1 +++ b/samples/pktgen/pktgen.conf-1-1 @@ -53,6 +53,7 @@ PGDEV=/proc/net/pktgen/eth1 PGDEV=/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" + trap true INT pgset "start" echo "Done" diff --git a/samples/pktgen/pktgen.conf-1-1-flows b/samples/pktgen/pktgen.conf-1-1-flows index db20ac8a66a7..e00d66c8f5e5 100755 --- a/samples/pktgen/pktgen.conf-1-1-flows +++ b/samples/pktgen/pktgen.conf-1-1-flows @@ -61,6 +61,7 @@ PGDEV=/proc/net/pktgen/eth1 PGDEV=/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" + trap true INT pgset "start" echo "Done" diff --git a/samples/pktgen/pktgen.conf-1-1-ip6 b/samples/pktgen/pktgen.conf-1-1-ip6 index e22199d1ed76..f16145303afb 100755 --- a/samples/pktgen/pktgen.conf-1-1-ip6 +++ b/samples/pktgen/pktgen.conf-1-1-ip6 @@ -54,6 +54,7 @@ PGDEV=/proc/net/pktgen/eth1 PGDEV=/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" + trap true INT pgset "start" echo "Done" diff --git a/samples/pktgen/pktgen.conf-1-1-ip6-rdos b/samples/pktgen/pktgen.conf-1-1-ip6-rdos index 58dd0524f264..06b502834cc7 100755 --- a/samples/pktgen/pktgen.conf-1-1-ip6-rdos +++ b/samples/pktgen/pktgen.conf-1-1-ip6-rdos @@ -57,6 +57,7 @@ PGDEV=/proc/net/pktgen/eth1 PGDEV=/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" + trap true INT pgset "start" echo "Done" diff --git a/samples/pktgen/pktgen.conf-1-1-rdos b/samples/pktgen/pktgen.conf-1-1-rdos index 2834ac789721..8f1ce1a0aa98 100755 --- a/samples/pktgen/pktgen.conf-1-1-rdos +++ b/samples/pktgen/pktgen.conf-1-1-rdos @@ -58,6 +58,7 @@ PGDEV=/proc/net/pktgen/eth1 PGDEV=/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" + trap true INT pgset "start" echo "Done" diff --git a/samples/pktgen/pktgen.conf-1-2 b/samples/pktgen/pktgen.conf-1-2 index b519dab262ce..f151e85c536a 100755 --- a/samples/pktgen/pktgen.conf-1-2 +++ b/samples/pktgen/pktgen.conf-1-2 @@ -63,6 +63,7 @@ PGDEV=/proc/net/pktgen/eth2 PGDEV=/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" + trap true INT pgset "start" echo "Done" diff --git a/samples/pktgen/pktgen.conf-2-1 b/samples/pktgen/pktgen.conf-2-1 index 6f57a558d817..e6b36b2f840e 100755 --- a/samples/pktgen/pktgen.conf-2-1 +++ b/samples/pktgen/pktgen.conf-2-1 @@ -60,6 +60,7 @@ PGDEV=/proc/net/pktgen/eth1 PGDEV=/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" + trap true INT pgset "start" echo "Done" diff --git a/samples/pktgen/pktgen.conf-2-2 b/samples/pktgen/pktgen.conf-2-2 index aa3225280521..6484435c104e 100755 --- a/samples/pktgen/pktgen.conf-2-2 +++ b/samples/pktgen/pktgen.conf-2-2 @@ -67,6 +67,7 @@ PGDEV=/proc/net/pktgen/eth2 PGDEV=/proc/net/pktgen/pgctrl echo "Running... ctrl^C to stop" + trap true INT pgset "start" echo "Done" -- cgit v1.2.1