Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-2.x

This commit is contained in:
Michael Tremer
2012-02-08 21:47:09 +01:00
52 changed files with 560 additions and 107 deletions

View File

@@ -5,9 +5,9 @@ background = ffffff
#hiddenmenu
# *** If you want use serial console comment next line
splashimage (hd0,0)/grub/ipfire.xpm.gz
# *** add "console=ttyS0,38400n8" to kernel cmdline,
# *** add "console=ttyS0,115200n8" to kernel cmdline,
# *** uncomment following lines and check also inittab
#serial --unit=0 --speed=38400
#serial --unit=0 --speed=115200
#terminal --timeout=1 serial console
title IPFire
root (hd0,0)

View File

@@ -0,0 +1,6 @@
#usr/lib/perl5/site_perl/5.12.3/Crypt
usr/lib/perl5/site_perl/5.12.3/Crypt/PasswdMD5.pm
#usr/lib/perl5/site_perl/5.12.3/i586-linux-thread-multi/auto/Crypt
#usr/lib/perl5/site_perl/5.12.3/i586-linux-thread-multi/auto/Crypt/PasswdMD5
#usr/lib/perl5/site_perl/5.12.3/i586-linux-thread-multi/auto/Crypt/PasswdMD5/.packlist
#usr/share/man/man3/Crypt::PasswdMD5.3

View File

@@ -93,6 +93,8 @@ etc/rc.d/init.d/networking/red.up/99-pakfire-update
etc/rc.d/init.d/ntp
#etc/rc.d/init.d/nut
#etc/rc.d/init.d/openvmtools
etc/rc.d/init.d/partresize
etc/rc.d/init.d/fsresize
#etc/rc.d/init.d/portmap
#etc/rc.d/init.d/postfix
#etc/rc.d/init.d/pound
@@ -218,3 +220,6 @@ etc/sysconfig/modules
etc/sysconfig/rc
etc/sysconfig/rc.local
etc/init.d
etc/rc.d/init.d/networking/red.down/10-static-routes
etc/rc.d/init.d/networking/red.up/10-static-routes
#etc/rc.d/init.d/transmission

View File

@@ -0,0 +1 @@
#usr/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-linux-armv5tel.egg

View File

