mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Kleine Fixes am Pakfire - brauche Binary.
OpenVPN geht nach einem ersten Test... git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@638 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
etc/rc.d/init.d/alsa
|
||||
usr/bin/aconnect
|
||||
usr/bin/alsamixer
|
||||
usr/bin/amidi
|
||||
|
||||
@@ -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'>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user