samples/pktgen: Trap SIGINT
authorBen Hutchings <ben.hutchings@codethink.co.uk>
Tue, 24 Feb 2015 02:33:08 +0000 (02:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Feb 2015 03:04:21 +0000 (22:04 -0500)
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>
samples/pktgen/pktgen.conf-1-1
samples/pktgen/pktgen.conf-1-1-flows
samples/pktgen/pktgen.conf-1-1-ip6
samples/pktgen/pktgen.conf-1-1-ip6-rdos
samples/pktgen/pktgen.conf-1-1-rdos
samples/pktgen/pktgen.conf-1-2
samples/pktgen/pktgen.conf-2-1
samples/pktgen/pktgen.conf-2-2

index bb5398367d4baf909f14595c87400602ebe6834f..fc1d15c98595489a04ea417f936e91d4259194c6 100755 (executable)
@@ -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"
 
index db20ac8a66a7e737ff62efe0f201f3fe3f4e6fae..e00d66c8f5e5591de77d911a1d414bd10527493c 100755 (executable)
@@ -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"
 
index e22199d1ed76a648fe341464af3d5a8e9666f2f0..f16145303afbf3be3c4176e851be28e396398fc4 100755 (executable)
@@ -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"
 
index 58dd0524f264430dbed0acb8840f9994d72bc0f3..06b502834cc750417a19205cd4a971c7530e424e 100755 (executable)
@@ -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"
 
index 2834ac789721893d054bec153121b229afd4ea73..8f1ce1a0aa98ee64a0512623646f70a931648237 100755 (executable)
@@ -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"
 
index b519dab262ce9e85bebf6d6c32bc63eefb66ad2c..f151e85c536a060167e488af33def18532fbec92 100755 (executable)
@@ -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"
 
index 6f57a558d817cb41ea042ebf45be6a9af7a15400..e6b36b2f840e690524cac5689abe0f0b700e4ae9 100755 (executable)
@@ -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"
 
index aa3225280521eeb0139eb30399903a41e41436cf..6484435c104e0ccc8c20891a74695cf47604e342 100755 (executable)
@@ -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"