Hinzugefuegt:

* SquidGuard - mit Patch damit es mit der DB 4.4.20 funktioniert.
  * wput - wget nur andersrum.
  * hddtemp/hddgraph
  * etherwake
  * Saemtliche Bootscripts vom BLFS
  * vpn-restart-script... muss noch bearbeitet werden.
Geaendert:
  * Karsten Rechenbachs Emailadresse in die Credits gebaut.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@168 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2006-06-10 19:21:32 +00:00
parent 1ce6d69655
commit 60cbd6e755
26 changed files with 1341 additions and 59 deletions

View File

@@ -117,31 +117,31 @@ sub genmenu {
my %subsystemhash = ();
my $subsystem = \%subsystemhash;
$subsystem->{'01.home'} = {
$subsystem->{'10.home'} = {
'caption' => $tr{'alt home'},
'uri' => '/cgi-bin/index.cgi',
'title' => "$tr{'alt home'}",
'enabled' => 1,
};
$subsystem->{'02.passwords'} = {
$subsystem->{'20.passwords'} = {
'caption' => $tr{'sspasswords'},
'uri' => '/cgi-bin/changepw.cgi',
'title' => "$tr{'sspasswords'}",
'enabled' => 1,
};
$subsystem->{'03.ssh'} = {
$subsystem->{'30.ssh'} = {
'caption' => $tr{'ssh access'},
'uri' => '/cgi-bin/remote.cgi',
'title' => "$tr{'ssh access'}",
'enabled' => 1,
};
$subsystem->{'04.gui'} = {
$subsystem->{'40.gui'} = {
'caption' => $tr{'gui settings'},
'uri' => '/cgi-bin/gui.cgi',
'title' => "$tr{'gui settings'}",
'enabled' => 1,
};
$subsystem->{'05.shutdown'} = {
$subsystem->{'50.shutdown'} = {
'caption' => $tr{'shutdown'},
'uri' => '/cgi-bin/shutdown.cgi',
'title' => "$tr{'shutdown'} / $tr{'reboot'}",
@@ -156,51 +156,57 @@ sub genmenu {
my %substatushash = ();
my $substatus = \%substatushash;
$substatus->{'01.systemstatus'} = {
$substatus->{'10.systemstatus'} = {
'caption' => $tr{'sssystem status'},
'uri' => '/cgi-bin/status.cgi',
'title' => "$tr{'sssystem status'}",
'enabled' => 1,
};
$substatus->{'02.networkstatus'} = {
$substatus->{'20.networkstatus'} = {
'caption' => $tr{'ssnetwork status'},
'uri' => '/cgi-bin/netstatus.cgi',
'title' => "$tr{'ssnetwork status'}",
'enabled' => 1,
};
$substatus->{'03.systemgraphs'} = {
$substatus->{'30.systemgraphs'} = {
'caption' => $tr{'system graphs'},
'uri' => '/cgi-bin/graphs.cgi',
'novars' => 1,
'title' => "$tr{'system graphs'}",
'enabled' => 1,
};
$substatus->{'04.trafficgraphs'} = {
$substatus->{'40.trafficgraphs'} = {
'caption' => $tr{'sstraffic graphs'},
'uri' => '/cgi-bin/graphs.cgi',
'vars' => 'graph=network',
'title' => "$tr{'sstraffic graphs'}",
'enabled' => 1,
};
$substatus->{'05.proxygraphs'} = {
$substatus->{'50.proxygraphs'} = {
'caption' => $tr{'ssproxy graphs'},
'uri' => '/cgi-bin/proxygraphs.cgi',
'title' => "$tr{'ssproxy graphs'}",
'enabled' => 1,
};
$substatus->{'06.fwhits'} = {
$substatus->{'60.fwhits'} = {
'caption' => 'Firewall-Diagramme',
'uri' => '/cgi-bin/fwhits.cgi',
'title' => "Firewall-Diagramme",
'enabled' => 1,
};
$substatus->{'07.connections'} = {
$substatus->{'70.hddtemp'} = {
'caption' => '$tr{'HDD temperature graphs'}',
'uri' => '/cgi-bin/hddgraph.cgi',
'title' => "$tr{'HDD temperature graphs'}",
'enabled' => 1,
};
$substatus->{'80.connections'} = {
'caption' => $tr{'connections'},
'uri' => '/cgi-bin/connections.cgi',
'title' => "$tr{'connections'}",
'enabled' => 1,
};
$substatus->{'08.nettraf'} = {
$substatus->{'90.nettraf'} = {
'caption' => $tr{'sstraffic'},
'uri' => '/cgi-bin/traffic.cgi',
'title' => "$tr{'sstraffic'}",
@@ -216,40 +222,40 @@ sub genmenu {
my %subnetworkhash = ();
my $subnetwork = \%subnetworkhash;
$subnetwork->{'01.proxy'} = {'caption' => 'Webproxy',
$subnetwork->{'10.proxy'} = {'caption' => 'Webproxy',
'uri' => '/cgi-bin/proxy.cgi',
'title' => "Webproxy",
'enabled' => 1,
};
$subnetwork->{'02.urlfilter'} = {'caption' => 'URL-Filter',
$subnetwork->{'20.urlfilter'} = {'caption' => 'URL-Filter',
'uri' => '/cgi-bin/urlfilter.cgi',
'title' => "URL-Filter",
'enabled' => 1,
};
$subnetwork->{'03.dhcp'} = {'caption' => $tr{'dhcp server'},
$subnetwork->{'30.dhcp'} = {'caption' => $tr{'dhcp server'},
'uri' => '/cgi-bin/dhcp.cgi',
'title' => "$tr{'dhcp server'}",
'enabled' => 1,
};
$subnetwork->{'04.dialup'} = {
$subnetwork->{'40.dialup'} = {
'caption' => $tr{'alt dialup'},
'uri' => '/cgi-bin/pppsetup.cgi',
'title' => "$tr{'alt dialup'}",
'enabled' => 1,
};
$subnetwork->{'05.hosts'} = {
$subnetwork->{'50.hosts'} = {
'caption' => $tr{'edit hosts'},
'uri' => '/cgi-bin/hosts.cgi',
'title' => "$tr{'edit hosts'}",
'enabled' => 1,
};
$subnetwork->{'06.upload'} = {
$subnetwork->{'60.upload'} = {
'caption' => $tr{'upload'},
'uri' => '/cgi-bin/upload.cgi',
'title' => "$tr{'upload'}",
'enabled' => 0,
};
$subnetwork->{'07.aliases'} = {
$subnetwork->{'70.aliases'} = {
'caption' => $tr{'aliases'},
'uri' => '/cgi-bin/aliases.cgi',
'title' => "$tr{'aliases'}",
@@ -260,34 +266,34 @@ sub genmenu {
my $subservices = \%subserviceshash;
$subservices->{'01.openvpn'} = {
$subservices->{'10.openvpn'} = {
'caption' => 'OpenVPN',
'uri' => '/cgi-bin/ovpnmain.cgi',
'title' => "$tr{'virtual private networking'}",
'enabled' => 1,
};
$subservices->{'02.ipsec'} = {
$subservices->{'20.ipsec'} = {
'caption' => 'IPSec',
'uri' => '/cgi-bin/vpnmain.cgi',
'title' => "$tr{'virtual private networking'}",
'enabled' => 1,
};
$subservices->{'03.dyndns'} = {'caption' => $tr{'dynamic dns'},
$subservices->{'30.dyndns'} = {'caption' => $tr{'dynamic dns'},
'uri' => '/cgi-bin/ddns.cgi',
'title' => "$tr{'dynamic dns'}",
'enabled' => 1,
};
$subservices->{'04.time'} = {'caption' => $tr{'time server'},
$subservices->{'40.time'} = {'caption' => $tr{'time server'},
'uri' => '/cgi-bin/time.cgi',
'title' => "$tr{'time server'}",
'enabled' => 1,
};
$subservices->{'05.qos'} = {'caption' => 'Quality of Service',
$subservices->{'50.qos'} = {'caption' => 'Quality of Service',
'uri' => '/cgi-bin/qos.cgi',
'title' => "Quality of Service",
'enabled' => 1,
};
$subservices->{'06.ids'} = {'caption' => $tr{'intrusion detection'},
$subservices->{'60.ids'} = {'caption' => $tr{'intrusion detection'},
'enabled' => 1,
'uri' => '/cgi-bin/ids.cgi',
'title' => "$tr{'intrusion detection system'}",
@@ -299,37 +305,37 @@ sub genmenu {
my $subfirewall = \%subfirewallhash;
$subfirewall->{'01.dnat'} = {
$subfirewall->{'10.dnat'} = {
'caption' => $tr{'ssport forwarding'},
'uri' => '/cgi-bin/portfw.cgi',
'title' => "$tr{'ssport forwarding'}",
'enabled' => 1,
};
$subfirewall->{'02.xtaccess'} = {
$subfirewall->{'20.xtaccess'} = {
'caption' => $tr{'external access'},
'uri' => '/cgi-bin/xtaccess.cgi',
'title' => "$tr{'external access'}",
'enabled' => 1,
};
$subfirewall->{'03.wireless'} = {
$subfirewall->{'30.wireless'} = {
'caption' => $tr{'blue access'},
'uri' => '/cgi-bin/wireless.cgi',
'title' => "$tr{'blue access'}",
'enabled' => 1,
};
$subfirewall->{'04.dmz'} = {
$subfirewall->{'40.dmz'} = {
'caption' => $tr{'ssdmz pinholes'},
'uri' => '/cgi-bin/dmzholes.cgi',
'title' => "$tr{'dmz pinhole configuration'}",
'enabled' => 1,
};
$subfirewall->{'05.outgoing'} = {
$subfirewall->{'50.outgoing'} = {
'caption' => $tr{'outgoing firewall'},
'uri' => '/cgi-bin/outgoingfw.cgi',
'title' => "$tr{'outgoing firewall'}",
'enabled' => 1,
};
$subfirewall->{'06.fwopts'} = {
$subfirewall->{'60.fwopts'} = {
'caption' => $tr{'options fw'},
'uri' => '/cgi-bin/optionsfw.cgi',
'title' => "$tr{'options fw'}",
@@ -339,48 +345,48 @@ sub genmenu {
my %sublogshash = ();
my $sublogs = \%sublogshash;
$sublogs->{'01.summary'} = {'caption' => $tr{'log summary'},
$sublogs->{'10.summary'} = {'caption' => $tr{'log summary'},
'uri' => '/cgi-bin/logs.cgi/summary.dat',
'title' => "$tr{'log summary'}",
'enabled' => 1
};
$sublogs->{'02.settings'} = {'caption' => $tr{'log settings'},
$sublogs->{'20.settings'} = {'caption' => $tr{'log settings'},
'uri' => '/cgi-bin/logs.cgi/config.dat',
'title' => "$tr{'log settings'}",
'enabled' => 1
};
$sublogs->{'03.proxy'} = {'caption' => $tr{'proxy logs'},
$sublogs->{'30.proxy'} = {'caption' => $tr{'proxy logs'},
'uri' => '/cgi-bin/logs.cgi/proxylog.dat',
'title' => "$tr{'proxy logs'}",
'enabled' => 1
};
$sublogs->{'04.firewall'} = {'caption' => $tr{'firewall logs'},
$sublogs->{'40.firewall'} = {'caption' => $tr{'firewall logs'},
'uri' => '/cgi-bin/logs.cgi/firewalllog.dat',
'title' => "$tr{'firewall logs'}",
'enabled' => 1
};
$sublogs->{'05.ids'} = {'caption' => $tr{'ids logs'},
$sublogs->{'50.ids'} = {'caption' => $tr{'ids logs'},
'uri' => '/cgi-bin/logs.cgi/ids.dat',
'title' => "$tr{'ids logs'}",
'enabled' => 1
};
$sublogs->{'07.urlfilter'} = {
$sublogs->{'60.urlfilter'} = {
'caption' => $tr{'urlfilter log'},
'uri' => '/cgi-bin/logs.cgi/urlfilter.dat',
'title' => "$tr{'urlfilter log'}",
'enabled' => 1,
};
$sublogs->{'08.openvpn'} = {'caption' => $tr{'openvpn log'},
$sublogs->{'70.openvpn'} = {'caption' => $tr{'openvpn log'},
'uri' => '/cgi-bin/logs.cgi/openvpn.dat',
'title' => "$tr{'openvpn log'}",
'enabled' => 1
};
$sublogs->{'09.system'} = {'caption' => $tr{'system logs'},
$sublogs->{'80.system'} = {'caption' => $tr{'system logs'},
'uri' => '/cgi-bin/logs.cgi/log.dat',
'title' => "$tr{'system logs'}",
'enabled' => 1
};
$sublogs->{'10.userlog'} = {'caption' => $tr{'user proxy logs'},
$sublogs->{'90.userlog'} = {'caption' => $tr{'user proxy logs'},
'uri' => '/cgi-bin/logs.cgi/userlog.dat',
'title' => "$tr{'user log'}",
'enabled' => 1
@@ -388,17 +394,17 @@ sub genmenu {
my %subipfirehash = ();
my $subipfire = \%subipfirehash;
$subipfire->{'01.pakfire'} = {'caption' => 'Pakfire',
$subipfire->{'10.pakfire'} = {'caption' => 'Pakfire',
'uri' => '/cgi-bin/pakfire.cgi',
'title' => "Pakfire",
'enabled' => 1,
};
$subipfire->{'02.asterisk'} = {'caption' => 'Asterisk',
$subipfire->{'20.asterisk'} = {'caption' => 'Asterisk',
'uri' => '/cgi-bin/asterisk.cgi',
'title' => "Asterisk",
'enabled' => 1,
};
$subipfire->{'02.samba'} = {'caption' => 'Samba',
$subipfire->{'30.samba'} = {'caption' => 'Samba',
'uri' => '/cgi-bin/samba.cgi',
'title' => "Samba",
'enabled' => 1,

View File

@@ -0,0 +1,4 @@
PORT="2049"
PROCESSES="8"
QUOTAS="no"
KILLDELAY="10"

View File

@@ -70,6 +70,7 @@
* edonkeyclc_1.3.0_i386
* espgs-8.15.1-source
* ethereal-0.99.0
* etherwake-1.09
* ethtool-3
* expat-1.95.7
* ez-ipupdate-3.0.11b8
@@ -132,6 +133,7 @@
* libwww-perl-5.803
* libxml2-2.6.22
* linux-2.4.31
* linux-2.4.31-ipfire
* linux-atm-2.4.1
* logrotate-3.7
* logwatch-6.1.2
@@ -198,12 +200,12 @@
* setserial-2.17
* shadow-4.0.4.1
* slang-1.4.5-mini
* snort-2.3.3
* snort-2.4.5
* spandsp-0.0.2pre25
* speedtouch-1.2
* squid-2.5.STABLE14
* squid-graph-3.1
* squidGuard-1.2.0
* startscripts
* stund_0.96_Aug13
* sudo-1.6.8p12
@@ -222,6 +224,7 @@
* vim-6.3
* vlan.1.9
* wget-1.10.2
* wput-0.6
* xampp-linux-1.5.3a
* xinetd-2.3.14
* zlib-1.2.3

View File

@@ -41,7 +41,7 @@ Projektmitglied & Developer - Heiner Schmeling
Projektmitglied & Supporter - Silvio Rechenbach
(<a href='mailto:sr\@tne.de'>sr\@tne.de</a>)<br />
Sponsor - Karsten Rechenbach
(<a href='mailto:email\@fehlt.com'>email\@fehlt.com</a>)<br />
(<a href='mailto:space\@devilboard.net'>space\@devilboard.net</a>)<br />
Betatester - Sebastian Winter
(<a href='mailto:sebastian.winter\@gmail.com'>sebastian.winter\@gmail.com</a>)<br />
</p>

66
html/cgi-bin/hddgraph.cgi Normal file
View File

@@ -0,0 +1,66 @@
#!/usr/bin/perl
#
# SmoothWall CGIs
#
# This code is distributed under the terms of the GPL
#
# (c) The SmoothWall Team
#
# $Id: graphs.cgi,v 1.9.2.6 2005/02/22 22:21:55 gespinasse Exp $
#
# 2006-02-23 modified by weizen_42 for hddgraphs
#
# 2006-02-xx weizen_42 several modifications
# 2006-03-31 weizen_42 link to homepage
# 2006-04-22 weizen_42 v0.1.1 install below proxygraphs in status menu
#
use strict;
# enable only the following on debugging purpose
#use warnings;
#use CGI::Carp 'fatalsToBrowser';
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
my $version = 'v0.1.1';
my %cgiparams=();
my @cgigraphs=();
my @graphs=();
&Header::showhttpheaders();
my $graphdir = "/home/httpd/html/graphs";
$ENV{'QUERY_STRING'} =~ s/&//g;
@cgigraphs = split(/graph=/,$ENV{'QUERY_STRING'});
$cgigraphs[1] = '' unless defined $cgigraphs[1];
&Header::openpage($Lang::tr{'harddisk temperature graphs'}, 1, '');
&Header::openbigbox('100%', 'left');
&Header::openbox('100%', 'center', $Lang::tr{'harddisk temperature'});
if (-e "$graphdir/hddtemp-day.png")
{
my $ftime = localtime((stat("$graphdir/hddtemp-day.png"))[9]);
print "<center>";
print "<b>$Lang::tr{'the statistics were last updated at'}: $ftime</b></center><br /><hr />\n";
print "<img src='/graphs/hddtemp-day.png' border='0' /><hr />";
print "<img src='/graphs/hddtemp-week.png' border='0' /><hr />";
print "<img src='/graphs/hddtemp-month.png' border='0' /><hr />";
print "<img src='/graphs/hddtemp-year.png' border='0' />";
}
else
{
print $Lang::tr{'no information available'};
}
&Header::closebox();
&Header::closebigbox();
&Header::closepage();

View File

@@ -19,9 +19,6 @@ require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
my $advproxyversion = `cat ${General::swroot}/proxy/advanced/version`;
my $sysupdflagfile = "${General::swroot}/proxy/advanced/.up2date";
my %proxysettings=();
my %netsettings=();
my %filtersettings=();
@@ -1974,7 +1971,7 @@ print <<END
<font class='base'>$Lang::tr{'this field may be blank'}</font>
</td>
<td align='right'>
<sup><small><a href='http://www.advproxy.net' target='_blank'>Advanced Proxy $advproxyversion</a></small></sup>
&nbsp;
</td>
</tr>
</table>

View File

@@ -1274,6 +1274,10 @@
'advproxy update information' => 'Eine aktualisierte Version steht zum Download bereit. Besuchen Sie <a href="http://www.advproxy.net" target="_blank">http://www.advproxy.net</a> für weitere Informationen.',
'linkq' => 'Verbindungsqualität',
'empty profile' => 'Unbenannt',
'HDD temperature' => 'HDD-Temperatur',
'harddisk temperature' => 'Festplattentemperatur',
'harddisk temperature graphs' => 'Festplattentemperatur-Diagramme',
'hdd temperature in' => 'Festplattentemperatur in',
);

View File

@@ -1307,5 +1307,9 @@
'advproxy update information' => 'There is an updated version available for download. Visit <a href="http://www.advproxy.net" target="_blank">http://www.advproxy.net</a> for more information.',
'linkq' => 'Link Quality',
'empty profile' => 'empty',
'HDD temperature' => 'HDD temperature',
'harddisk temperature' => 'Harddisk temperature',
'harddisk temperature graphs' => 'harddisk temperature graphs',
'hdd temperature in' => 'Harddisk temperature in',
);

View File

@@ -51,7 +51,7 @@ $(TARGET) :
# Create all directories
for i in addon-lang alcatelusb auth backup backup/sets ca certs cnx_pci crls ddns dhcp dhcpc dmzholes \
eagle-usb eciadsl ethernet isdn key langs logging main modem net-traffic optionsfw patches pakfire portfw \
eagle-usb eciadsl ethernet isdn key langs logging main modem net-traffic nfs optionsfw patches pakfire portfw \
ppp private proxy/advanced red remote shaping snort time uplinks vpn wireless xtaccess ; do \
mkdir -p $(CONFIG_ROOT)/$$i; \
done
@@ -80,6 +80,7 @@ $(TARGET) :
cp $(DIR_SRC)/config/cfgroot/modem-defaults $(CONFIG_ROOT)/modem/defaults
cp $(DIR_SRC)/config/cfgroot/modem-settings $(CONFIG_ROOT)/modem/settings
cp $(DIR_SRC)/config/cfgroot/net-traffic-lib.pl $(CONFIG_ROOT)/net-traffic/net-traffic-lib.pl
cp $(DIR_SRC)/config/cfgroot/nfs-server $(CONFIG_ROOT)/nfs/nfs-server
cp $(DIR_SRC)/config/cfgroot/proxy-acl $(CONFIG_ROOT)/proxy/acl-1.4
cp $(DIR_SRC)/config/cfgroot/xtaccess-config $(CONFIG_ROOT)/xtaccess/config
cp $(DIR_SRC)/config/cfgroot/time-settings $(CONFIG_ROOT)/time/settings

78
lfs/etherwake Normal file
View File

@@ -0,0 +1,78 @@
###############################################################################
# This file is part of the IPCop Firewall. #
# #
# IPCop 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 2 of the License, or #
# (at your option) any later version. #
# #
# IPCop 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 IPCop; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 1.09
THISAPP = etherwake-$(VER)
DL_FILE = $(THISAPP)-ipfire.tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 0e303a24edfa847fe0a057ef6dfa4404
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && make
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

84
lfs/squidguard Normal file
View File

@@ -0,0 +1,84 @@
###############################################################################
# This file is part of the IPCop Firewall. #
# #
# IPCop 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 2 of the License, or #
# (at your option) any later version. #
# #
# IPCop 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 IPCop; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 1.2.0
THISAPP = squidGuard-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = c6e2e9112fdbda0602656f94c1ce31fd
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/squidGuard-$(VER)-ipfire.patch
cd $(DIR_APP) && ./configure --prefix=/usr --datadir=/usr/share \
--sysconfdir=/etc --localstatedir=/var --infodir=/usr/info --mandir=/usr/man \
--with-sg-config=/var/ipfire/proxy/squidguard.conf \
--with-sg-logdir=/var/log/squidguard --with-sg-dbhome=/var/lib/squidguard \
--with-db=/usr --with-db-inc=/usr/include --with-db-lib=/usr/lib
cd $(DIR_APP) && make
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -52,5 +52,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_SRC)/src/init.d && cp -fv * /etc/init.d
chown root.root /etc/init.d/*
chmod 755 /etc/init.d/*
for i in `ls /etc/init.d`; do ln -vfs /etc/init.d/$i /usr/local/bin/rc$i; done
for i in applejuice asterisk cups cyrus-sasl gnump3d nfs-server postfix samba winbind xinetd; do ln -vfs /etc/init.d/$$i /usr/local/bin/rc$$i; done
rm -f /usr/local/bin/rcinit-functions
@$(POSTBUILD)

79
lfs/wput Normal file
View File

@@ -0,0 +1,79 @@
###############################################################################
# This file is part of the IPCop Firewall. #
# #
# IPCop 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 2 of the License, or #
# (at your option) any later version. #
# #
# IPCop 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 IPCop; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Makefiles are based on LFSMake, which is #
# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 0.6
THISAPP = wput-$(VER)
DL_FILE = $(THISAPP).tgz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/wput
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 7ddb03154262df66e0e33f0676373ceb
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
md5 : $(subst %,%_MD5,$(objects))
###############################################################################
# Downloading, checking, md5sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_MD5,$(objects)) :
@$(MD5)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls
cd $(DIR_APP) && make
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -659,6 +659,7 @@ buildipcop() {
ipcopmake saslauthd PASS=2
ipcopmake squid
ipcopmake squid-graph
ipcopmake squidguard
ipcopmake tcpdump
ipcopmake traceroute
ipcopmake vlan
@@ -691,6 +692,7 @@ buildipcop() {
ipcopmake pwlib
ipcopmake openh323
ipcopmake wget
ipcopmake wput
ipcopmake bridge-utils
ipcopmake screen
ipcopmake hddtemp
@@ -726,6 +728,7 @@ buildipcop() {
ipcopmake nfs
ipcopmake ncftp
ipcopmake cftp
ipcopmake etherwake
ipcopmake ethereal
# ipcopmake stunnel # Ausgeschaltet, weil wir es doch nicht nutzen
}

View File

@@ -1365,6 +1365,16 @@ usr/local/bin/timecheckctrl
#usr/local/bin/tunerrd.pl
usr/local/bin/logtailfwhits
usr/local/bin/resetusb
usr/local/bin/rcasterisk
usr/local/bin/rcsamba
usr/local/bin/rcapplejuice
usr/local/bin/rcxinetd
usr/local/bin/rccups
usr/local/bin/rccyrus-sasl
usr/local/bin/rcgnump3d
usr/local/bin/rcnfs-server
usr/local/bin/rcpostfix
usr/local/bin/rcwinbind
#usr/local/doc
#usr/local/etc
#usr/local/include
@@ -15941,7 +15951,7 @@ bin/zcat
#usr/bin/zegrep
#usr/bin/zfgrep
#usr/bin/zforce
#usr/bin/zgrep
usr/bin/zgrep
#usr/bin/zless
#usr/bin/zmore
#usr/bin/znew
@@ -20982,10 +20992,12 @@ etc/httpd/conf/httpd.conf
#home/httpd
#home/httpd/cgi-bin
home/httpd/cgi-bin/aliases.cgi
home/httpd/cgi-bin/backup.cgi
#home/httpd/cgi-bin/backup.cgi
#home/httpd/cgi-bin/base.cgi
home/httpd/cgi-bin/changepw.cgi
home/httpd/cgi-bin/chpasswd.cgi
home/httpd/cgi-bin/connections.cgi
home/httpd/cgi-bin/country.cgi
home/httpd/cgi-bin/credits.cgi
home/httpd/cgi-bin/ddns.cgi
home/httpd/cgi-bin/dhcp.cgi
@@ -20994,13 +21006,13 @@ home/httpd/cgi-bin/dmzholes.cgi
home/httpd/cgi-bin/graphs.cgi
home/httpd/cgi-bin/gui.cgi
home/httpd/cgi-bin/hosts.cgi
home/httpd/cgi-bin/hddgraph.cgi
home/httpd/cgi-bin/ids.cgi
home/httpd/cgi-bin/index.cgi
home/httpd/cgi-bin/ipinfo.cgi
home/httpd/cgi-bin/fwhits.cgi
home/httpd/cgi-bin/ovpnfunc.pl
home/httpd/cgi-bin/ovpnmain.cgi
home/httpd/html/images/openvpn.gif
#home/httpd/cgi-bin/logs.cgi
home/httpd/cgi-bin/logs.cgi/config.dat
home/httpd/cgi-bin/logs.cgi/firewalllog.dat
@@ -21027,6 +21039,7 @@ home/httpd/cgi-bin/time.cgi
#home/httpd/cgi-bin/updates.cgi
home/httpd/cgi-bin/upload.cgi
home/httpd/cgi-bin/vpnmain.cgi
home/httpd/cgi-bin/webaccess.cgi
home/httpd/cgi-bin/wireless.cgi
home/httpd/cgi-bin/xtaccess.cgi
home/httpd/cgi-bin/traffic.cgi
@@ -22198,7 +22211,7 @@ sbin/hdparm
etc/ppp/ibod.cf
usr/sbin/ibod
##
## initscripts
## initscripts & startscripts
##
#etc/rc.d
#etc/rc.d/helper
@@ -22229,6 +22242,7 @@ etc/rc.d/rc.pulsardsl
etc/rc.d/rc.red
etc/rc.d/rc.sysinit
etc/rc.d/rc.updatered
etc/init.d
##
## iptables-1.3.4
##

43
src/init.d/cups Normal file
View File

@@ -0,0 +1,43 @@
#!/bin/sh
# Begin /etc/init.d/cups
#$LastChangedBy: bdubbs $
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
# Start or stop the CUPS server based upon the first argument to the script.
. /etc/init.d/init-functions
case $1 in
start)
boot_mesg "Starting CUPS Printserver..."
loadproc /usr/sbin/cupsd
;;
stop)
boot_mesg "Stopping CUPS Printserver..."
killproc /usr/sbin/cupsd
;;
reload)
boot_mesg "Reloading CUPS Printserver..."
reloadproc /usr/sbin/cupsd
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/cupsd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/cups

39
src/init.d/cyrus-sasl Normal file
View File

@@ -0,0 +1,39 @@
#!/bin/sh
# Begin /etc/init.d/cyrus-sasl
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
#$LastChangedBy: bdubbs $
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
. /etc/init.d/init-functions
case "$1" in
start)
boot_mesg "Starting the Cyrus SASL Server..."
loadproc /usr/sbin/saslauthd -a pam
;;
stop)
boot_mesg "Stopping the Cyrus SASL Server..."
killproc /usr/sbin/saslauthd
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/saslauthd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End /etc/init.d/cyrus-sasl

348
src/init.d/init-functions Normal file
View File

@@ -0,0 +1,348 @@
#*******************************************************************************
# Function - start_daemon [-f] [-n nicelevel] [-p pidfile] pathname [args]
#
# Purpose: This runs the specified program as a daemon
#
# Inputs: -f, run the program even if it is already running
# -n nicelevel, specifies a nice level. See nice(1).
# -p pidfile, uses the specified pidfile
# pathname, pathname to the specified program
# args, arguments to pass to specified program
#
# Outputs: return 0 - Success
# return 2 - Invalid or excessive number of arguments,
# warning in stdout
# return 4 - Program or service status is unknown
#
# Dependencies: nice
#
# Todo: none
#
#*******************************************************************************
start_daemon()
{
local pidfile=""
local forcestart=""
local nicelevel="0"
while true
do
case "${1}" in
-f)
forcestart="1"
shift 1
;;
-n)
nicelevel="${2}"
shift 2
;;
-p)
pidfile="${2}"
shift 2
;;
-*)
log_failure_msg "Unknown Option: ${1}"
return 2
;;
*)
break
;;
esac
done
if [ -z "${forcestart}" ]; then
if [ -z "${pidfile}" ]; then
pidofproc "${1}" > /dev/null
else
pidofproc -p "${pidfile}" "${1}" > /dev/null
fi
case "${?}" in
0)
log_warning_msg "Unable to continue: ${1} is running"
return 4
;;
1)
log_warning_msg "Unable to continue: ${pidfile} exists"
return 4
;;
3)
;;
*)
log_failure_msg "Unknown error code from pidofproc: ${?}"
return 4
;;
esac
fi
nice -n "${nicelevel}" "${@}"
}
#*******************************************************************************
# Function - killproc [-p pidfile] pathname [signal]
#
# Purpose:
#
# Inputs: -p pidfile, uses the specified pidfile
# pathname, pathname to the specified program
# signal, send this signal to pathname
#
# Outputs: return 0 - Success
# return 1 - Invalid or excessive number of arguments,
# warning in stdout
# return 4 - Unknown Status
#
# Dependencies: kill
#
# Todo: test
#
#*******************************************************************************
killproc()
{
local pidfile=""
local killsig=""
local pidlist=""
while true
do
case "${1}" in
-p)
pidfile="${2}"
shift 2
;;
-*)
log_failure_msg "Unknown Option: ${1}"
return 1
;;
*)
break
;;
esac
done
if [ "${#}" = "2" ]; then
killsig="${2}"
elif [ "${#}" != "1" ]; then
shift 2
log_failure_msg "Excess Arguments: $@"
return 1
fi
if [ -z "${pidfile}" ]; then
pidlist=`pidofproc "${1}"`
else
pidlist=`pidofproc -p "${pidfile}" "${1}"`
fi
for pid in ${pidlist}
do
kill -${killsig:-TERM} ${pid} 2> /dev/null
if [ -z "${killsig}" ]; then
# Wait up to 3 seconds, for ${pid} to terminate
local dtime=3
while [ "${dtime}" != "0" ]
do
kill -0 ${pid} 2> /dev/null || break
sleep 1
dtime=$(( ${dtime} - 1))
done
# If ${pid} is still running, kill it
kill -0 ${pid} 2> /dev/null && kill -KILL ${pid} 2> /dev/null
fi
done
if [ -z "${killsig}" ]; then
pidofproc "${1}" 2>&1 > /dev/null
# Program was terminated
if [ "$?" != "0" ]; then
# Pidfile Exists
if [ -f "${pidfile}" ]; then
rm -f "${pidfile}" 2>&1 > /dev/null
fi
return 0
else # Program is still running
return 4 # Unknown Status
fi
else
if [ -z "${pidfile}" ]; then
pidofproc "${1}" 2> /dev/null
else
pidofproc -p "${pidfile}" "${1}" 2> /dev/null
fi
fi
}
#*******************************************************************************
# Function - pidofproc [-p pidfile] pathname
#
# Purpose: This function returns one or more pid(s) for a particular daemon
#
# Inputs: -p pidfile, use the specified pidfile instead of pidof
# pathname, path to the specified program
#
# Outputs: return 0 - Success, pid's in stdout
# return 1 - Invalid or excessive number of arguments,
# warning in stdout
# return 1 - Program is dead, pidfile exists
# return 3 - Program is not running
#
# Dependencies: pidof, echo
#
# Todo: - Invalid or excessive argments, and program is dead pidfile exists
# conflict with eachother
#
#*******************************************************************************
pidofproc()
{
local pidfile=""
local lpids=""
local pidlist=""
while true
do
case "${1}" in
-p)
pidfile="${2}"
shift 2
;;
-*)
log_failure_msg "Unknown Option: ${1}"
return 1
;;
*)
break
;;
esac
done
if [ "${#}" != "1" ]; then
shift 1
log_failure_msg "Excess Arguments: $@"
return 1
fi
if [ -n "${pidfile}" ]; then
if [ ! -r "${pidfile}" ]; then
return 3 # Program is not running
fi
lpids=`head -n 1 ${pidfile}`
for pid in ${lpids}
do
if [ "${pid}" -ne "$$" -a "${pid}" -ne "${PPID}" ]; then
kill -0 "${pid}" 2> /dev/null &&
pidlist="${pidlist} ${pid}"
fi
echo ${pidlist}
test -z "${pidlist}" && return 1 # Program is dead, pidfile exists
return 0
done
else
pidof "${1}"
fi
if [ "$?" != "0" ]; then
return 3 # Program is not running
fi
}
# Screen Dimentions
if [ -z "${COLUMNS}" ]; then
COLUMNS=$(stty size)
COLUMNS=${COLUMNS##* }
fi
# When using remote connections, such as a serial port, stty size returns 0
if [ "${COLUMNS}" = "0" ]; then
COLUMNS=80
fi
# Measurements for positioning result messages
COL=$((${COLUMNS} - 8))
WCOL=$((${COL} - 2))
# Set Cursur Position Commands, used via echo -e
SET_COL="\\033[${COL}G" # at the $COL char
SET_WCOL="\\033[${WCOL}G" # at the $WCOL char
CURS_UP="\\033[1A\\033[0G" # Up one line, at the 0'th char
# Set color commands, used via echo -e
# Please consult `man console_codes` for more information
# under the "Set Graphics Resolution" section
#
# Warning, when switching from a 8bit to a 9bit font,
# the linux console will reinterpret the bold (1;) to
# the top 256 glyphs of the 9bit font. This does
# not affect framebuffer consoles
NORMAL="\\033[0;39m" # Standard console grey
SUCCESS="\\033[1;32m" # Success is green
WARNING="\\033[1;33m" # Warnings are yellow
FAILURE="\\033[1;31m" # Failures are red
INFO="\\033[1;36m" # Information is light cyan
BRACKET="\\033[1;34m" # Brackets are blue
BOOTMESG_PREFIX=" * " # Text at the beginning of every line
#*******************************************************************************
# Function - log_success_msg "message"
#
# Purpose: Print a success message
#
# Inputs:
#
# Outputs:
#
# Dependencies: echo
#
# Todo: logging
#
#*******************************************************************************
log_success_msg()
{
echo -n -e "${BOOTMESG_PREFIX}${@}"
echo -e "${SET_COL}""${BRACKET}""[""${SUCCESS}"" OK ""${BRACKET}""]""${NORMAL}"
return 0
}
#*******************************************************************************
# Function - log_failure_msg "message"
#
# Purpose: Print a failure message
#
# Inputs: $@ - Message
#
# Outputs: Text output to screen
#
# Dependencies: echo
#
# Todo: logging
#
#*******************************************************************************
log_failure_msg() {
echo -n -e "${BOOTMESG_PREFIX}${@}"
echo -e "${SET_COL}""${BRACKET}""[""${FAILURE}"" FAIL ""${BRACKET}""]""${NORMAL}"
return 0
}
#*******************************************************************************
# Function - log_warning_msg "message"
#
# Purpose: print a warning message
#
# Inputs: $@ - Message
#
# Outputs: Text output to screen
#
# Dependencies: echo
#
# Todo: logging
#
#*******************************************************************************
log_warning_msg() {
echo -n -e "${BOOTMESG_PREFIX}${@}"
echo -e "${SET_COL}""${BRACKET}""[""${WARNING}"" WARN ""${BRACKET}""]""${NORMAL}"
return 0
}

112
src/init.d/nfs-server Normal file
View File

@@ -0,0 +1,112 @@
#!/bin/sh
# Begin /etc/init.d/nfs-server
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
#$LastChangedBy: randy $
#$Date: 2006-04-29 22:26:35 -0500 (Sat, 29 Apr 2006) $
. /etc/init.d/init-functions
. /var/ipfire/nfs/nfs-server
case "$1" in
start)
boot_mesg "Starting NFS mountd..."
loadproc /usr/sbin/rpc.mountd
boot_mesg "Starting NFS nfsd..."
loadproc /usr/sbin/rpc.nfsd -p $PORT $PROCESSES
boot_mesg "Starting NFS statd..."
loadproc /usr/sbin/rpc.statd
if [ "$QUOTAS" = "yes" ]; then
boot_mesg "Starting NFS rquotad..."
loadproc /usr/sbin/rpc.rquotad
fi
# NFSD support only in 2.6 kernel
/bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
if [ $? = 0 ]; then
boot_mesg "Mounting nfsd virtual filesystem..."
/bin/mount -t nfsd none /proc/fs/nfsd 2>&1 > /dev/null
evaluate_retval
fi
# Make ceratin that the list is refreshed on
# a restart.
boot_mesg "Exporting NFS Filesystems..."
/usr/sbin/exportfs -ra 2>&1 > /dev/null
evaluate_retval
;;
stop)
boot_mesg "Stopping NFS statd..."
killproc /usr/sbin/rpc.statd
boot_mesg "Stopping NFS nfsd..."
# nfsd needs HUP....
TEMPSTOPSIG="$STOPSIG"
STOPSIG="HUP"
## Special case for nfsd with no full path
killproc nfsd
# return STOPSIG to it's orginal value...
STOPSIG="$TEMPSTOPSIG"
boot_mesg "Stopping NFS mountd..."
killproc /usr/sbin/rpc.mountd
if [ "$QUOTAS" = "yes" ]; then
boot_mesg "Stopping NFS rquotad..."
killproc /usr/sbin/rpc.rquotad
fi
boot_mesg "Refreshing NFS Exported Filesystems..."
/usr/sbin/exportfs -au 2>&1 > /dev/null
evaluate_retval
# NFSD support only in 2.6 kernel
/bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null
if [ $? = 0 ]; then
boot_mesg "Unmounting NFS Virtual Filesystem..."
/bin/umount /proc/fs/nfsd 2>&1 > /dev/null
evaluate_retval
fi
# Remove a pid file that isn't done automatically
boot_mesg "Removing the rpc.statd pid file if it exists"
if [ -f /var/run/rpc.statd.pid ]; then
rm -f /var/run/rpc.statd.pid
fi
;;
reload)
boot_mesg "Reloading NFS Server..."
/usr/sbin/exportfs -ra
evaluate_retval
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/rpc.mountd
## Special case for nfsd with no full path
statusproc nfsd
statusproc /usr/sbin/rpc.statd
if [ "$QUOTA" = "yes" ]; then
statusproc rpc.rquotad
fi
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/nfs-server

55
src/init.d/postfix Normal file
View File

@@ -0,0 +1,55 @@
#!/bin/sh
# Begin /etc/init.d/postfix
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
#$LastChangedBy: bdubbs $
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
. /etc/init.d/init-functions
case "$1" in
start)
boot_mesg "Starting Postfix..."
loadproc /usr/sbin/postfix start
;;
stop)
boot_mesg "Stopping Postfix..."
loadproc /usr/sbin/postfix stop
;;
reload)
boot_mesg "Reloading Postfix..."
loadproc /usr/sbin/postfix reload
;;
abort)
boot_mesg "Aborting Postfix..."
loadproc /usr/sbin/postfix abort
;;
flush)
boot_mesg "Flushing Postfix..."
loadproc /usr/sbin/postfix flush
;;
check)
boot_mesg "Checking Postfix..."
loadproc /usr/sbin/postfix check
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|reload|abort|flush|check|restart}"
exit 1
;;
esac
# End /etc/init.d/postfix

View File

@@ -0,0 +1,54 @@
#!/bin/sh
# Begin /etc/init.d/samba
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
#$LastChangedBy: bdubbs $
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
. /etc/init.d/init-functions
case "$1" in
start)
boot_mesg "Starting nmbd..."
loadproc /usr/sbin/nmbd -D
boot_mesg "Starting smbd..."
loadproc /usr/sbin/smbd -D
;;
stop)
boot_mesg "Stopping smbd..."
killproc /usr/sbin/smbd
boot_mesg "Stopping nmbd..."
killproc /usr/sbin/nmbd
;;
reload)
boot_mesg "Reloading smbd..."
reloadproc /usr/sbin/smbd
boot_mesg "Reloading nmbd..."
reloadproc /usr/sbin/nmbd
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/nmbd
statusproc /usr/sbin/smbd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/samba

49
src/init.d/winbind Normal file
View File

@@ -0,0 +1,49 @@
#!/bin/bash
# Begin /etc/init.d/winbind
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
#$LastChangedBy: bdubbs $
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
. /etc/init.d/init-functions
PIDFILE="/var/run/winbindd.pid"
KILLDELAY="10"
case "$1" in
start)
boot_mesg "Starting winbind..."
loadproc /usr/sbin/winbindd
;;
stop)
boot_mesg "Stopping winbind..."
killproc -p ${PIDFILE} /usr/sbin/winbind
;;
reload)
boot_mesg "Reloading winbind..."
reloadproc /usr/sbin/winbindd
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/winbindd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/winbind

44
src/init.d/xinetd Normal file
View File

@@ -0,0 +1,44 @@
#!/bin/sh
# Begin /etc/init.d/xinetd
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
#$LastChangedBy: bdubbs $
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
. /etc/init.d/init-functions
case "$1" in
start)
boot_mesg "Starting xinetd..."
loadproc /usr/sbin/xinetd
;;
stop)
boot_mesg "Stopping xinetd..."
killproc /usr/sbin/xinetd
;;
reload)
boot_mesg "Reloading xinetd..."
reloadproc /usr/sbin/xinetd
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/xinetd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End /etc/init.d/xinetd

View File

@@ -0,0 +1,51 @@
diff -urN squidGuard-1.2.0_orig/configure.in squidGuard-1.2.0/configure.in
--- squidGuard-1.2.0_orig/configure.in 2001-12-18 10:16:36.000000000 +0000
+++ squidGuard-1.2.0/configure.in 2006-06-10 12:29:26.000000000 +0000
@@ -71,7 +71,12 @@
dnl Checks for libraries.
-AC_CHECK_LIB(db,db_version,,[
+AC_CHECK_LIB(db,db_version,,
+AC_CHECK_LIB(db,db_version_4000,,
+AC_CHECK_LIB(db,db_version_4001,,
+AC_CHECK_LIB(db,db_version_4002,,
+AC_CHECK_LIB(db,db_version_4003,,
+AC_CHECK_LIB(db,db_version_4004,,[
echo
echo "** The Berkley DB library is required for squidGuard"
echo " to compile. Get it from http://www.sleepycat.com"
@@ -79,7 +84,7 @@
echo " its location. (default is $dbprefix/BerkeleyDB)"
echo
exit 1
- ])
+ ]))))))
dnl Checks for header files.
AC_HEADER_STDC
diff -urN squidGuard-1.2.0_orig/src/sgDb.c squidGuard-1.2.0/src/sgDb.c
--- squidGuard-1.2.0_orig/src/sgDb.c 2001-05-14 13:40:12.000000000 +0000
+++ squidGuard-1.2.0/src/sgDb.c 2006-06-10 12:27:04.000000000 +0000
@@ -98,13 +98,21 @@
if(createdb)
flag = flag | DB_TRUNCATE;
if ((ret =
+#if DB_VERSION_MINOR == 1 || DB_VERSION_MINOR == 2 || DB_VERSION_MINOR == 3 || DB_VERSION_MINOR == 4
+ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
+#else
Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) {
+#endif
(void) Db->dbp->close(Db->dbp, 0);
sgLogFatalError("Error db_open: %s", strerror(ret));
}
} else {
if ((ret =
+#if DB_VERSION_MINOR == 1 || DB_VERSION_MINOR == 2 || DB_VERSION_MINOR == 3 || DB_VERSION_MINOR == 4
+ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
+#else
Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
+#endif
sgLogFatalError("Error db_open: %s", strerror(ret));
}
}

View File

@@ -21,9 +21,7 @@
# Copyright (C) 2004-01-19 Mark Wormgoor <mark@wormgoor.com>. #
# #
############################################################################
#
# $Id: makegraphs,v 1.19.2.18 2006/01/08 13:41:04 eoberlander Exp $
#
use strict;
#use warnings;
@@ -57,6 +55,7 @@ if ((${Lang::language} eq 'el') ||
my $rrdlog = "/var/log/rrd";
my $graphs = "/home/httpd/html/graphs";
$ENV{PATH}="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin";
my $hdd_device = "/dev/harddisk";
sub gettraffic {
my $interface = $_[0];
@@ -674,6 +673,75 @@ sub updatelqgraph {
print "Error in RRD::graph for Link Quality: $ERROR\n" if $ERROR;
}
sub updatehdddata
{
if ( ! -e "$rrdlog/hddtemp.rrd")
{
# database did not exist -> create
RRDs::create ("$rrdlog/hddtemp.rrd", "--step=300",
"DS:temperature:GAUGE:600:0:100",
"RRA:AVERAGE:0.5:1:576",
"RRA:AVERAGE:0.5:6:672",
"RRA:AVERAGE:0.5:24:732",
"RRA:AVERAGE:0.5:144:1460");
$ERROR = RRDs::error;
print "Error in RRD::create for hdd: $ERROR\n" if $ERROR;
}
my $hdd_output = `/usr/sbin/hddtemp -qn $hdd_device`;
# I know 4 response possible responses:
#
# /dev/harddisk: harddisk type: S.M.A.R.T. not available
# /dev/harddisk: harddisk type: no sensor
# /dev/harddisk: harddisk type: 37<33>C or <20>F
# 37
if ( index($hdd_output, "S.M.A.R.T.") != -1 )
{
$temp = 0;
}
elsif ( index($hdd_output, "no sensor") != -1 )
{
$temp = 1;
}
elsif ( index($hdd_output, "$hdd_device") != -1 )
{
$hdd_output =~ /.*:.*:\s*(\d+).*\s/;
$temp = $1;
}
else
{
$hdd_output =~ /(\d+)\s/;
$temp = $1;
}
RRDs::update ("$rrdlog/hddtemp.rrd", "-t", "temperature", "N:$temp");
$ERROR = RRDs::error;
print "Error in RRD::update for hdd: $ERROR\n" if $ERROR;
}
sub updatehddgraph {
my $period = $_[0];
RRDs::graph ("$graphs/hddtemp-$period.png",
"--start", "-1$period", "-aPNG", "-i", "-z",
"--alt-y-grid", "-w 600", "-h 100",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
"--color", "BACK#FFFFFF",
"-t $tr{'harddisk temperature'} ($tr{'graph per'} $tr{$period})",
"DEF:temperature=$rrdlog/hddtemp.rrd:temperature:AVERAGE",
"LINE2:temperature#0000FF:$tr{'hdd temperature in'} <20>C",
"GPRINT:temperature:MAX:$tr{'maximal'}\\:%3.0lf <20>C",
"GPRINT:temperature:AVERAGE:$tr{'average'}\\:%3.0lf <20>C",
"GPRINT:temperature:LAST:$tr{'current'}\\:%3.0lf <20>C",
);
$ERROR = RRDs::error;
print "Error in RRD::graph for cpu: $ERROR\n" if $ERROR;
}
## Update ipac logs
system ('/usr/sbin/fetchipac');
sleep 8;
@@ -851,6 +919,15 @@ updatelqgraph("week");
updatelqgraph("month");
updatelqgraph("year");
###
### HDDTEMP-Graphs for /dev/harddisk
###
updatehdddata();
updatehddgraph ("day");
updatehddgraph ("week");
updatehddgraph ("month");
updatehddgraph ("year");
###
### Network Graphs
###

66
src/scripts/vpn-restart Normal file
View File

@@ -0,0 +1,66 @@
#!/bin/sh
# VPN Restart/Checker by Figo
#####################################################
part=xxxx #partner frei W<>hlbar
net=xxxx.homeip.net #Partner DYNDNS Adresse
vpn=xxxx #VPN Name wie unter GUI
iplocal=192.168.x.x #Lokale IP
ipremote=192.168.x.x #Partner IP
LOGFILE=/var/log/vpn_$vpn.log
maxlog=2000 #Max groesse des Logfiles in Byte
#####################################################
ping -c 3 $net
if [ $? != 0 ] ; then
clear
echo "##############################################"
echo "# $part ist offline #"
echo "# Verbindung zu $part nicht moeglich #"
echo "$(date) $part ist offline #" >> $LOGFILE
echo "$(date) Verbindung zu $part nicht moeglich #" >> $LOGFILE
echo "##############################################"
else
clear
echo "##############################################"
echo "# Na ein Glueck $part is online #"
echo "##############################################"
/usr/bin/ping -i 2 -c 2 -n -I $iplocal $ipremote
if test $? -ne 0; then
clear
echo "##############################################"
echo "# `grep -c ms $LOGFILE` #"
echo "# $(date) #"
echo "##############################################"
echo "$(date) Tunnel zu $part ist NICHT da #" >> $LOGFILE
echo "$(date) Starte Tunnel $vpn neu #" >> $LOGFILE
echo "# Tunnel zu $part ist NICHT da #"
echo "# Starte Tunnel $vpn neu #"
echo "##############################################"
ipsec auto --replace $vpn
ipsec auto --rereadsecrets
ipsec auto --up $vpn
else
clear
echo "###############################################"
echo "$(date) Tunnel zu $part steht #" >> $LOGFILE
echo "# $(date) #"
echo "# Tunnel zu $part steht #"
echo " seine WAN IP ist `host $net | cut -d" " -f4` "
echo "# seine Lokale IP ist $ipremote #"
echo "###############################################"
if test `stat -c %s $LOGFILE` -lt $maxlog; then
echo "# $LOGFILE < $maxlog Bytes #"
else
echo "##############################################"
echo "# $LOGFILE > $maxlog Bytes #"
echo "# Maximale groesse des Logfile #"
echo "# Logfile wird geloescht #"
echo "##############################################"
rm $LOGFILE
fi
fi
fi
exit 0