]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Upgraded hostap because of new madwifi hal release
authorManiacikarus <maniacikarus@ipfire.org>
Fri, 5 Sep 2008 13:24:43 +0000 (15:24 +0200)
committerManiacikarus <maniacikarus@ipfire.org>
Fri, 5 Sep 2008 13:24:43 +0000 (15:24 +0200)
Fixed and commented the migrate.pl

config/qos/migrate.pl
doc/packages-list.txt
html/cgi-bin/wlanap.cgi
lfs/madwifi

index 48ef5585e6d29eed97b19cb45dd95b35f1dc0230..5c93d26ecef8d57b028a61a3b9d3157755892ca3 100755 (executable)
@@ -1,18 +1,53 @@
 #!/usr/bin/perl
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+# This skript will migrate all old rrd files with ADSL Optimizer Style to a
+# custom IPFire one only collecting byte count for the QoS classes
+
+# Fore testing purpose i recommend to copy your rrd files to /tmp and change
+# the rrddir, then you are able to test the migration without problems
+# Migration will take all classes rrd into count
 
 my $rrddir = "/var/log/rrd";
-my @files = `cd $rrddir && ls class_* `;
+my @files = `cd $rrddir && ls class_*.rrd`;
 
+# Ff migration was already done we will skip this to avoid errors
 if ( -e "$rrddir/migrated" ){print "Already migrated rrd files -> exit.\n";exit 1;}
 
+# Stop collectd and qos to ensure that no one further write to the rrds
 system("/etc/init.d/collectd stop");
 system("/usr/local/bin/qosctrl stop");
 
 foreach (@files){
                chomp($_);
+               
+               # Dump the whole rrd file to human readable xml format into an array
                my @lines = `rrdtool dump $rrddir/$_`;
                
+               # to ensure only needed raw data is extracted we will use a marker
                my $fromhere = 0;
+               
+               # because every rrd hase the same header we can use a general one deleting
+               # lastupdate and lastvalue they will be set the first time rrd is written
+               # after migration
                my @newlines = "<!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
        <step> 10 </step> <!-- Seconds -->
        <lastupdate> </lastupdate>
@@ -48,12 +83,18 @@ foreach (@files){
                <database>
 ";
                foreach (@lines){
+               
+                                               # if database content line is found we will start to extract the values
                                                if ( $_ =~ /\<database\>/ ){
                                                        $fromhere = 1;next;
                                                }
+                                               # if database content is finished we will stop to extract the values
                                                if ( $_ =~ /\<\/database\>/ ){
                                                        $fromhere = 0;next;
                                                }
+                                               # if extraction is not set we will skip this line else we will extract
+                                               # only the first row and drop all the other ones, the new raw line
+                                               # will be written to and array
                                                if ( $fromhere eq "0" ){
                                                                next;
                                                }else{
@@ -61,19 +102,26 @@ foreach (@files){
                                                                push(@newlines,$t[0]."<v>".$t[1]."</row>\n");
                                                }
                }
+# Add default footer to the array so a valid rrd xml file will be created
 push(@newlines,"               </database>
        </rra>
 </rrd>");
+# Now write the whole array to an xml file
 open(DATEI, ">/tmp/rrd.xml") || die "Unable to create temp file";
 print DATEI @newlines;
 close(DATEI);
 
+# Delete the old rrd file and restore a new one with content from the xml file
 system("rm -f $rrddir/$_");
 system("rrdtool restore -f /tmp/rrd.xml $rrddir/$_");
 print "$_ ... resized\n";
 }
 
+# Now we can restart the collection
 system("/etc/init.d/collectd start");
 system("/usr/local/bin/qosctrl start");
+
+# Finaly we will delete unneeded evt files and touch the migration file
+system("rf $rrddir/*.evt");
 system("touch $rrddir/migrated");
 exit 0;
index 109702d1364a024a1ad4b6fa872cb3cd96508542..cd6a008eec131f348469f82655355224967c61f2 100644 (file)
 * lzo-2.02
 * m4-1.4.4
 * mISDNuser-1_1_8
-* madwifi-hal-2008-08-15-r3851-20080829
+* madwifi-hal-2008-08-15-r3862-20080903
 * make-3.81
 * man-db-2.4.3
 * man-pages-2.34
index 18f01678bfeca30631674978fbef986561084bc7..a238f7a8d7258265928e8c52ff3495f2f4da8990 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
index 2818b0565c62d4dc8126e181d48d62b01dea311f..509013e2cb20dd05bb7562f99d82e1d4ddb0426c 100644 (file)
@@ -24,7 +24,7 @@
 
 include Config
 
-VER        = hal-2008-08-15-r3851-20080829
+VER        = hal-2008-08-15-r3862-20080903
 
 THISAPP    = madwifi-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = 5e66a7d080636675830a94775d13c760
+$(DL_FILE)_MD5 = 3c9726acd5ffa180fa7b274b625a6082
 
 install : $(TARGET)