From 37dd0cd2a2fcfa7c2b65c53ab5627cb7a4a37b40 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Thu, 14 Feb 2013 18:59:42 +0100 Subject: [PATCH 1/7] readhash: allow % character in config files. --- src/scripts/readhash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/readhash b/src/scripts/readhash index cc063a7a2..bffc93fbd 100644 --- a/src/scripts/readhash +++ b/src/scripts/readhash @@ -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 From b34fdcae83378e193a89e7a3ea6329321c5dab08 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Thu, 14 Feb 2013 19:33:37 +0100 Subject: [PATCH 2/7] proxy: allow access to IPFire itself if nets are blocked. This fixes missing pictures on blocking pages. fixes #10138 --- html/cgi-bin/ovpnmain.cgi | 0 html/cgi-bin/proxy.cgi | 10 +++++----- 2 files changed, 5 insertions(+), 5 deletions(-) mode change 100755 => 100644 html/cgi-bin/ovpnmain.cgi diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi old mode 100755 new mode 100644 diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index 0b28c2adf..cc7416a94 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2012 IPFire Team # +# Copyright (C) 2007-2013 IPFire Team # # # # 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 # @@ -3556,15 +3556,15 @@ if ($delaypools) { if ($proxysettings{'NO_PROXY_LOCAL'} eq 'on') { - print FILE "#Prevent internal proxy access to Green\n"; - print FILE "http_access deny IPFire_green_servers !IPFire_green_network\n\n"; + print FILE "#Prevent internal proxy access to Green except IPFire itself\n"; + print FILE "http_access deny IPFire_green_servers !IPFire_ips !IPFire_green_network\n\n"; } if ($proxysettings{'NO_PROXY_LOCAL_BLUE'} eq 'on') { - print FILE "#Prevent internal proxy access from Blue\n"; + print FILE "#Prevent internal proxy access from Blue except IPFire itself\n"; print FILE "http_access allow IPFire_blue_network IPFire_blue_servers\n"; - print FILE "http_access deny IPFire_blue_network IPFire_servers\n\n"; + print FILE "http_access deny IPFire_blue_network !IPFire_ips IPFire_servers\n\n"; } print FILE < Date: Thu, 14 Feb 2013 22:08:30 +0100 Subject: [PATCH 3/7] backupiso: serveral small improvements. fixes #10233 --- config/rootfiles/core/66/filelists/files | 1 + src/scripts/backupiso | 38 +++++++++++++++--------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/config/rootfiles/core/66/filelists/files b/config/rootfiles/core/66/filelists/files index a7f366440..e139bb01a 100644 --- a/config/rootfiles/core/66/filelists/files +++ b/config/rootfiles/core/66/filelists/files @@ -38,6 +38,7 @@ srv/web/ipfire/cgi-bin/services.cgi srv/web/ipfire/cgi-bin/updatexlrator.cgi srv/web/ipfire/cgi-bin/vpnmain.cgi usr/bin/watch +usr/local/bin/backupiso usr/local/bin/makegraphs usr/local/bin/readhash usr/local/bin/scanhd diff --git a/src/scripts/backupiso b/src/scripts/backupiso index 6bea85578..ffbc54fc5 100644 --- a/src/scripts/backupiso +++ b/src/scripts/backupiso @@ -1,11 +1,11 @@ #!/bin/sh -COREVER=`cat /opt/pakfire/db/core/mine` +COREVER=$(cat /opt/pakfire/db/core/mine) # FIXME: edit this lines before release -URL=http://download.ipfire.org/releases/ipfire-2.x/2.11-core$COREVER/ -ISO=ipfire-2.11.i586-full-core$COREVER.iso +URL="http://download.ipfire.org/releases/ipfire-2.x/2.13-core$COREVER/" +ISO="ipfire-2.13.i586-full-core$COREVER.iso" -if [ -z "$1" ]; then +if [ -z $1 ]; then echo usage: $0 backup-file exit fi @@ -17,20 +17,30 @@ cd /var/tmp/backupiso echo "Fetching ${URL}${ISO}" wget --quiet -c ${URL}${ISO} -echo "Fetching ${URL}md5sums.txt" +echo "Fetching ${URL}${ISO}.md5" wget --quiet -O ${ISO}.md5 ${URL}${ISO}.md5 echo "Checking md5 of ${ISO}" md5sum --status -c ${ISO}.md5 -RETVAR="$?" -if [ $RETVAR -eq 0 -o $RETVAR -eq 24 ] - then - echo "md5 is OK" - else - echo "md5 mismatch" - echo "Fetching again ${URL}${ISO}" - wget --quiet -O ${ISO} ${URL}${ISO} +if [ $? -eq 0 -o $? -eq 24 ] +then + echo "md5 is OK" +else + echo "md5 mismatch" + echo "Fetching again ${URL}${ISO}" + wget --quiet -O ${ISO} ${URL}${ISO} + echo "Checking again md5 of ${ISO}" + md5sum --status -c ${ISO}.md5 + if [ $? -eq 0 -o $? -eq 24 ] + then + echo "md5 is OK" + else + echo "md5 mismatch" + echo "aborting backup because md5 mismatch" + exit 1 + fi fi +rm ${ISO}.md5 echo "Remastering iso" mkdir -p backupiso.tmp.${TS} @@ -45,7 +55,7 @@ cp /var/ipfire/backup/${TS}.ipf backupiso.${TS} echo "Running mkisofs" mkisofs -J -r -V "ipfire backup ${TS}" \ -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \ - -c boot/isolinux/boot.catalog backupiso.${TS} > `basename ${ISO} .iso`-${TS}.iso + -c boot/isolinux/boot.catalog backupiso.${TS} > $(basename ${ISO} .iso)-${TS}.iso echo "Cleaning up" rm -rf backupiso.${TS} From 3ab685b34bd439f77c2f90f4c8214b025eb99e1c Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Thu, 14 Feb 2013 22:16:16 +0100 Subject: [PATCH 4/7] IPFire 2.13 final. --- make.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make.sh b/make.sh index 8d42e475d..05be85725 100755 --- a/make.sh +++ b/make.sh @@ -24,9 +24,9 @@ NAME="IPFire" # Software name SNAME="ipfire" # Short name -VERSION="2.13rc2" # Version number -CORE="65" # Core Level (Filename) -PAKFIRE_CORE="65" # Core Level (PAKFIRE) +VERSION="2.13" # Version number +CORE="66" # Core Level (Filename) +PAKFIRE_CORE="66" # 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 From 3b1dbfba60fcfdbe4da096676f8aa32a863e084d Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Fri, 15 Feb 2013 07:30:11 +0100 Subject: [PATCH 5/7] backupiso: don't redownload source iso every time. --- src/scripts/backupiso | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scripts/backupiso b/src/scripts/backupiso index ffbc54fc5..111a35030 100644 --- a/src/scripts/backupiso +++ b/src/scripts/backupiso @@ -15,8 +15,11 @@ TS=$1 mkdir -p /var/tmp/backupiso cd /var/tmp/backupiso -echo "Fetching ${URL}${ISO}" -wget --quiet -c ${URL}${ISO} +if [ ! -e ${ISO} ] +then + echo "Fetching ${URL}${ISO}" + wget --quiet -c ${URL}${ISO} +else echo "Fetching ${URL}${ISO}.md5" wget --quiet -O ${ISO}.md5 ${URL}${ISO}.md5 From 2e8b71ca698238b679cc5098fb9f0def8ebf716b Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Fri, 15 Feb 2013 07:41:50 +0100 Subject: [PATCH 6/7] installer: fix firstsetup and set ext4 fs for unattend. --- src/install+setup/install/main.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/install+setup/install/main.c b/src/install+setup/install/main.c index 14139b5c9..bf0a356e1 100644 --- a/src/install+setup/install/main.c +++ b/src/install+setup/install/main.c @@ -277,7 +277,7 @@ int main(int argc, char *argv[]) ctr[TR_CANCEL], NULL); } else { rc = 1; - fstype = EXT3; + fstype = EXT4; } if (rc == 2) goto EXIT; @@ -596,12 +596,6 @@ EXIT: fclose(flog); newtFinished(); - if (unattended) { - // Remove Setup autorun after boot - if (system("rm -f /harddisk/etc/rc.d/rcsysinit.d/S75firstsetup")) - printf("Unable to disable setup autorun.\n"); - } - if (system("/bin/umount /harddisk/proc")) printf("Unable to umount /harddisk/proc.\n"); } else { From eb7fff99fc287ed76ed39a3d408006bbcf0aabd4 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Fri, 15 Feb 2013 19:15:11 +0100 Subject: [PATCH 7/7] backupiso: disable on arm (we have no iso). and fix syntax error. --- html/cgi-bin/backup.cgi | 10 ++++++++-- src/scripts/backupiso | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/html/cgi-bin/backup.cgi b/html/cgi-bin/backup.cgi index 8c9381496..830775ddf 100644 --- a/html/cgi-bin/backup.cgi +++ b/html/cgi-bin/backup.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2005-2010 IPFire Team # +# Copyright (C) 2005-2013 IPFire Team # # # # 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 # @@ -176,7 +176,13 @@ print < $Lang::tr{'include logfiles'}
$Lang::tr{'exclude logfiles'}
- $Lang::tr{'generate iso'} +END +; +my $MACHINE=`uname -m`; +if ( ! ( $MACHINE =~ "arm" )) { + print" $Lang::tr{'generate iso'}
" +} +print < diff --git a/src/scripts/backupiso b/src/scripts/backupiso index 111a35030..30616a4a5 100644 --- a/src/scripts/backupiso +++ b/src/scripts/backupiso @@ -19,7 +19,8 @@ if [ ! -e ${ISO} ] then echo "Fetching ${URL}${ISO}" wget --quiet -c ${URL}${ISO} -else +fi + echo "Fetching ${URL}${ISO}.md5" wget --quiet -O ${ISO}.md5 ${URL}${ISO}.md5