]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Kleine Fixes am Pakfire - brauche Binary.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 18 Jun 2007 22:09:26 +0000 (22:09 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 18 Jun 2007 22:09:26 +0000 (22:09 +0000)
OpenVPN geht nach einem ersten Test...

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@638 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/rootfiles/packages/alsa
html/cgi-bin/ovpnmain.cgi
src/misc-progs/openvpnctrl.c
src/pakfire/lib/functions.pl
src/pakfire/pakfire

index fca4b0309818721776a775aef3a16ce19ba05bc8..c6e850b5277f789b67d3cde251d58a4d32041bcc 100644 (file)
@@ -1,3 +1,4 @@
+etc/rc.d/init.d/alsa
 usr/bin/aconnect
 usr/bin/alsamixer
 usr/bin/amidi
index 0b0d8cb0886d000da53ffe013f7f0eb9b6d8b9f8..7566ec00ae0d08910fefc2ace6e55e0f7e961967 100644 (file)
@@ -1,9 +1,6 @@
 #!/usr/bin/perl
-# based on SmoothWall and IPCop CGIs
 # 
 # This code is distributed under the terms of the GPL
-# Main idea from zeroconcept
-# ZERNINA-VERSION:0.9.4i
 # (c) 2007 Ufuk Altinkaynak
 #
 
@@ -301,7 +298,7 @@ sub writeserverconf {
     print CONF "\n";
     print CONF "daemon openvpnserver\n";
     print CONF "writepid /var/run/openvpn.pid\n";
-    print CONF "#DAN prepare ZERINA for listening on blue and orange\n";
+    print CONF "#DAN prepare OpenVPN for listening on blue and orange\n";
     print CONF ";local $sovpnsettings{'VPN_IP'}\n";
     print CONF "dev $sovpnsettings{'DDEVICE'}\n";
     print CONF "$sovpnsettings{'DDEVICE'}-mtu $sovpnsettings{'DMTU'}\n";
@@ -2558,8 +2555,7 @@ END
     } else {
        $activeonrun = "disabled='disabled'";
     }  
-    &Header::openbox('100%', 'LEFT', $Lang::tr{'global settings'});
-       print "<div align='center'><strong>ZERINA-0.9.4i</strong></div>";       
+    &Header::openbox('100%', 'LEFT', $Lang::tr{'global settings'});    
     print <<END        
     <table width='100%'>
     <form method='post'>
index 96bc8d78028f6fdd82a727d1d6073f7044aa19e0..028a1a3722652cdb5640a0cd82730b4ccd5d95cd 100644 (file)
@@ -7,73 +7,6 @@
 #include "setuid.h"
 #include "libsmooth.h"
 
-/*
-               Version History
-               
-               1.0.0.0         many things happend before ...
-
-               2.0.0.1         2005/06/09      tarralan
-                                       add. Version History
-                                       add. deleteChainReference(char*)
-                                       add. createChainReference(char*)
-                                       mod. deleteChain(char*)
-                                       mod. flushChain(char*)
-                                       add. flushAllChains()
-                                       del. deletechains()
-                                       add. consts for chain names
-                                       del. createchains()
-                                       add. createAllChains()
-                                       add. ovpnInit()
-                                       add. global vars for chain and interface status
-                                       add. usage of consts for chain names
-                                       mod. reworked createAllChains()
-
-               2.0.0.2         2005/06/09      horizont
-                                       change the input + forward chain position index based on active interfaces
-
-               2.0.0.3         2005/06/09      tarralan
-                                       mod. removed const attribute
-
-               2.0.0.4         2005/06/12      tarralan
-                                       add. debug condition für output
-                                       mod. changed definition auf consts
-
-               2.0.0.5-7       2005/06/12      tarralan
-                                       debugging
-
-               2.0.0.8         2005/06/12      tarralan
-                                       add. executeCommand()
-
-               2.0.0.9-16      2005/06/12      tarralan
-                                       debugging
-
-               2.0.0.17        2005/06/12      tarralan
-                                       mod. createAllChains
-
-               2.0.1.1         2005/06/12      tarralan
-                                       non-debug build
-
-               2.0.1.2         2005/06/13      tarralan
-                                       mod. some options renamed
-
-               2.0.1.3         2005/06/13      tarralan
-                                       mod. startDaemon() to verify if OpenVPN is enabled
-                                       mod. createAllChains() to verify if OpenVPN is enabled
-                                       mod. command help
-
-               2.0.1.4         2005/06/13      tarralan
-                                       mod. bug fixed with the -sdo option
-               2.0.1.5         2005/11/06      Ufuk Altinkaynak
-                                       mod. bug fixed no need to read blue and orange dev, when they are not enabled
-               2.0.1.6         2005/01/03      Ufuk Altinkaynak
-                                       mod. bug fixed reported by weizen_42 see http://www.vpnforum.de/viewtopic.php?p=7113#7113                                       
-                                       
-# ZERNINA-VERSION:0.9.0b
-# (c) 2005 tarralan + Ufuk Altinkaynak
-#
-# Ipcop and OpenVPN eas as one two three..
-#                                      
-*/
 #define noovpndebug
 
 // global vars
@@ -121,7 +54,7 @@ void usage(void)
        printf(" -fwr --firewall-rules\n");
        printf("      removes current OpenVPN chains and rules and resets them according to the config\n");
        printf(" -sdo --start-daemon-only\n");
-       printf("      starts OpenVPN daemon only (useful for rc.local)\n");
+       printf("      starts OpenVPN daemon only\n");
        printf(" -ccr --create-chains-and-rules\n");
        printf("      creates chains and rules for OpenVPN\n");
        printf(" -dcr --delete-chains-and-rules\n");
@@ -363,6 +296,7 @@ void stopDaemon(void) {
        executeCommand(command);
        snprintf(command, STRING_SIZE - 1, "/bin/rm -f /var/run/openvpn.pid");
        executeCommand(command);
+       executeCommand("modprobe -r tun");
 }
 
 void startDaemon(void) {
@@ -372,6 +306,7 @@ void startDaemon(void) {
                fprintf(stderr, "OpenVPN is not enabled on any interface\n");
                exit(1);
        } else {
+               executeCommand("modprobe tun");
                snprintf(command, STRING_SIZE-1, "/usr/sbin/openvpn --config /var/ipfire/ovpn/server.conf");
                executeCommand(command);
        }
index 48c34e91050dff03add509166e91129f54d54c19..000b2cfc82ec270d47e44142c4e27dd849475f07 100644 (file)
@@ -54,6 +54,7 @@ sub fetchfile {
                        $file = "$server[2]/$getfile";
                } else {
                        $host = $gethost;
+                       $file = $getfile;
                }
                
                $proto = "HTTP" unless $proto;
@@ -62,7 +63,7 @@ sub fetchfile {
 
                my $ua = LWP::UserAgent->new;
                $ua->agent("Pakfire/$Conf::version");
-               #$ua->timeout(5);
+               $ua->timeout(5);
                #$ua->env_proxy;
         
                my $response = $ua->get("http://$host/$file");
@@ -189,9 +190,9 @@ sub dblist {
                @templine = split(/\;/,$line);
                ### filter here...
                if ("$forweb" eq "forweb") {
-                       print "<option value=\"$templine[0]\">$templine[1]</option>\n";
+                       print "<option value=\"$templine[0]\">$templine[0]-$templine[1]-$templine[2]</option>\n";
                } else {
-                       print "$templine[0] $templine[1]\n";
+                       print "Name: $templine[0]\nVersion: $templine[1]\nRelease: $templine[2]\n\n";
                }
        }
 }
@@ -325,7 +326,7 @@ sub decryptpak {
        my $return = system("gpg -d < $Conf::cachedir/$file | tar xj -C $Conf::tmpdir/");
        
        logger("Decryption process returned the following: $return");
-       if ($return == 1) { exit 1; }
+       if ($return != 1) { exit 1; }
 }
 
 sub getpak {
@@ -354,8 +355,6 @@ sub getpak {
                exit 1;
        }
        
-       #message("\n## Downloading $file...");
-       
        unless ( "$force" eq "force" ) {
                if ( -e "$Conf::cachedir/$file" ) {
                        return $file;
@@ -451,7 +450,6 @@ sub beautifysize {
 
 sub makeuuid {
        unless ( -e "$Conf::dbdir/uuid" ) {
-               message("Creating a random key...");
                open(FILE, "</proc/sys/kernel/random/uuid");
                my @line = <FILE>;
                close(FILE);
index 94f8558eff93180a4d61575516ca9f119bc37ad1..ef395df94c9d6631ecc7f7f2d22ca8fe0d4e1654 100644 (file)
@@ -4,7 +4,7 @@
        
        my $interactive = 1;
        
-       &Pakfire::message("### Welcome to IPFire Pakfire $Conf::version!");
+       &Pakfire::logger("### IPFire Pakfire $Conf::version started!");
 
        ### Check if we are running as root
        #
@@ -94,5 +94,7 @@
                &Pakfire::makeuuid();
                &Pakfire::senduuid();
                &Pakfire::getmirrors();
-               &Pakfire::dbgetlist();
+               
+       } elsif ("$ARGV[0]" eq "list") {
+               &Pakfire::dblist("noweb");
        }