~ubuntu-branches/ubuntu/trusty/proftpd-dfsg/trusty

« back to all changes in this revision

Viewing changes to debian/patches/xferstats.holger-preiss

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-10-06 12:57:29 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20111006125729-wiq6d3yzf2ensafj
Tags: 1.3.4~rc3-1
* New upstream pre-release.
* Refreshed all patches.
* Changed patch xferstats.holger-preiss to fix a few warnings and use
  Getopt::Std instead of the old getopts.pl which will be removed soon or
  later in perl5. Thanks lintian.
* Policy bumped to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
Index: proftpd-dfsg/contrib/xferstats.holger-preiss
6
6
===================================================================
7
 
--- proftpd-dfsg.orig/contrib/xferstats.holger-preiss   2011-02-08 13:28:11.000000000 +0100
8
 
+++ proftpd-dfsg/contrib/xferstats.holger-preiss        2011-02-08 13:28:41.000000000 +0100
9
 
@@ -250,14 +250,14 @@
 
7
--- proftpd-dfsg.orig/contrib/xferstats.holger-preiss   2011-10-05 18:19:34.000000000 +0200
 
8
+++ proftpd-dfsg/contrib/xferstats.holger-preiss        2011-10-06 10:39:31.000000000 +0200
 
9
@@ -38,6 +38,8 @@
 
10
 #  -added option A which compares the addresses end with a given pattern
 
11
 #  -added option i and o which reports either incoming or outgoing traffic only
 
12
 
 
13
+use Getopt::Std;
 
14
+
 
15
 @mydom = split(/\./, `dnsdomainname`);
 
16
 $mydom2 = pop(@mydom); chop($mydom2);
 
17
 $mydom1 = pop(@mydom);
 
18
@@ -59,8 +61,7 @@
 
19
 $opt_t = 1;
 
20
 $opt_l = 3;
 
21
 
 
22
-require 'getopts.pl';
 
23
-&Getopts('f:rahdD:l:s:A:iou:');
 
24
+getopts('f:rahdD:l:s:A:iou:');
 
25
 
 
26
 if ($opt_r) { $real = 1;}
 
27
 if ($opt_a) { $anon = 1;}
 
28
@@ -196,8 +197,8 @@
 
29
 }
 
30
 close LOG;
 
31
 
 
32
-@syslist = keys(systemfiles);
 
33
-@dates = sort datecompare keys(xferbytes);
 
34
+@syslist = keys(%systemfiles);
 
35
+@dates = sort datecompare keys(%xferbytes);
 
36
 
 
37
 if ($xferfiles == 0) {die "There was no data to process.\n";}
 
38
 
 
39
@@ -231,7 +232,7 @@
 
40
 
 
41
 # sort daily traffic by bytes sendt
 
42
 #foreach $date ( sort datecompare keys(nbytes) ) {
 
43
-foreach $date ( sort datecompare keys(xferbytes) ) {
 
44
+foreach $date ( sort datecompare keys(%xferbytes) ) {
 
45
 
 
46
    $nfiles = $xferfiles{$date};
 
47
    $nbytes = $xferbytes{$date};
 
48
@@ -250,14 +251,14 @@
10
49
 
11
50
 Total Transfers from each Archive Section (By bytes)
12
51
 
26
65
 .
27
66
 
28
67
 $| = 1;
 
68
@@ -266,7 +267,7 @@
 
69
 $~ = line2;
 
70
 
 
71
 # sort total transfer for each archive by # files transfered
 
72
-foreach $section ( sort bytecompare keys(groupfiles) ) {
 
73
+foreach $section ( sort bytecompare keys(%groupfiles) ) {
 
74
 
 
75
    $files = $groupfiles{$section};
 
76
    $bytes = $groupbytes{$section};
 
77
@@ -298,7 +299,7 @@
 
78
 $~ = line3;
 
79
 
 
80
 # sort amount per domain by files
 
81
-foreach $domain ( sort domnamcompare keys(domainfiles) ) {
 
82
+foreach $domain ( sort domnamcompare keys(%domainfiles) ) {
 
83
 
 
84
    $files = $domainfiles{$domain};
 
85
    $bytes = $domainbytes{$domain};
 
86
@@ -340,7 +341,7 @@
 
87
 $~ = line8;
 
88
 
 
89
 # sort hourly transmission by sent bytes
 
90
-foreach $time ( sort keys(xfertbytes) ) {
 
91
+foreach $time ( sort keys(%xfertbytes) ) {
 
92
 
 
93
    $nfiles   = $xfertfiles{$time};
 
94
    $nbytes   = $xfertbytes{$time};