summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-09-15 19:11:35 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-09-15 19:11:35 -0500
commitecb4650bc1ff7f7039a8de0c21f72667be9b189d (patch)
tree046d2d4b8805ff49c321ca75087249dfa86ff553 /scripts
parent3358412ae5e8d7ba94aedeb78080d2509d82239f (diff)
downloadvyatta-op-ecb4650bc1ff7f7039a8de0c21f72667be9b189d.tar.gz
vyatta-op-ecb4650bc1ff7f7039a8de0c21f72667be9b189d.zip
Fix 'monitor interface traffic save'
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-tshark.pl12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/vyatta-tshark.pl b/scripts/vyatta-tshark.pl
index 103808d..75b1a5b 100755
--- a/scripts/vyatta-tshark.pl
+++ b/scripts/vyatta-tshark.pl
@@ -57,15 +57,21 @@ sub check_if_interface_is_tsharkable {
#
# main
#
-my ($detail,$filter,$intf,$unlimited);
+my ($detail,$filter,$intf,$unlimited,$save);
-GetOptions("detail!" => \$detail,
+GetOptions("detail!" => \$detail,
"filter=s" => \$filter,
+ "save=s" => \$save,
"intf=s" => \$intf,
- "unlimited!" => \$unlimited);
+ "unlimited!" => \$unlimited);
check_if_interface_is_tsharkable($intf);
+if (defined($save)){
+ exec "sudo /usr/bin/tshark -i $intf -w '$save' | grep -v root";
+ exit 0;
+}
+
if (defined($filter)) {
if (defined($detail)) {
if (defined($unlimited)){