mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Merge branch 'firewall-fifteen' of ssh://git.ipfire.org/pub/git/people/amarx/ipfire-2.x into firewall-fifteen
This commit is contained in:
@@ -88,15 +88,6 @@ if ( -d "/var/ipfire/langs/${language}/" ) {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
### Read IPFire Buildversion
|
|
||||||
$FIREBUILD = "File not found: firebuild\n";
|
|
||||||
if (open(MYFile, "<${swroot}/firebuild")) {
|
|
||||||
$FIREBUILD = <MYFile>;
|
|
||||||
chomp($FIREBUILD);
|
|
||||||
$FIREBUILD = "(Build: $FIREBUILD)";
|
|
||||||
close(MYFile);
|
|
||||||
};
|
|
||||||
|
|
||||||
require "${swroot}/langs/en.pl";
|
require "${swroot}/langs/en.pl";
|
||||||
require "${swroot}/langs/${language}.pl";
|
require "${swroot}/langs/${language}.pl";
|
||||||
eval `/bin/cat /srv/web/ipfire/html/themes/$settings{'THEME'}/include/functions.pl`;
|
eval `/bin/cat /srv/web/ipfire/html/themes/$settings{'THEME'}/include/functions.pl`;
|
||||||
|
|||||||
@@ -538,10 +538,12 @@ sub get_prot
|
|||||||
}
|
}
|
||||||
}elsif($$hash{$key}[11] eq 'ON' && $SRC_TGT eq ''){
|
}elsif($$hash{$key}[11] eq 'ON' && $SRC_TGT eq ''){
|
||||||
if ($$hash{$key}[14] eq 'TGT_PORT'){
|
if ($$hash{$key}[14] eq 'TGT_PORT'){
|
||||||
if ($$hash{$key}[15] ne ''){
|
if ($$hash{$key}[15] ne '' && $$hash{$key}[8] eq ''){
|
||||||
return "$$hash{$key}[8]";
|
return "TCP,UDP";
|
||||||
}elsif($$hash{$key}[13] ne ''){
|
}elsif($$hash{$key}[13] ne ''){
|
||||||
return "$$hash{$key}[8]";
|
return "$$hash{$key}[8]";
|
||||||
|
}elsif($$hash{$key}[15] ne ''){
|
||||||
|
return "$$hash{$key}[8]";
|
||||||
}else{
|
}else{
|
||||||
return "$$hash{$key}[8]";
|
return "$$hash{$key}[8]";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#etc/system-release
|
|
||||||
#opt/pakfire/db/core/mine
|
|
||||||
#var/ipfire/firebuild
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#usr/bin/as86
|
|
||||||
#usr/bin/as86_encap
|
|
||||||
#var/ipfire/firebuild
|
|
||||||
#etc/system-release
|
|
||||||
#opt/pakfire/db/core/mine
|
|
||||||
@@ -199,5 +199,3 @@ var/ipfire/wakeonlan
|
|||||||
var/ipfire/wireless
|
var/ipfire/wireless
|
||||||
#var/ipfire/wireless/config
|
#var/ipfire/wireless/config
|
||||||
#var/ipfire/wireless/settings
|
#var/ipfire/wireless/settings
|
||||||
var/ipfire/firebuild
|
|
||||||
etc/system-release
|
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
#opt/pakfire
|
|
||||||
opt/pakfire/cache
|
opt/pakfire/cache
|
||||||
#opt/pakfire/db
|
|
||||||
opt/pakfire/db/core
|
|
||||||
opt/pakfire/db/installed
|
opt/pakfire/db/installed
|
||||||
opt/pakfire/db/lists
|
opt/pakfire/db/lists
|
||||||
opt/pakfire/db/meta
|
opt/pakfire/db/meta
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ media/floppy
|
|||||||
media/usbkey
|
media/usbkey
|
||||||
mnt
|
mnt
|
||||||
#opt
|
#opt
|
||||||
|
#opt/pakfire
|
||||||
|
#opt/pakfire/db
|
||||||
|
#opt/pakfire/db/core
|
||||||
|
opt/pakfire/db/core/mine
|
||||||
#root
|
#root
|
||||||
root/.bash_logout
|
root/.bash_logout
|
||||||
root/.bash_profile
|
root/.bash_profile
|
||||||
|
|||||||
77
lfs/as86
77
lfs/as86
@@ -1,77 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# #
|
|
||||||
# IPFire.org - A linux based firewall #
|
|
||||||
# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
|
|
||||||
# #
|
|
||||||
# This program is free software: you can redistribute it and/or modify #
|
|
||||||
# it under the terms of the GNU General Public License as published by #
|
|
||||||
# the Free Software Foundation, either version 3 of the License, or #
|
|
||||||
# (at your option) any later version. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, #
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
|
||||||
# GNU General Public License for more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License #
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
|
||||||
# #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Definitions
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
include Config
|
|
||||||
|
|
||||||
VER = 0.16.17
|
|
||||||
|
|
||||||
THISAPP = as86-$(VER)
|
|
||||||
DL_FILE = $(THISAPP).tar.gz
|
|
||||||
DL_FROM = $(URL_IPFIRE)
|
|
||||||
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
|
||||||
TARGET = $(DIR_INFO)/$(THISAPP)
|
|
||||||
SUP_ARCH = i586
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Top-level Rules
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
objects = $(DL_FILE)
|
|
||||||
|
|
||||||
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
|
||||||
|
|
||||||
$(DL_FILE)_MD5 = 69bca69aec7a272362bc9e050d289d12
|
|
||||||
|
|
||||||
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 $(MAKETUNING)
|
|
||||||
cd $(DIR_APP) && make install
|
|
||||||
@rm -rf $(DIR_APP)
|
|
||||||
@$(POSTBUILD)
|
|
||||||
@@ -52,6 +52,10 @@ md5 :
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||||
|
# Update /etc/system-release, because the string might have changed
|
||||||
|
# since stage2 has been executed..
|
||||||
|
echo "$(SYSTEM_RELEASE)" > /etc/system-release
|
||||||
|
|
||||||
rm -rf /install/cdrom /tmp/*
|
rm -rf /install/cdrom /tmp/*
|
||||||
mkdir -p /install/cdrom/doc
|
mkdir -p /install/cdrom/doc
|
||||||
|
|
||||||
|
|||||||
@@ -121,4 +121,11 @@ $(TARGET) :
|
|||||||
-mkdir -pv /usr/share/doc/licenses/
|
-mkdir -pv /usr/share/doc/licenses/
|
||||||
cp -vf $(DIR_SRC)/doc/COPYING /usr/share/doc/licenses/GPLv3
|
cp -vf $(DIR_SRC)/doc/COPYING /usr/share/doc/licenses/GPLv3
|
||||||
|
|
||||||
|
# System release
|
||||||
|
echo "$(SYSTEM_RELEASE)" > /etc/system-release
|
||||||
|
|
||||||
|
# Pakfire
|
||||||
|
-mkdir -pv /opt/pakfire/db/core
|
||||||
|
echo "$(PAKFIRE_CORE)" > /opt/pakfire/db/core/mine
|
||||||
|
|
||||||
@$(POSTBUILD)
|
@$(POSTBUILD)
|
||||||
|
|||||||
39
make.sh
39
make.sh
@@ -83,6 +83,22 @@ if [ -z $EDITOR ]; then
|
|||||||
[ -z $EDITOR ] && exiterror "You should have installed an editor."
|
[ -z $EDITOR ] && exiterror "You should have installed an editor."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Prepare string for /etc/system-release.
|
||||||
|
SYSTEM_RELEASE="${NAME} ${VERSION} (${MACHINE})"
|
||||||
|
if [ "$(git status -s | wc -l)" == "0" ]; then
|
||||||
|
GIT_STATUS=""
|
||||||
|
else
|
||||||
|
GIT_STATUS="-dirty"
|
||||||
|
fi
|
||||||
|
case "$GIT_BRANCH" in
|
||||||
|
core*|beta?|rc?)
|
||||||
|
SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
prepareenv() {
|
prepareenv() {
|
||||||
############################################################################
|
############################################################################
|
||||||
# #
|
# #
|
||||||
@@ -773,35 +789,12 @@ buildipfire() {
|
|||||||
ipfiremake wavemon
|
ipfiremake wavemon
|
||||||
ipfiremake iptraf-ng
|
ipfiremake iptraf-ng
|
||||||
ipfiremake iotop
|
ipfiremake iotop
|
||||||
echo Build on $HOSTNAME > $BASEDIR/build/var/ipfire/firebuild
|
|
||||||
cat /proc/version >> $BASEDIR/build/var/ipfire/firebuild
|
|
||||||
echo >> $BASEDIR/build/var/ipfire/firebuild
|
|
||||||
git log -1 >> $BASEDIR/build/var/ipfire/firebuild
|
|
||||||
echo >> $BASEDIR/build/var/ipfire/firebuild
|
|
||||||
git status >> $BASEDIR/build/var/ipfire/firebuild
|
|
||||||
echo >> $BASEDIR/build/var/ipfire/firebuild
|
|
||||||
cat /proc/cpuinfo >> $BASEDIR/build/var/ipfire/firebuild
|
|
||||||
echo $PAKFIRE_CORE > $BASEDIR/build/opt/pakfire/db/core/mine
|
|
||||||
if [ "$(git status -s | wc -l)" == "0" ]; then
|
|
||||||
GIT_STATUS=""
|
|
||||||
else
|
|
||||||
GIT_STATUS="-dirty"
|
|
||||||
fi
|
|
||||||
case "$GIT_BRANCH" in
|
|
||||||
core*|beta?|rc?)
|
|
||||||
echo "$NAME $VERSION ($MACHINE) - $GIT_BRANCH$GIT_STATUS" > $BASEDIR/build/etc/system-release
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "$NAME $VERSION ($MACHINE) - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS" > $BASEDIR/build/etc/system-release
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildinstaller() {
|
buildinstaller() {
|
||||||
# Run installer scripts one by one
|
# Run installer scripts one by one
|
||||||
LOGFILE="$BASEDIR/log/_build.installer.log"
|
LOGFILE="$BASEDIR/log/_build.installer.log"
|
||||||
export LOGFILE
|
export LOGFILE
|
||||||
ipfiremake as86
|
|
||||||
ipfiremake memtest
|
ipfiremake memtest
|
||||||
ipfiremake installer
|
ipfiremake installer
|
||||||
installmake strip
|
installmake strip
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
. /etc/sysconfig/rc
|
. /etc/sysconfig/rc
|
||||||
. ${rc_functions}
|
. ${rc_functions}
|
||||||
|
|
||||||
|
FILEDESCRIPTORS="65535"
|
||||||
|
|
||||||
eval $(/usr/local/bin/readhash /var/ipfire/tor/settings)
|
eval $(/usr/local/bin/readhash /var/ipfire/tor/settings)
|
||||||
|
|
||||||
function tor_is_enabled() {
|
function tor_is_enabled() {
|
||||||
@@ -36,6 +38,11 @@ case "${1}" in
|
|||||||
# Setup firewall.
|
# Setup firewall.
|
||||||
setup_firewall
|
setup_firewall
|
||||||
|
|
||||||
|
# Increasing open file descriptors.
|
||||||
|
if [ -n "${FILEDESCRIPTORS}" ]; then
|
||||||
|
ulimit -n "${FILEDESCRIPTORS}"
|
||||||
|
fi
|
||||||
|
|
||||||
boot_mesg "Starting tor..."
|
boot_mesg "Starting tor..."
|
||||||
loadproc /usr/bin/tor \
|
loadproc /usr/bin/tor \
|
||||||
--runasdaemon 1 \
|
--runasdaemon 1 \
|
||||||
|
|||||||
@@ -414,7 +414,8 @@ lfsmake2() {
|
|||||||
chroot $LFS /tools/bin/env -i HOME=/root \
|
chroot $LFS /tools/bin/env -i HOME=/root \
|
||||||
TERM=$TERM PS1='\u:\w\$ ' \
|
TERM=$TERM PS1='\u:\w\$ ' \
|
||||||
PATH=/tools/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
|
PATH=/tools/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
|
||||||
VERSION=$VERSION \
|
VERSION=$VERSION PAKFIRE_CORE="${PAKFIRE_CORE}" \
|
||||||
|
SYSTEM_RELEASE="${SYSTEM_RELEASE}" \
|
||||||
CONFIG_ROOT=$CONFIG_ROOT \
|
CONFIG_ROOT=$CONFIG_ROOT \
|
||||||
NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
|
NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
|
||||||
CFLAGS="$C2FLAGS" CXXFLAGS="$CXX2FLAGS" \
|
CFLAGS="$C2FLAGS" CXXFLAGS="$CXX2FLAGS" \
|
||||||
@@ -521,6 +522,7 @@ installmake() {
|
|||||||
TERM=$TERM PS1='\u:\w\$ ' \
|
TERM=$TERM PS1='\u:\w\$ ' \
|
||||||
PATH=/tools/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin \
|
PATH=/tools/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin \
|
||||||
VERSION=$VERSION \
|
VERSION=$VERSION \
|
||||||
|
SYSTEM_RELEASE="${SYSTEM_RELEASE}" \
|
||||||
CONFIG_ROOT=$CONFIG_ROOT \
|
CONFIG_ROOT=$CONFIG_ROOT \
|
||||||
NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
|
NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \
|
||||||
CFLAGS="-Os" CXXFLAGS="-Os" \
|
CFLAGS="-Os" CXXFLAGS="-Os" \
|
||||||
|
|||||||
Reference in New Issue
Block a user