@@ -20,8 +20,7 @@ bin/rmdir
bin/sleep
bin/sync
bin/true
#bin/uname
bin/uname.bak
bin/uname
etc/dircolors
usr/bin/[
usr/bin/basename

View File

@@ -94,6 +94,8 @@ etc/rc.d/init.d/networking/red.up/99-pakfire-update
etc/rc.d/init.d/ntp
#etc/rc.d/init.d/nut
#etc/rc.d/init.d/openvmtools
etc/rc.d/init.d/partresize
etc/rc.d/init.d/fsresize
#etc/rc.d/init.d/portmap
#etc/rc.d/init.d/postfix
#etc/rc.d/init.d/pound
@@ -221,3 +223,5 @@ etc/sysconfig/modules
etc/sysconfig/rc
etc/sysconfig/rc.local
etc/init.d
etc/rc.d/init.d/networking/red.down/10-static-routes
etc/rc.d/init.d/networking/red.up/10-static-routes

View File

@@ -0,0 +1 @@
#usr/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-linux-i586.egg

View File

@@ -1 +0,0 @@
#usr/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-linux-i686.egg

View File

@@ -11,12 +11,14 @@ usr/share/usb_modeswitch/0471:1210:uMa=Philips
usr/share/usb_modeswitch/0471:1210:uMa=Wisue
usr/share/usb_modeswitch/0471:1237
usr/share/usb_modeswitch/0482:024d
usr/share/usb_modeswitch/04bb:bccd
usr/share/usb_modeswitch/04e8:689a
usr/share/usb_modeswitch/04e8:f000:sMo=U209
usr/share/usb_modeswitch/057c:84ff
usr/share/usb_modeswitch/05c6:1000:sVe=GT
usr/share/usb_modeswitch/05c6:1000:sVe=Option
usr/share/usb_modeswitch/05c6:1000:uMa=AnyDATA
usr/share/usb_modeswitch/05c6:1000:uMa=DGT
usr/share/usb_modeswitch/05c6:1000:uMa=Option
usr/share/usb_modeswitch/05c6:1000:uMa=SAMSUNG
usr/share/usb_modeswitch/05c6:1000:uMa=SSE
@@ -57,6 +59,7 @@ usr/share/usb_modeswitch/0af0:7401
usr/share/usb_modeswitch/0af0:7501
usr/share/usb_modeswitch/0af0:7601
usr/share/usb_modeswitch/0af0:7701
usr/share/usb_modeswitch/0af0:7706
usr/share/usb_modeswitch/0af0:7801
usr/share/usb_modeswitch/0af0:7901
usr/share/usb_modeswitch/0af0:7a01
@@ -73,6 +76,7 @@ usr/share/usb_modeswitch/0af0:8900
usr/share/usb_modeswitch/0af0:9000
usr/share/usb_modeswitch/0af0:c031
usr/share/usb_modeswitch/0af0:c100
usr/share/usb_modeswitch/0af0:d001
usr/share/usb_modeswitch/0af0:d013
usr/share/usb_modeswitch/0af0:d031
usr/share/usb_modeswitch/0af0:d033
@@ -100,7 +104,11 @@ usr/share/usb_modeswitch/1004:1000
usr/share/usb_modeswitch/1004:607f
usr/share/usb_modeswitch/1004:613a
usr/share/usb_modeswitch/1004:613f
usr/share/usb_modeswitch/1004:614e
usr/share/usb_modeswitch/1004:6190
usr/share/usb_modeswitch/1004:61dd
usr/share/usb_modeswitch/1004:61e7
usr/share/usb_modeswitch/1004:61eb
usr/share/usb_modeswitch/1033:0035
usr/share/usb_modeswitch/106c:3b03
usr/share/usb_modeswitch/106c:3b05
@@ -134,6 +142,7 @@ usr/share/usb_modeswitch/12d1:1557
usr/share/usb_modeswitch/12d1:1c0b
usr/share/usb_modeswitch/12d1:1d50
usr/share/usb_modeswitch/12d1:1da1
usr/share/usb_modeswitch/12d1:1f01
usr/share/usb_modeswitch/12d1:380b
usr/share/usb_modeswitch/1307:1169
usr/share/usb_modeswitch/1410:5010
@@ -162,8 +171,10 @@ usr/share/usb_modeswitch/19d2:0101
usr/share/usb_modeswitch/19d2:0103
usr/share/usb_modeswitch/19d2:0110
usr/share/usb_modeswitch/19d2:0115
usr/share/usb_modeswitch/19d2:0146
usr/share/usb_modeswitch/19d2:0149
usr/share/usb_modeswitch/19d2:0166
usr/share/usb_modeswitch/19d2:0169
usr/share/usb_modeswitch/19d2:1001
usr/share/usb_modeswitch/19d2:1007
usr/share/usb_modeswitch/19d2:1009
@@ -175,6 +186,7 @@ usr/share/usb_modeswitch/19d2:1201
usr/share/usb_modeswitch/19d2:1216
usr/share/usb_modeswitch/19d2:1224
usr/share/usb_modeswitch/19d2:1517
usr/share/usb_modeswitch/19d2:1520
usr/share/usb_modeswitch/19d2:2000
usr/share/usb_modeswitch/19d2:bccd
usr/share/usb_modeswitch/19d2:ffde
@@ -182,6 +194,7 @@ usr/share/usb_modeswitch/19d2:ffe6
usr/share/usb_modeswitch/19d2:fff5
usr/share/usb_modeswitch/19d2:fff6
usr/share/usb_modeswitch/1a8d:1000
usr/share/usb_modeswitch/1a8d:2000
usr/share/usb_modeswitch/1ab7:5700
usr/share/usb_modeswitch/1b7d:0700
usr/share/usb_modeswitch/1bbb:f000
@@ -204,8 +217,10 @@ usr/share/usb_modeswitch/1ee8:0040
usr/share/usb_modeswitch/1f28:0021
usr/share/usb_modeswitch/1fac:0032
usr/share/usb_modeswitch/1fac:0130
usr/share/usb_modeswitch/201e:1023
usr/share/usb_modeswitch/201e:2009
usr/share/usb_modeswitch/2020:f00e
usr/share/usb_modeswitch/21f5:1000
usr/share/usb_modeswitch/230d:0001
usr/share/usb_modeswitch/230d:0007
usr/share/usb_modeswitch/8888:6500

View File

@@ -7,3 +7,6 @@ etc/ipsec.user.secrets
var/updatecache
etc/localtime
var/ipfire/ovpn
etc/ssh/ssh_config
etc/ssh/sshd_config
etc/ssl/openssl.cnf

View File

@@ -0,0 +1 @@
../../../common/openssh

View File

@@ -0,0 +1 @@
../../../common/openssl

View File

@@ -17,7 +17,7 @@
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2011 IPFire-Team <info@ipfire.org>. #
# Copyright (C) 2012 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
@@ -34,7 +34,8 @@ done
#
#Stop services
/etc/init.d/sshd stop
/etc/init.d/apache stop
#
#Extract files
@@ -42,6 +43,8 @@ extract_files
#
#Start services
/etc/init.d/apache start
/etc/init.d/sshd start
#
@@ -64,6 +67,9 @@ extract_files
sync
# This update need a reboot...
touch /var/run/need_reboot
#
#Finish
/etc/init.d/fireinfo start

View File

@@ -0,0 +1,12 @@
srv/web/ipfire/html/proxy.pac
etc/udev/rules.d/30-persistent-network.rules
etc/ipsec.conf
etc/ipsec.secrets
etc/ipsec.user.conf
etc/ipsec.user.secrets
var/updatecache
etc/localtime
var/ipfire/ovpn
etc/ssh/ssh_config
etc/ssh/sshd_config
etc/ssl/openssl.cnf

View File

@@ -0,0 +1 @@
../../../common/Crypt-PasswdMD5

View File

@@ -0,0 +1,13 @@
etc/system-release
etc/issue
etc/rc.d/init.d/mountfs
etc/rc.d/init.d/smartenabler
etc/rc.d/init.d/networking/red.up/10-static-routes
etc/rc.d/init.d/networking/red.down/10-static-routes
srv/web/ipfire/cgi-bin/chpasswd.cgi
srv/web/ipfire/cgi-bin/hardwaregraphs.cgi
srv/web/ipfire/cgi-bin/media.cgi
usr/local/bin/hddshutdown
usr/local/bin/makegraphs
usr/local/bin/openvpnctrl
usr/local/bin/readhash

View File

@@ -0,0 +1 @@
../../../common/openssh

View File

@@ -0,0 +1 @@
../../../common/openssl

View File

@@ -0,0 +1 @@
../../../common/usb_modeswitch

View File

@@ -0,0 +1 @@
../../../common/usb_modeswitch_data

View File

@@ -0,0 +1 @@
DEPS=""

View File

@@ -0,0 +1,82 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire 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. #
# #
# IPFire 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 IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2012 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
#
# Remove old core updates from pakfire cache to save space...
core=56
for (( i=1; i<=$core; i++ ))
do
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
done
#
#Stop services
/etc/init.d/sshd stop
/etc/init.d/apache stop
#
#Extract files
extract_files
#
#Edit baudrate in grub.conf and inittab
sed -i -e "s|38400|115200|g" /boot/grub/grub.conf
sed -i -e "s|38400|115200|g" /etc/inittab
#
#Start services
/etc/init.d/apache start
/etc/init.d/sshd start
#
#Update Language cache
#perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
#Rebuild module dep's
#depmod -a 2.6.32.45-ipfire >/dev/null 2>&1
#depmod -a 2.6.32.45-ipfire-pae >/dev/null 2>&1
#depmod -a 2.6.32.45-ipfire-xen >/dev/null 2>&1
#Rebuild initrd's because some compat-wireless modules are inside
#/sbin/dracut --force --verbose /boot/ipfirerd-2.6.32.45.img 2.6.32.45-ipfire
#if [ -e /boot/ipfirerd-2.6.32.45-pae.img ]; then
#/sbin/dracut --force --verbose /boot/ipfirerd-2.6.32.45-pae.img 2.6.32.45-ipfire-pae
#fi
#if [ -e /boot/ipfirerd-2.6.32.45-xen.img ]; then
#/sbin/dracut --force --verbose /boot/ipfirerd-2.6.32.45-xen.img 2.6.32.45-ipfire-xen
#fi
sync
# This update need a reboot...
touch /var/run/need_reboot
#
#Finish
/etc/init.d/fireinfo start
sendprofile
#Don't report the exitcode last command
exit 0

View File

@@ -0,0 +1,12 @@
srv/web/ipfire/html/proxy.pac
etc/udev/rules.d/30-persistent-network.rules
etc/ipsec.conf
etc/ipsec.secrets
etc/ipsec.user.conf
etc/ipsec.user.secrets
var/updatecache
etc/localtime
var/ipfire/ovpn
etc/ssh/ssh_config
etc/ssh/sshd_config
etc/ssl/openssl.cnf

View File

@@ -0,0 +1,4 @@
etc/system-release
etc/issue
etc/rc.d/init.d/networking/red.up/10-static-routes
etc/rc.d/init.d/networking/red.down/10-static-routes

View File

@@ -0,0 +1 @@
DEPS=""

View File

@@ -0,0 +1,74 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire 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. #
# #
# IPFire 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 IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2012 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
#
# Remove old core updates from pakfire cache to save space...
core=57
for (( i=1; i<=$core; i++ ))
do
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
done
#
#Stop services
#
#Extract files
extract_files
#
#Start services
#
#Update Language cache
#perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
#Rebuild module dep's
#depmod -a 2.6.32.45-ipfire >/dev/null 2>&1
#depmod -a 2.6.32.45-ipfire-pae >/dev/null 2>&1
#depmod -a 2.6.32.45-ipfire-xen >/dev/null 2>&1
#Rebuild initrd's because some compat-wireless modules are inside
#/sbin/dracut --force --verbose /boot/ipfirerd-2.6.32.45.img 2.6.32.45-ipfire
#if [ -e /boot/ipfirerd-2.6.32.45-pae.img ]; then
#/sbin/dracut --force --verbose /boot/ipfirerd-2.6.32.45-pae.img 2.6.32.45-ipfire-pae
#fi
#if [ -e /boot/ipfirerd-2.6.32.45-xen.img ]; then
#/sbin/dracut --force --verbose /boot/ipfirerd-2.6.32.45-xen.img 2.6.32.45-ipfire-xen
#fi
sync
# This update need a reboot...
#touch /var/run/need_reboot
#
#Finish
/etc/init.d/fireinfo start
sendprofile
#Don't report the exitcode last command
exit 0

View File

@@ -20,6 +20,7 @@
###############################################################################
use CGI qw(param);
use Crypt::PasswdMD5;
$swroot = "/var/ipfire";
@@ -98,7 +99,10 @@ if ($cgiparams{'SUBMIT'} eq $tr{'advproxy chgwebpwd change password'})
$errormessage = $tr{'advproxy errmsg invalid user'};
goto ERROR;
}
if (!(crypt($cgiparams{'OLD_PASSWORD'}, $cryptpwd) eq $cryptpwd))
if (
!(crypt($cgiparams{'OLD_PASSWORD'}, $cryptpwd) eq $cryptpwd) &&
!(apache_md5_crypt($cgiparams{'OLD_PASSWORD'}, $cryptpwd) eq $cryptpwd)
)
{
$errormessage = $tr{'advproxy errmsg password incorrect'};
goto ERROR;

View File

@@ -67,7 +67,7 @@ if ( $querry[0] =~ "hwtemp"){
print "Content-type: image/png\n\n";
binmode(STDOUT);
&Graphs::updatethermaltempgraph($querry[1]);
}elsif ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" || $querry[0] =~ "xvd??" ){
}elsif ( $querry[0] =~ "sd?" ){
print "Content-type: image/png\n\n";
binmode(STDOUT);
&Graphs::updatehddgraph($querry[0],$querry[1]);
@@ -93,7 +93,7 @@ if ( $querry[0] =~ "hwtemp"){
&General::writehash("${General::swroot}/sensors/settings", \%sensorsettings);
}
my @disks = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`;
my @disks = `ls -1 /sys/block | grep -E '^sd' | sort | uniq`;
foreach (@disks){
my $disk = $_;

View File

@@ -45,9 +45,9 @@ my @querry = split(/\?/,$ENV{'QUERY_STRING'});
$querry[0] = '' unless defined $querry[0];
$querry[1] = 'hour' unless defined $querry[1];
my @devices = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`;
my @devices = `ls -1 /sys/block | grep -E '^sd|^xvd|^vd|^md' | sort | uniq`;
if ( $querry[0] =~ "sd?" || $querry[0] =~ "hd?" || $querry[0] =~ "xvd??"){
if ( $querry[0] =~ "sd?" || $querry[0] =~ "xvd??" || $querry[0] =~ "vd?" || $querry[0] =~ "md*" ){
print "Content-type: image/png\n\n";
binmode(STDOUT);

77
lfs/Crypt-PasswdMD5 Normal file
View File

@@ -0,0 +1,77 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2012 IPFire Team <info@ipfire.org> #
# #
# 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/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 1.3
THISAPP = Crypt-PasswdMD5-$(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 = 368205b1be8c0d4f807afe25d6fbd1ad
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) && perl Makefile.PL
cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# #
# 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 #
@@ -108,15 +108,9 @@ ifeq "$(ROOT)" ""
mv -v /usr/bin/{head,sleep,nice} /bin
ln -sf test /bin/[
#ln -sf ../../bin/install /usr/bin
mv -f /bin/uname /bin/uname.bak
cp -vf $(DIR_SRC)/src/scripts/uname /bin/uname
chmod 755 /bin/uname
dircolors -p > /etc/dircolors
else
rm /tools/bin/hostname
mv -f /tools/bin/uname /tools/bin/uname.bak
cp -vf $(DIR_SRC)/src/scripts/uname /tools/bin/uname
chmod 755 /tools/bin/uname
endif
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# #
# 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 #
@@ -44,15 +44,15 @@ md5 :
###############################################################################
# Installation Details
###############################################################################
IMGinst := /install/images/$(SNAME)-$(VERSION).1gb-ext2.$(MACHINE)-full-core$(CORE).img
IMGinsts := /install/images/$(SNAME)-$(VERSION).1gb-ext2-scon.$(MACHINE)-full-core$(CORE).img
IMGinst := /install/images/$(SNAME)-$(VERSION).2gb-ext2.$(MACHINE)-full-core$(CORE).img
IMGinsts := /install/images/$(SNAME)-$(VERSION).2gb-ext2-scon.$(MACHINE)-full-core$(CORE).img
MNThdd := /install/harddisk
IMGpart := /install/images/part_area
IMGboot := /install/images/bootfs
# don't change SIZEboot this without checking Image size
SIZEboot := 20
IMGroot := /install/images/rootfs
SIZEroot := 500
SIZEroot := 1400
IMGvar := /install/images/varfs
SIZEvar := 430
@@ -90,7 +90,6 @@ endif
echo "HOSTNAME=$(SNAME)" >> $(MNThdd)/var/ipfire/main/settings
echo "THEME=ipfire" >> $(MNThdd)/var/ipfire/main/settings
-touch $(MNThdd)/lib/modules/$(KVER)-ipfire/modules.dep
mv $(MNThdd)/bin/uname.bak $(MNThdd)/bin/uname
mkdir $(MNThdd)/proc
mount --bind /proc $(MNThdd)/proc
mount --bind /dev $(MNThdd)/dev
@@ -116,6 +115,11 @@ ifneq "$(MACHINE_TYPE)" "arm"
cp -f $(MNThdd)/usr/share/grub/i386-pc/* $(MNThdd)/boot/grub/
endif
# Setup symlink for partresize at first boot...
ln -sf ../init.d/partresize $(MNThdd)/etc/rc.d/rcsysinit.d/S25partresize
# Setup symlink for fsresize at second boot...
ln -sf ../init.d/fsresize $(MNThdd)/etc/rc.d/rcsysinit.d/S26fsresize
# Unmount
umount $(MNThdd)/proc
umount $(MNThdd)/dev
@@ -124,12 +128,18 @@ endif
umount $(MNThdd)/var
umount $(MNThdd)
# zerofree the ext3 images to get better compression
# zerofree the ext2 images to get better compression
ifneq "$(MACHINE_TYPE)" "arm"
zerofree $(IMGboot)
-fsck.ext2 -f -y $(IMGboot)
fsck.ext2 -f -y $(IMGboot)
endif
zerofree $(IMGroot)
-fsck.ext2 -f -y $(IMGroot)
fsck.ext2 -f -y $(IMGroot)
zerofree $(IMGvar)
-fsck.ext2 -f -y $(IMGvar)
fsck.ext2 -f -y $(IMGvar)
# Cat to an image
cat $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar) > $(IMGinst)
@@ -176,9 +186,15 @@ endif
# zerofree the ext3 images to get better compression
ifneq "$(MACHINE_TYPE)" "arm"
zerofree $(IMGboot)
-fsck.ext2 -f -y $(IMGboot)
fsck.ext2 -f -y $(IMGboot)
endif
zerofree $(IMGroot)
-fsck.ext2 -f -y $(IMGroot)
fsck.ext2 -f -y $(IMGroot)
zerofree $(IMGvar)
-fsck.ext2 -f -y $(IMGvar)
fsck.ext2 -f -y $(IMGvar)
# Cat to an image
cat $(IMGpart) $(IMGboot) $(IMGroot) $(IMGvar) > $(IMGinsts)

View File

@@ -33,7 +33,7 @@ DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = nagios_nrpe
PAK_VER = 1
PAK_VER = 2
DEPS = "nagios"
@@ -78,9 +78,16 @@ $(subst %,%_MD5,$(objects)) :
$(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 --libexecdir=/usr/lib/nagios \
--with-nrpe-user=nobody --with-nrpe-group=nobody \
--with-nagios-user=nobody --with-nagios-group=nobody
cd $(DIR_APP) && ./configure \
--prefix=/usr \
--libexecdir=/usr/lib/nagios \
--with-nrpe-user=nobody \
--with-nrpe-group=nobody \
--with-nagios-user=nobody \
--with-nagios-group=nobody \
--enable-command-args \
ac_cv_lib_wrap_main=no
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# Copyright (C) 2007-2012 IPFire Team <info@ipfire.org> #
# #
# 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 #
@@ -24,7 +24,7 @@
include Config
VER = 5.8p1
VER = 5.9p1
THISAPP = openssh-$(VER)
DL_FILE = $(THISAPP).tar.gz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 86f5e1c23b4c4845f23b9b7b493fb53d
$(DL_FILE)_MD5 = afe17eee7e98d3b8550cc349834a85d0
install : $(TARGET)

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# Copyright (C) 2007-2012 IPFire Team <info@ipfire.org> #
# #
# 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 #
@@ -24,7 +24,7 @@
include Config
VER = 0.9.8r
VER = 0.9.8t
THISAPP = openssl-$(VER)
DL_FILE = $(THISAPP).tar.gz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 0352932ea863bc02b056cda7c9ac5b79
$(DL_FILE)_MD5 = f5dabb7ffb068eecf245f1b2151df100
install : $(TARGET)

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# Copyright (C) 2007-2012 IPFire Team <info@ipfire.org> #
# #
# 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 #
@@ -24,7 +24,7 @@
include Config
VER = 3.0.8
VER = 3.0.9
THISAPP = rsync-$(VER)
DL_FILE = $(THISAPP).tar.gz
@@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = rsync
PAK_VER = 6
PAK_VER = 7
DEPS = ""
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 0ee8346ce16bdfe4c88a236e94c752b4
$(DL_FILE)_MD5 = 5ee72266fe2c1822333c407e1761b92b
install : $(TARGET)

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# Copyright (C) 2007-2012 IPFire Team <info@ipfire.org> #
# #
# 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 #
@@ -24,7 +24,7 @@
include Config
VER = 1.2.0
VER = 1.2.2
THISAPP = usb-modeswitch-$(VER)
DL_FILE = $(THISAPP).tar.bz2
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 1932ab96d6e3c5e0a6bdfac863338627
$(DL_FILE)_MD5 = 4f3d3b9342b59b488089a8a81abda3ae
install : $(TARGET)

View File

@@ -24,7 +24,7 @@
include Config
VER = 20111023
VER = 20120120
THISAPP = usb-modeswitch-data-$(VER)
DL_FILE = $(THISAPP).tar.bz2
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 6e7cb67d0428bda241600b038ba11aeb
$(DL_FILE)_MD5 = c899cc9c71bb35f3ec600b7cd1455c65
install : $(TARGET)

View File

@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
# Copyright (C) 2007-2011 IPFire Team <info@ipfire.org> #
# #
# 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 #
@@ -115,7 +115,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
echo "HOSTNAME=$(SNAME)" >> $(MNThdd)/var/ipfire/main/settings
echo "THEME=ipfire" >> $(MNThdd)/var/ipfire/main/settings
touch $(MNThdd)/lib/modules/$(KVER)-ipfire-xen/modules.dep
mv $(MNThdd)/bin/uname.bak $(MNThdd)/bin/uname
mkdir $(MNThdd)/proc
mount --bind /proc $(MNThdd)/proc
mount --bind /dev $(MNThdd)/dev

17
make.sh
View File

@@ -17,7 +17,7 @@
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007-2011 IPFire-Team <info@ipfire.org>. #
# Copyright (C) 2007-2012 IPFire Team <info@ipfire.org>. #
# #
############################################################################
#
@@ -25,8 +25,8 @@
NAME="IPFire" # Software name
SNAME="ipfire" # Short name
VERSION="2.11" # Version number
CORE="55" # Core Level (Filename)
PAKFIRE_CORE="54" # Core Level (PAKFIRE)
CORE="57" # Core Level (Filename)
PAKFIRE_CORE="56" # Core Level (PAKFIRE)
GIT_BRANCH=`git status | head -n1 | cut -d" " -f4` # Git Branch
SLOGAN="www.ipfire.org" # Software slogan
CONFIG_ROOT=/var/ipfire # Configuration rootdir
@@ -37,7 +37,7 @@ KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
MACHINE=`uname -m`
GIT_TAG=$(git tag | tail -1) # Git Tag
GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit
TOOLCHAINVER=2
TOOLCHAINVER=3
BUILDMACHINE=$MACHINE
if [ "$MACHINE" = "x86_64" ]; then
@@ -240,7 +240,7 @@ buildtoolchain() {
;;
# ARM
armv5tel:armv5tel|armv5tel:armv5tejl)
armv5tel:armv5tel|armv5tel:armv5tejl|armv5tel:armv7l)
# These are working.
;;
armv5tel:*)
@@ -260,12 +260,11 @@ buildtoolchain() {
NATIVEGCC=`gcc --version | grep GCC | awk {'print $3'}`
export NATIVEGCC GCCmajor=${NATIVEGCC:0:1} GCCminor=${NATIVEGCC:2:1} GCCrelease=${NATIVEGCC:4:1}
ORG_PATH=$PATH
export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
lfsmake1 fake-environ PASS=1
lfsmake1 ccache PASS=1
lfsmake1 make PASS=1
lfsmake1 binutils PASS=1
lfsmake1 gcc PASS=1
export PATH=$BASEDIR/build/usr/local/bin:$BASEDIR/build/tools/bin:$PATH
if [ "${MACHINE_TYPE}" = "arm" ]; then
lfsmake1 linux TOOLS=1 HEADERS=1
else
@@ -273,7 +272,7 @@ buildtoolchain() {
fi
lfsmake1 glibc
lfsmake1 cleanup-toolchain PASS=1
lfsmake1 fake-environ PASS=2
lfsmake1 fake-environ
lfsmake1 tcl
lfsmake1 expect
lfsmake1 dejagnu
@@ -572,6 +571,7 @@ buildipfire() {
ipfiremake Text-Tabs+Wrap
ipfiremake Locale-Country
ipfiremake XML-Parser
ipfiremake Crypt-PasswdMD5
ipfiremake python-setuptools
ipfiremake python-clientform
ipfiremake python-mechanize
@@ -1003,6 +1003,7 @@ downloadsrc)
ERROR=0
for i in *; do
if [ -f "$i" -a "$i" != "Config" ]; then
lfsmakecommoncheck ${i} > /dev/null || continue
make -s -f $i LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
MESSAGE="$i\t " md5 >> $LOGFILE 2>&1
if [ $? -ne 0 ]; then

View File

@@ -0,0 +1,47 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/fsresize
#
# Description : Resize the /var filesystem
#
# Authors : Arne Fitzenreiter - arne_f@ipfire.org
#
# Version : 1.00
#
# Notes :
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Mounting root file system in read/write mode ..."
mount -o remount,rw / > /dev/null
evaluate_retval
boot_mesg "Autoresize /var partition to use the whole drive ..."
# Detect device
ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
DRV=${ROOT::`expr length $ROOT`-1}
boot_mesg " * check filesystem on ${DRV}4 before resize ..."
fsck -f -y ${DRV}4
boot_mesg " * resize ${DRV}4 ..."
resize2fs -p ${DRV}4
evaluate_retval
# Erase symlink, it should run only once
rm -f /etc/rc.d/rcsysinit.d/S26fsresize
sync
exit 0;
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac
# End $rc_base/init.d/26fsresize

View File

@@ -40,6 +40,10 @@ case "${1}" in
;;
stop)
boot_mesg "Syncing discs..."
sync && sync
evaluate_retval
boot_mesg "Unmounting all other currently mounted file systems..."
umount -a -d -r &>/dev/null
evaluate_retval

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Update the static routes.
exec /etc/rc.d/init.d/static-routes start

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Update the static routes.
exec /etc/rc.d/init.d/static-routes start

View File

@@ -0,0 +1,48 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/partresize
#
# Description : Resize the /var partition to the drivesize
#
# Authors : Arne Fitzenreiter - arne_f@ipfire.org
#
# Version : 1.00
#
# Notes :
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Mounting root file system in read/write mode ..."
mount -o remount,rw / > /dev/null
evaluate_retval
# Detect device
ROOT=`mount | grep -m1 " / " | cut -d" " -f1`;
DRV=${ROOT::`expr length $ROOT`-1}
boot_mesg "Change Partition 4 to all free space ..."
echo -e 'd\n4\nn\np\n4\n\n\nw\nq\n' | fdisk ${DRV}
# Erase symlink, it should run only once
rm -f /etc/rc.d/rcsysinit.d/S25partresize
boot_mesg "Rebooting ..."
sync
mount -o remount,ro / > /dev/null
reboot -f
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac
# End $rc_base/init.d/partresize

View File

@@ -7,7 +7,7 @@
case "$1" in
start)
boot_mesg -n "Enabling S.M.A.R.T.: ";
for disk in `find /sys/block/* -maxdepth 0 ! -name sr* ! -name ram* ! -name loop* -exec basename {} \; | sort | uniq`; do
for disk in `ls -1 /sys/block | grep -E '^sd' | sort | uniq`; do
/usr/sbin/smartctl --smart=on /dev/$disk > /dev/nul;
if [ ${?} = 0 ]; then
boot_mesg -n "$SUCCESS$disk$NORMAL ";

View File

@@ -463,9 +463,6 @@ int main(int argc, char *argv[])
/* Save language und local settings */
write_lang_configs(shortlangname);
/* Rename uname */
rename ("/harddisk/bin/uname.bak", "/harddisk/bin/uname");
/* mount proc filesystem */
mysystem("mkdir /harddisk/proc");
mysystem("/bin/mount --bind /proc /harddisk/proc");

View File

@@ -25,12 +25,13 @@ char enableorange[STRING_SIZE] = "off";
char OVPNRED[STRING_SIZE] = "OVPN";
char OVPNBLUE[STRING_SIZE] = "OVPN_BLUE_";
char OVPNORANGE[STRING_SIZE] = "OVPN_ORANGE_";
char WRAPPERVERSION[STRING_SIZE] = "ipfire-2.2.1";
char WRAPPERVERSION[STRING_SIZE] = "ipfire-2.2.2";
struct connection_struct {
char name[STRING_SIZE];
char type[STRING_SIZE];
char proto[STRING_SIZE];
char status[STRING_SIZE];
int port;
struct connection_struct *next;
};
@@ -125,7 +126,9 @@ connection *getConnections() {
}
*resultptr = '\0';
if (count == 2) {
if (count == 1) {
strcpy(conn_curr->status, result);
} else if (count == 2) {
strcpy(conn_curr->name, result);
} else if (count == 4) {
strcpy(conn_curr->type, result);
@@ -423,7 +426,7 @@ void startDaemon(void) {
}
}
void startNet2Net(char *name) {
int startNet2Net(char *name) {
connection *conn = NULL;
connection *conn_iter;
@@ -439,9 +442,16 @@ void startNet2Net(char *name) {
if (conn == NULL) {
fprintf(stderr, "Connection not found.\n");
exit(1);
return 1;
}
if (strcmp(conn->status, "on") != 0) {
fprintf(stderr, "Connection '%s' is not enabled.\n", conn->name);
return 1;
}
fprintf(stderr, "Starting connection %s...\n", conn->name);
char configfile[STRING_SIZE];
snprintf(configfile, STRING_SIZE - 1, CONFIG_ROOT "/ovpn/n2nconf/%s/%s.conf",
conn->name, conn->name);
@@ -450,7 +460,7 @@ void startNet2Net(char *name) {
if (fp == NULL) {
fprintf(stderr, "Could not find configuration file for connection '%s' at '%s'.\n",
conn->name, configfile);
exit(2);
return 2;
}
fclose(fp);
@@ -462,9 +472,11 @@ void startNet2Net(char *name) {
executeCommand(command);
snprintf(command, STRING_SIZE-1, "/usr/sbin/openvpn --config %s", configfile);
executeCommand(command);
return 0;
}
void killNet2Net(char *name) {
int killNet2Net(char *name) {
connection *conn = NULL;
connection *conn_iter;
@@ -480,7 +492,7 @@ void killNet2Net(char *name) {
if (conn == NULL) {
fprintf(stderr, "Connection not found.\n");
exit(1);
return 1;
}
char pidfile[STRING_SIZE];
@@ -488,39 +500,64 @@ void killNet2Net(char *name) {
int pid = readPidFile(pidfile);
if (!pid > 0) {
exit(1);
fprintf(stderr, "Could not read pid file of connection %s.", conn->name);
return 1;
}
fprintf(stderr, "Killing PID %d.\n", pid);
fprintf(stderr, "Killing connection %s (PID %d)...\n", conn->name, pid);
kill(pid, SIGTERM);
char command[STRING_SIZE];
snprintf(command, STRING_SIZE - 1, "/bin/rm -f %s", pidfile);
executeCommand(command);
exit(0);
return 0;
}
void startAllNet2Net() {
int exitcode = 0, _exitcode = 0;
connection *conn = getConnections();
while(conn) {
startNet2Net(conn->name);
/* Skip all connections that are not of type "net" or disabled. */
if ((strcmp(conn->type, "net") != 0) || (strcmp(conn->status, "on") != 0)) {
conn = conn->next;
continue;
}
_exitcode = startNet2Net(conn->name);
conn = conn->next;
if (_exitcode > exitcode) {
exitcode = _exitcode;
}
}
exit(0);
exit(exitcode);
}
void killAllNet2Net() {
int exitcode = 0, _exitcode = 0;
connection *conn = getConnections();
while(conn) {
killNet2Net(conn->name);
/* Skip all connections that are not of type "net". */
if (strcmp(conn->type, "net") != 0) {
conn = conn->next;
continue;
}
_exitcode = killNet2Net(conn->name);
conn = conn->next;
if (_exitcode > exitcode) {
exitcode = _exitcode;
}
}
exit(0);
exit(exitcode);
}
void displayopenvpn(void) {

View File

@@ -22,7 +22,8 @@
# IPFire HDD Shutdown state reader
#
my @devices = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`;
# Also devices that cannot shutdown must be here for mediagraphs.
my @devices = `ls -1 /sys/block | grep -E '^sd|^xvd|^vd|^md' | sort | uniq`;
my $diskstats = "";
my $newdiskstats = "";
my $debug = 1;

View File

@@ -102,7 +102,7 @@ sub updatehdddata{
## Update vnstat
system ('/usr/bin/vnstat -u');
my @disks = `find /sys/block/* -maxdepth 0 ! -name sr* ! -name loop* ! -name ram* -exec basename {} \\; | sort | uniq`;
my @disks = `ls -1 /sys/block | grep -E '^sd|^xvd|^vd|^md' | sort | uniq`;
system("unlink /var/run/hddstatus 2>/dev/null && touch /var/run/hddstatus");
foreach (@disks){
my $disk = $_;

View File

@@ -13,7 +13,7 @@ VARNAME='[A-Za-z_][A-zA-z0-9_]*'
# For the assigned value we only accept a limited number of characters - none
# of which are shell metachars
VARCHARS='A-Za-z0-9=/,._@#+-'
VARCHARS='A-Za-z0-9=/,.:_@#+-'
VARVAL="[${VARCHARS}]*"
sed -ne "s/\(${VARNAME}\)=\(${VARVAL}\)$/\1=\2/p" $1

View File

@@ -1,32 +0,0 @@
#!/bin/sh
uname=
for i in /bin/uname.bak /tools/bin/uname.bak; do
if [ -x "$i" ]; then
uname=${i}
break
fi
done
if [ -z "${uname}" ]; then
exit 127
fi
machine=$(${uname} -m)
kernel=$(${uname} -r)
output=$(${uname} $@)
# Overwrite kernel version to hack kernel 3.x versions.
output=$(sed -e "s/${kernel}/${KVER}/g" <<<${output})
case "${machine}" in
armv*)
echo "${output}" | \
sed -e "s/armv.*l/${MACHINE}/g"
;;
i?86)
echo "${output}" | \
sed -e "s/i.86/${MACHINE}/g"
;;
esac