From f6281b9ae4e87070e2d286469ffdefb876ff930e Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Tue, 30 Sep 2008 13:20:58 +0200 Subject: [PATCH 01/25] adapted backupiso to new build process --- src/scripts/backupiso | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/backupiso b/src/scripts/backupiso index 04b675cca..59f2e6705 100644 --- a/src/scripts/backupiso +++ b/src/scripts/backupiso @@ -3,7 +3,7 @@ # FIXME: edit this lines before release #URL=http://download.ipfire.org/iso/ #ISO=ipfire-2.3-beta4.i586-full.iso -URL=http://www.rowie.at/ipfire/builds/v2.3test/Beta3/20080929-6uhr/ +URL=http://www.rowie.at/ipfire/builds/v2.3test/Beta3/20080930-11uhr/ ISO=ipfire-2.3-test.i586-full.iso if [ -z "$1" ]; then @@ -19,10 +19,10 @@ cd /var/tmp/backupiso echo "Fetching ${URL}${ISO}" wget --quiet -c ${URL}${ISO} echo "Fetching ${URL}md5sums.txt" -wget --quiet -O md5sums.txt ${URL}md5sums.txt +wget --quiet -O ${ISO}.md5 ${URL}${ISO}.md5 echo "Checking md5 of ${ISO}" -cat md5sums.txt | grep iso | tr '\r' '\n' | md5sum --status -c +md5sum --status -c ${ISO}.md5 RETVAR="$?" if [ $RETVAR -eq 0 -o $RETVAR -eq 24 ] then @@ -40,7 +40,7 @@ cp -pr backupiso.tmp.${TS} backupiso.${TS} umount backupiso.tmp.${TS} rm -r backupiso.tmp.${TS} -echo "RESTORE=${TS}.ipf" >> backupiso.${TS}/boot/unattended.conf +echo "RESTORE_FILE=${TS}.ipf" >> backupiso.${TS}/boot/unattended.conf cp /var/ipfire/backup/${TS}.ipf backupiso.${TS} echo "Running mkisofs" From dca095e1d5b0be4b767066d6e9efb5196899a586 Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Tue, 30 Sep 2008 13:59:06 +0200 Subject: [PATCH 02/25] run command to copy restore file --- src/install+setup/install/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/install+setup/install/main.c b/src/install+setup/install/main.c index d4f31b38b..6d6d12cf6 100644 --- a/src/install+setup/install/main.c +++ b/src/install+setup/install/main.c @@ -553,8 +553,9 @@ int main(int argc, char *argv[]) /* Copy restore file from cdrom */ if (unattended && (strlen(restore_file) > 0)) { fprintf(flog, "unattended: Copy restore file\n"); - snprintf(commandstring, STRING_SIZE, + snprintf(commandstring, STRING_SIZE, "cp /cdrom/%s /harddisk/var/ipfire/backup", restore_file); + mysystem(commandstring); } mysystem("umount /cdrom"); From 5dd4242e6f6c75ba16eea6f66b3d4437f6709be2 Mon Sep 17 00:00:00 2001 From: Maniacikarus Date: Tue, 30 Sep 2008 15:29:14 +0200 Subject: [PATCH 03/25] Dropped shm no need for 90% of our users resized lock and added spool --- config/etc/fstab | 4 ++-- config/rootfiles/updater/update.sh | 4 ++-- lfs/qemu | 2 +- src/paks/qremu/install.sh | 28 ++++++++++++++++++++++++++++ src/paks/qremu/uninstall.sh | 29 +++++++++++++++++++++++++++++ src/paks/qremu/update.sh | 26 ++++++++++++++++++++++++++ 6 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 src/paks/qremu/install.sh create mode 100644 src/paks/qremu/uninstall.sh create mode 100644 src/paks/qremu/update.sh diff --git a/config/etc/fstab b/config/etc/fstab index a82aaeb94..a62a74c15 100644 --- a/config/etc/fstab +++ b/config/etc/fstab @@ -8,7 +8,7 @@ DEVICE4 /var FSTYPE defaults 1 1 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 devpts /dev/pts devpts gid=4,mode=620 0 0 -shm /dev/shm tmpfs defaults,size=25% 0 0 none /tmp tmpfs defaults,size=128M 0 0 none /var/log/rrd tmpfs defaults,size=64M 0 0 -none /var/lock tmpfs defaults,size=32M 0 0 +none /var/lock tmpfs defaults,size=16M 0 0 +none /var/spool tmpfs defaults,size=16M 0 0 diff --git a/config/rootfiles/updater/update.sh b/config/rootfiles/updater/update.sh index 6ed28e0cd..18593dcde 100755 --- a/config/rootfiles/updater/update.sh +++ b/config/rootfiles/updater/update.sh @@ -153,10 +153,10 @@ grub-install --no-floppy ${ROOT::`expr length $ROOT`-1} # Update fstab # grep -v "tmpfs" /etc/fstab > /tmp/fstab.tmp -echo shm /dev/shm tmpfs defaults,size=25% 0 0 >> /tmp/fstab.tmp echo none /tmp tmpfs defaults,size=128M 0 0 >> /tmp/fstab.tmp echo none /var/log/rrd tmpfs defaults,size=64M 0 0 >> /tmp/fstab.tmp -echo none /var/lock tmpfs defaults,size=32M 0 0 >> /tmp/fstab.tmp +echo none /var/lock tmpfs defaults,size=16M 0 0 >> /tmp/fstab.tmp +echo none /var/spool tmpfs defaults,size=16M 0 0 >> /tmp/fstab.tmp mv /tmp/fstab.tmp /etc/fstab # # Change version of Pakfire.conf diff --git a/lfs/qemu b/lfs/qemu index 271bafa6a..5e7d980d2 100644 --- a/lfs/qemu +++ b/lfs/qemu @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = qemu -PAK_VER = 2 +PAK_VER = 3 DEPS = "sdl" diff --git a/src/paks/qremu/install.sh b/src/paks/qremu/install.sh new file mode 100644 index 000000000..052127b6c --- /dev/null +++ b/src/paks/qremu/install.sh @@ -0,0 +1,28 @@ +#!/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 2 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) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files +restore_backup ${NAME} +echo none /dev/shm tmpfs defaults,size=256M 0 0 >> /etc/fstab +start_service --background ${NAME} diff --git a/src/paks/qremu/uninstall.sh b/src/paks/qremu/uninstall.sh new file mode 100644 index 000000000..f1ed44216 --- /dev/null +++ b/src/paks/qremu/uninstall.sh @@ -0,0 +1,29 @@ +#!/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 2 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) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +stop_service ${NAME} +grep -v "/dev/shm" /etc/fstab > /tmp/fstab.tmp +mv /tmp/fstab.tmp /etc/fstab +make_backup ${NAME} +remove_files diff --git a/src/paks/qremu/update.sh b/src/paks/qremu/update.sh new file mode 100644 index 000000000..89c40d0d7 --- /dev/null +++ b/src/paks/qremu/update.sh @@ -0,0 +1,26 @@ +#!/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 2 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) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh From 4f0866db3cf548e1c4038582030b7f70a395eba3 Mon Sep 17 00:00:00 2001 From: Maniacikarus Date: Tue, 30 Sep 2008 15:31:01 +0200 Subject: [PATCH 04/25] Let shm be shm --- src/paks/qremu/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paks/qremu/install.sh b/src/paks/qremu/install.sh index 052127b6c..a9f7321c0 100644 --- a/src/paks/qremu/install.sh +++ b/src/paks/qremu/install.sh @@ -24,5 +24,5 @@ . /opt/pakfire/lib/functions.sh extract_files restore_backup ${NAME} -echo none /dev/shm tmpfs defaults,size=256M 0 0 >> /etc/fstab +echo shm /dev/shm tmpfs defaults,size=256M 0 0 >> /etc/fstab start_service --background ${NAME} From d31cb6f04475450af6338bd9a260de5ff3996720 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Tue, 30 Sep 2008 20:25:36 +0200 Subject: [PATCH 05/25] Add some changed files to updater removed ipp2p rootfile --- config/rootfiles/common/ipp2p | 3 --- config/rootfiles/updater/filelists/files | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 config/rootfiles/common/ipp2p diff --git a/config/rootfiles/common/ipp2p b/config/rootfiles/common/ipp2p deleted file mode 100644 index 24bf5f54a..000000000 --- a/config/rootfiles/common/ipp2p +++ /dev/null @@ -1,3 +0,0 @@ -#lib/modules/2.6.16/kernel/net/ipv4/netfilter/ipt_ipp2p.ko -#lib/iptables/libipt_ipp2p.so # doesnt work with kernel 2.6.23.17 -#lib/modules/2.6.16-smp/kernel/net/ipv4/netfilter/ipt_ipp2p.ko diff --git a/config/rootfiles/updater/filelists/files b/config/rootfiles/updater/filelists/files index a470388c5..d783c81bf 100644 --- a/config/rootfiles/updater/filelists/files +++ b/config/rootfiles/updater/filelists/files @@ -21,6 +21,8 @@ usr/local/bin/getiptstate usr/local/bin/makegraphs usr/local/bin/squidctrl usr/local/bin/setddns.pl +srv/web/ipfire/cgi-bin/backup.cgi +srv/web/ipfire/cgi-bin/ovpn.cgi srv/web/ipfire/cgi-bin/credits.cgi srv/web/ipfire/cgi-bin/speed.cgi srv/web/ipfire/cgi-bin/traffic.cgi @@ -46,5 +48,6 @@ var/ipfire/updatexlrator/bin/ usr/sbin/updxlrator var/ipfire/langs usr/local/bin/qosd +usr/local/bin/backupiso usr/bin/mkisofs usr/bin/cdrecord From eafc1fc28a041fa9c3535a11b8224db341f572ef Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Tue, 30 Sep 2008 20:29:37 +0200 Subject: [PATCH 06/25] Fix a typo at qemu pak --- src/paks/{qremu => qemu}/install.sh | 0 src/paks/{qremu => qemu}/uninstall.sh | 0 src/paks/{qremu => qemu}/update.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename src/paks/{qremu => qemu}/install.sh (100%) rename src/paks/{qremu => qemu}/uninstall.sh (100%) rename src/paks/{qremu => qemu}/update.sh (100%) diff --git a/src/paks/qremu/install.sh b/src/paks/qemu/install.sh similarity index 100% rename from src/paks/qremu/install.sh rename to src/paks/qemu/install.sh diff --git a/src/paks/qremu/uninstall.sh b/src/paks/qemu/uninstall.sh similarity index 100% rename from src/paks/qremu/uninstall.sh rename to src/paks/qemu/uninstall.sh diff --git a/src/paks/qremu/update.sh b/src/paks/qemu/update.sh similarity index 100% rename from src/paks/qremu/update.sh rename to src/paks/qemu/update.sh From 3681428934d7440705f0407870b1b089ef4f3fc4 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Tue, 30 Sep 2008 20:36:00 +0200 Subject: [PATCH 07/25] Fix collectd check/restore to the ramdisk --- src/initscripts/init.d/collectd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/initscripts/init.d/collectd b/src/initscripts/init.d/collectd index f0f559ddb..98573749e 100644 --- a/src/initscripts/init.d/collectd +++ b/src/initscripts/init.d/collectd @@ -24,12 +24,12 @@ case "$1" in fi fi + /etc/init.d/collectd restore + if [ ! -e $RRDLOG.bak/ ]; then mkdir $RRDLOG.bak/ fi - /etc/init.d/collectd restore - boot_mesg -n "Loading Sensor Modules..." for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do modprobe $modul > /dev/null 2>&1; From 26d50e07a475400024204dd47807bc0ee06a01f5 Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Tue, 30 Sep 2008 20:41:42 +0200 Subject: [PATCH 08/25] add some changed files to updater --- config/rootfiles/updater/filelists/files | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/rootfiles/updater/filelists/files b/config/rootfiles/updater/filelists/files index d783c81bf..aea3d8552 100644 --- a/config/rootfiles/updater/filelists/files +++ b/config/rootfiles/updater/filelists/files @@ -22,7 +22,7 @@ usr/local/bin/makegraphs usr/local/bin/squidctrl usr/local/bin/setddns.pl srv/web/ipfire/cgi-bin/backup.cgi -srv/web/ipfire/cgi-bin/ovpn.cgi +srv/web/ipfire/cgi-bin/ovpnmain.cgi srv/web/ipfire/cgi-bin/credits.cgi srv/web/ipfire/cgi-bin/speed.cgi srv/web/ipfire/cgi-bin/traffic.cgi @@ -38,6 +38,7 @@ srv/web/ipfire/cgi-bin/media.cgi srv/web/ipfire/cgi-bin/memory.cgi srv/web/ipfire/cgi-bin/ids.cgi srv/web/ipfire/cgi-bin/ddns.cgi +var/ipfire/backup/bin/backup.pl var/ipfire/sensors/ var/ipfire/graphs.pl var/ipfire/firebuild From 153b870be80fff4fa944c34aa7875c6de35f323d Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Wed, 1 Oct 2008 14:58:59 +0200 Subject: [PATCH 09/25] added some vim syntax files --- config/rootfiles/common/vim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/rootfiles/common/vim b/config/rootfiles/common/vim index 7f22403d0..36f187c97 100644 --- a/config/rootfiles/common/vim +++ b/config/rootfiles/common/vim @@ -617,7 +617,7 @@ usr/bin/vim #usr/share/vim/vim70/syntax/blank.vim #usr/share/vim/vim70/syntax/bst.vim #usr/share/vim/vim70/syntax/btm.vim -#usr/share/vim/vim70/syntax/c.vim +usr/share/vim/vim70/syntax/c.vim #usr/share/vim/vim70/syntax/calendar.vim #usr/share/vim/vim70/syntax/catalog.vim #usr/share/vim/vim70/syntax/cdl.vim @@ -667,7 +667,7 @@ usr/bin/vim #usr/share/vim/vim70/syntax/desktop.vim #usr/share/vim/vim70/syntax/dictconf.vim #usr/share/vim/vim70/syntax/dictdconf.vim -#usr/share/vim/vim70/syntax/diff.vim +usr/share/vim/vim70/syntax/diff.vim #usr/share/vim/vim70/syntax/dircolors.vim #usr/share/vim/vim70/syntax/diva.vim #usr/share/vim/vim70/syntax/django.vim @@ -712,7 +712,7 @@ usr/bin/vim #usr/share/vim/vim70/syntax/forth.vim #usr/share/vim/vim70/syntax/fortran.vim #usr/share/vim/vim70/syntax/foxpro.vim -#usr/share/vim/vim70/syntax/fstab.vim +usr/share/vim/vim70/syntax/fstab.vim #usr/share/vim/vim70/syntax/fvwm.vim #usr/share/vim/vim70/syntax/fvwm2m4.vim #usr/share/vim/vim70/syntax/gdb.vim @@ -856,7 +856,7 @@ usr/bin/vim #usr/share/vim/vim70/syntax/passwd.vim #usr/share/vim/vim70/syntax/pcap.vim #usr/share/vim/vim70/syntax/pccts.vim -#usr/share/vim/vim70/syntax/perl.vim +usr/share/vim/vim70/syntax/perl.vim #usr/share/vim/vim70/syntax/pf.vim #usr/share/vim/vim70/syntax/pfmain.vim #usr/share/vim/vim70/syntax/php.vim @@ -886,7 +886,7 @@ usr/bin/vim #usr/share/vim/vim70/syntax/ptcap.vim #usr/share/vim/vim70/syntax/purifylog.vim #usr/share/vim/vim70/syntax/pyrex.vim -#usr/share/vim/vim70/syntax/python.vim +usr/share/vim/vim70/syntax/python.vim #usr/share/vim/vim70/syntax/qf.vim #usr/share/vim/vim70/syntax/quake.vim #usr/share/vim/vim70/syntax/r.vim @@ -927,7 +927,7 @@ usr/bin/vim #usr/share/vim/vim70/syntax/sgml.vim #usr/share/vim/vim70/syntax/sgmldecl.vim #usr/share/vim/vim70/syntax/sgmllnx.vim -#usr/share/vim/vim70/syntax/sh.vim +usr/share/vim/vim70/syntax/sh.vim #usr/share/vim/vim70/syntax/sicad.vim #usr/share/vim/vim70/syntax/sieve.vim #usr/share/vim/vim70/syntax/simula.vim @@ -973,12 +973,12 @@ usr/bin/vim #usr/share/vim/vim70/syntax/st.vim #usr/share/vim/vim70/syntax/stata.vim #usr/share/vim/vim70/syntax/stp.vim -#usr/share/vim/vim70/syntax/strace.vim +usr/share/vim/vim70/syntax/strace.vim #usr/share/vim/vim70/syntax/sudoers.vim #usr/share/vim/vim70/syntax/svn.vim #usr/share/vim/vim70/syntax/syncolor.vim #usr/share/vim/vim70/syntax/synload.vim -#usr/share/vim/vim70/syntax/syntax.vim +usr/share/vim/vim70/syntax/syntax.vim #usr/share/vim/vim70/syntax/sysctl.vim #usr/share/vim/vim70/syntax/tads.vim #usr/share/vim/vim70/syntax/tags.vim From 9428960b88e9ca6c8dd492e3cfa16cedc3f31e1d Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Wed, 1 Oct 2008 14:59:34 +0200 Subject: [PATCH 10/25] added unattended option to isolinux --- config/syslinux/options.msg | 2 +- config/syslinux/syslinux.cfg | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/syslinux/options.msg b/config/syslinux/options.msg index d1a977d4f..54d6e0836 100644 --- a/config/syslinux/options.msg +++ b/config/syslinux/options.msg @@ -9,7 +9,7 @@ - To test the memory in your system type: 04memtest 07. - + - To install in unattended mode, type: unattended . diff --git a/config/syslinux/syslinux.cfg b/config/syslinux/syslinux.cfg index 0aa1ec06d..15af66e4a 100644 --- a/config/syslinux/syslinux.cfg +++ b/config/syslinux/syslinux.cfg @@ -11,6 +11,9 @@ LABEL novga LABEL dma KERNEL vmlinuz APPEND initrd=instroot root=/dev/ram0 ramdisk_size=16384 vga=791 splash=silent ro +LABEL unattended + KERNEL vmlinuz + APPEND ide=nodma initrd=instroot root=/dev/ram0 ramdisk_size=16384 vga=791 splash=silent unattended ro LABEL memtest KERNEL memtest APPEND - From fba21bd52c40df4467355edabc4253674e6c8f1b Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Wed, 1 Oct 2008 15:00:13 +0200 Subject: [PATCH 11/25] fix some settings for unattended install --- config/syslinux/unattended.conf | 1 - src/install+setup/install/unattended.c | 2 +- src/scripts/backupiso | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config/syslinux/unattended.conf b/config/syslinux/unattended.conf index 39f6bca25..5adf27900 100644 --- a/config/syslinux/unattended.conf +++ b/config/syslinux/unattended.conf @@ -10,4 +10,3 @@ GREEN_NETADDRESS=192.168.180.0 GREEN_BROADCAST=192.168.180.255 ROOT_PASSWORD=ipfire ADMIN_PASSWORD=ipfire -RESTORE_FILE= diff --git a/src/install+setup/install/unattended.c b/src/install+setup/install/unattended.c index 754946aa2..95ee6698e 100644 --- a/src/install+setup/install/unattended.c +++ b/src/install+setup/install/unattended.c @@ -150,7 +150,7 @@ int unattended_setup(struct keyvalue *unattendedkv) { if (strlen(restore_file) > 0) { fprintf(flog, "unattended: Restoring Backup\n"); snprintf(commandstring, STRING_SIZE, - "cd /harddisk && /bin/tar -xvz --preserve -f /harddisk/var/ipfire/%s", restore_file); + "cd /harddisk && /bin/tar -xvz --preserve -f /harddisk/var/ipfire/backup/%s", restore_file); if (mysystem(commandstring)) { errorbox("unattended: ERROR restoring backup"); } diff --git a/src/scripts/backupiso b/src/scripts/backupiso index 59f2e6705..d579e5098 100644 --- a/src/scripts/backupiso +++ b/src/scripts/backupiso @@ -3,7 +3,7 @@ # FIXME: edit this lines before release #URL=http://download.ipfire.org/iso/ #ISO=ipfire-2.3-beta4.i586-full.iso -URL=http://www.rowie.at/ipfire/builds/v2.3test/Beta3/20080930-11uhr/ +URL=http://www.rowie.at/ipfire/builds/v2.3test/Beta3/20081001-10uhr/ ISO=ipfire-2.3-test.i586-full.iso if [ -z "$1" ]; then From 37345842097ea83b8a41d6de7bba650848a73aa8 Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Wed, 1 Oct 2008 15:00:31 +0200 Subject: [PATCH 12/25] added tar gzip support to busybox --- config/uClibc/busybox.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/uClibc/busybox.config b/config/uClibc/busybox.config index aa880abe7..dfe2a3003 100644 --- a/config/uClibc/busybox.config +++ b/config/uClibc/busybox.config @@ -88,7 +88,7 @@ CONFIG_TAR=y CONFIG_FEATURE_TAR_BZIP2=y # CONFIG_FEATURE_TAR_LZMA is not set # CONFIG_FEATURE_TAR_FROM is not set -# CONFIG_FEATURE_TAR_GZIP is not set +CONFIG_FEATURE_TAR_GZIP=y # CONFIG_FEATURE_TAR_COMPRESS is not set CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y From 2c6a4efbbb5b448ca91a54eb8b24de6f0fc4f1ab Mon Sep 17 00:00:00 2001 From: Maniacikarus Date: Wed, 1 Oct 2008 15:15:57 +0200 Subject: [PATCH 13/25] Fixed Control Char --- config/syslinux/options.msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/syslinux/options.msg b/config/syslinux/options.msg index 54d6e0836..a0b756b4b 100644 --- a/config/syslinux/options.msg +++ b/config/syslinux/options.msg @@ -9,7 +9,7 @@ - To test the memory in your system type: 04memtest 07. - - To install in unattended mode, type: unattended . + - To install in unattended mode, type: 04unattended 07. From 5468f10298ada324b7472d0e49bb09e615c6da5a Mon Sep 17 00:00:00 2001 From: Maniacikarus Date: Wed, 1 Oct 2008 15:18:04 +0200 Subject: [PATCH 14/25] Modified makegraphs --- src/scripts/makegraphs | 185 ++++++++++++++++++++--------------------- 1 file changed, 90 insertions(+), 95 deletions(-) diff --git a/src/scripts/makegraphs b/src/scripts/makegraphs index 5369ab9d9..f8cd865df 100644 --- a/src/scripts/makegraphs +++ b/src/scripts/makegraphs @@ -1,26 +1,24 @@ #!/usr/bin/perl -############################################################################ -# # -# 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 # -# # -# Copyright (C) 2004-01-19 Mark Wormgoor . # -# # -############################################################################ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2008 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 . # +# # +############################################################################### use strict; #use warnings; @@ -40,97 +38,94 @@ my %mainsettings = (); &General::readhash("${General::swroot}/main/settings", \%mainsettings); &General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); -sub updatehdddata -{ - my $disk = $_[0]; - my $standby; - my @array = split(/\//,$disk); +sub updatehdddata{ + my $disk = $_[0]; + my $standby; + my @array = split(/\//,$disk); - if ( ! -e "$mainsettings{'RRDLOG'}/hddshutdown-".$array[$#array].".rrd"){ - # database did not exist -> create - RRDs::create ("$mainsettings{'RRDLOG'}/hddshutdown-".$array[$#array].".rrd", "--step=300", - "DS:standby:GAUGE:600:0:1", - "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 hddshutdown-".$array[$#array].": $ERROR\n" if $ERROR; - } + if ( ! -e "$mainsettings{'RRDLOG'}/hddshutdown-".$array[$#array].".rrd"){ + # database did not exist -> create + RRDs::create ("$mainsettings{'RRDLOG'}/hddshutdown-".$array[$#array].".rrd", "--step=300", + "DS:standby:GAUGE:600:0:1", + "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 hddshutdown-".$array[$#array].": $ERROR\n" if $ERROR; + } - if (-e "/tmp/hddshutdown-".$array[$#array]) {$standby = 1;} - else {$standby = 0;} + if (-e "/tmp/hddshutdown-".$array[$#array]) {$standby = 1;} + else {$standby = 0;} - RRDs::update ("$mainsettings{'RRDLOG'}/hddshutdown-".$array[$#array].".rrd", "-t", "standby", "N:$standby"); - $ERROR = RRDs::error; - print "Error in RRD::update for hddshutdown-".$array[$#array].": $ERROR\n" if $ERROR; + RRDs::update ("$mainsettings{'RRDLOG'}/hddshutdown-".$array[$#array].".rrd", "-t", "standby", "N:$standby"); + $ERROR = RRDs::error; + print "Error in RRD::update for hddshutdown-".$array[$#array].": $ERROR\n" if $ERROR; - if ( ! -e "$mainsettings{'RRDLOG'}/hddtemp-".$array[$#array].".rrd"){ - # database did not exist -> create - RRDs::create ("$mainsettings{'RRDLOG'}/hddtemp-".$array[$#array].".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-".$array[$#array].": $ERROR\n" if $ERROR; - } + if ( ! -e "$mainsettings{'RRDLOG'}/hddtemp-".$array[$#array].".rrd"){ + # database did not exist -> create + RRDs::create ("$mainsettings{'RRDLOG'}/hddtemp-".$array[$#array].".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-".$array[$#array].": $ERROR\n" if $ERROR; + } - # Temperaturlesen w�rde die Platte aufwecken!!! - if (!$standby){ - $temp = 0; - my $smart_output = ''; - system("$path_smartctl -iHA -d ata /dev/$disk > /var/log/smartctl_out_hddtemp-$disk"); - if ( -e "/var/log/smartctl_out_hddtemp-".$array[$#array] ){ - my $hdd_output = `cat /var/log/smartctl_out_hddtemp-$array[$#array] | grep Temperature_`; - my @t = split(/\s+/,$hdd_output); - $temp = $t[9]; - }else{$temp = 0;} - print "Temperature for ".$array[$#array]."->".$temp."<-\n"; - # Nur ins RDD wenn nicht 0 (sonst klappt die min Anzeige nicht) - if ($temp){ - RRDs::update ("$mainsettings{'RRDLOG'}/hddtemp-".$array[$#array].".rrd", "-t", "temperature", "N:$temp"); - $ERROR = RRDs::error; - print "Error in RRD::update for hdd-".$array[$#array].": $ERROR\n" if $ERROR; - } - } + # Temperaturlesen w�rde die Platte aufwecken!!! + if (!$standby){ + $temp = 0; + my $smart_output = ''; + system("$path_smartctl -iHA -d ata /dev/$disk > /tmp/smartctl_out_hddtemp-$disk"); + if ( -e "/tmp/smartctl_out_hddtemp-".$array[$#array] ){ + my $hdd_output = `cat /tmp/smartctl_out_hddtemp-$array[$#array] | grep Temperature_`; + my @t = split(/\s+/,$hdd_output); + $temp = $t[9]; + }else{$temp = 0;} + print "Temperature for ".$array[$#array]."->".$temp."<-\n"; + # Nur ins RDD wenn nicht 0 (sonst klappt die min Anzeige nicht) + if ($temp){ + RRDs::update ("$mainsettings{'RRDLOG'}/hddtemp-".$array[$#array].".rrd", "-t", "temperature", "N:$temp"); + $ERROR = RRDs::error; + print "Error in RRD::update for hdd-".$array[$#array].": $ERROR\n" if $ERROR; + } + } } -## Update ipac logs -#system ('/usr/sbin/fetchipac'); ## Update vnstat system ('/usr/bin/vnstat -u'); my @disks = `kudzu -qps -c HD | grep device: | cut -d" " -f2 | sort | uniq`; system("unlink /tmp/hddstatus && touch /tmp/hddstatus"); foreach (@disks){ - my $disk = $_; - chomp $disk; - print "Working on disk ".$disk.".\n"; + my $disk = $_; + chomp $disk; + print "Working on disk ".$disk.".\n"; - my $status = ""; - my $diskstats = ""; - my $newdiskstats = ""; - my @array = split(/\//,$disk); + my $status = ""; + my $diskstats = ""; + my $newdiskstats = ""; + my @array = split(/\//,$disk); - $diskstats = `cat /tmp/hddstats-$array[$#array]`; - chomp $diskstats; - my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -2 | head -1 | awk '{ print \$5","\$6}'`; - chomp $newdiskstats; - my $status = `hdparm -C /dev/$disk | tail -1 | cut -d: -f2`; - chomp $status; + $diskstats = `cat /tmp/hddstats-$array[$#array]`; + chomp $diskstats; + my $newdiskstats = `/usr/bin/iostat -d -t $disk | tail -2 | head -1 | awk '{ print \$5","\$6}'`; + chomp $newdiskstats; + my $status = `hdparm -C /dev/$disk | tail -1 | cut -d: -f2`; + chomp $status; - if ($status !~/standby/ || $diskstats ne $newdiskstats){ - if (-e "/tmp/hddshutdown-".$array[$#array]){system("unlink /tmp/hddshutdown-".$array[$#array]);} - } + if ($status !~/standby/ || $diskstats ne $newdiskstats){ + if (-e "/tmp/hddshutdown-".$array[$#array]){system("unlink /tmp/hddshutdown-".$array[$#array]);} + } - if (-e "/tmp/hddshutdown-".$array[$#array]){$status = " standby\n";} - else{$status = " active\n";} + if (-e "/tmp/hddshutdown-".$array[$#array]){$status = " standby\n";} + else{$status = " active\n";} - open(DATEI, ">>/tmp/hddstatus") || die "Datei nicht gefunden"; - print DATEI $disk."-".$status; - close(DATEI); + open(DATEI, ">>/tmp/hddstatus") || die "Datei nicht gefunden"; + print DATEI $disk."-".$status; + close(DATEI); - updatehdddata($disk); + updatehdddata($disk); } From 19e44e3e440fe76dd0270ee50816fb0bb3d13d69 Mon Sep 17 00:00:00 2001 From: Maniacikarus Date: Wed, 1 Oct 2008 15:18:41 +0200 Subject: [PATCH 15/25] Upgraded lm_sensors to detect more hardware --- config/rootfiles/common/lm_sensors | 2 +- lfs/lm_sensors | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/rootfiles/common/lm_sensors b/config/rootfiles/common/lm_sensors index 1c6ed6574..99fc39b8d 100644 --- a/config/rootfiles/common/lm_sensors +++ b/config/rootfiles/common/lm_sensors @@ -16,7 +16,7 @@ usr/lib/libsensors.so.4.0.2 #usr/man/man8/isadump.8 #usr/man/man8/isaset.8 #usr/man/man8/pwmconfig.8 -#usr/local/man/man8/sensors-detect.8 +#usr/man/man8/sensors-detect.8 usr/sbin/fancontrol usr/sbin/isadump usr/sbin/isaset diff --git a/lfs/lm_sensors b/lfs/lm_sensors index cf73c79e6..cab054e8d 100644 --- a/lfs/lm_sensors +++ b/lfs/lm_sensors @@ -24,7 +24,7 @@ include Config -VER = 3.0.2 +VER = 3.0.3 THISAPP = lm_sensors-$(VER) DL_FILE = $(THISAPP).tar.bz2 @@ -40,7 +40,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = 5b210ba9cc01f00161c438fd618484e5 +$(DL_FILE)_MD5 = e88b236228ac2a50821217015b8fd0fa install : $(TARGET) From 20f92a61f5d2a70a3eb2be27f6510c4a76848f9c Mon Sep 17 00:00:00 2001 From: Maniacikarus Date: Wed, 1 Oct 2008 15:31:59 +0200 Subject: [PATCH 16/25] Change collectd backup period to one a day Changed hddshutdown to half an hour --- config/cron/crontab | 4 ++-- config/rootfiles/updater/update.sh | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/cron/crontab b/config/cron/crontab index 004369b1a..2d7552bed 100644 --- a/config/cron/crontab +++ b/config/cron/crontab @@ -22,7 +22,7 @@ HOME=/ # Make some nice graphs */5 * * * * /usr/local/bin/makegraphs >/dev/null -01 * * * * /etc/init.d/collectd backup >/dev/null +* 05 * * * /etc/init.d/collectd backup >/dev/null # Force update the dynamic dns registration once a week # Force update even if IP has not changed once a month if 'minimize update' selected in GUI @@ -37,7 +37,7 @@ HOME=/ find /var/log/logwatch/ -ctime +${LOGWATCH_KEEP=56} -exec rm -f '{}' ';' # hddshutdown -02 * * * * /usr/local/bin/hddshutdown >/dev/null +*/30 * * * * /usr/local/bin/hddshutdown >/dev/null # connection-scheduler */5 * * * * /usr/local/bin/connscheduler timer > /dev/null diff --git a/config/rootfiles/updater/update.sh b/config/rootfiles/updater/update.sh index 18593dcde..582a59890 100755 --- a/config/rootfiles/updater/update.sh +++ b/config/rootfiles/updater/update.sh @@ -171,9 +171,11 @@ echo \\n running on \\s \\r \\m >> /etc/issue # # Update crontab # -grep -v "ipacsum" /var/spool/cron/root.orig > /tmp/root.orig.tmp +grep -v "ipacsum" /var/spool/cron/root.orig | grep -v "hddshutdown" > /tmp/root.orig.tmp echo "# Backup collectd files" >> /tmp/root.orig.tmp -echo "01 * * * * /etc/init.d/collectd backup >/dev/null" >> /tmp/root.orig.tmp +echo "* 05 * * * /etc/init.d/collectd backup >/dev/null" >> /tmp/root.orig.tmp +echo "# hddshutdown" >> /tmp/root.orig.tmp +echo "*/30 * * * * /usr/local/bin/hddshutdown >/dev/null" >> /tmp/root.orig.tmp mv /tmp/root.orig.tmp /var/spool/cron/root.orig chmod 600 /var/spool/cron/root.orig chown root:cron /var/spool/cron/root.orig From b90a7e56feed1e4dbe7c2909809e4e4a8422fdc6 Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Wed, 1 Oct 2008 15:43:22 +0200 Subject: [PATCH 17/25] added option to download and delete iso backup --- config/backup/backup.pl | 3 +++ html/cgi-bin/backup.cgi | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 5633569fd..e67a958f4 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -76,6 +76,9 @@ elsif ($ARGV[0] eq 'addonbackup') { elsif ($ARGV[0] =~ /ipf$/ ) { system("rm /var/ipfire/backup/$ARGV[0]"); } +elsif ($ARGV[0] =~ /iso$/ ) { + system("rm /var/tmp/backupiso/$ARGV[0]"); +} elsif ($ARGV[0] eq '') { printf "No argument given, please use \n" } diff --git a/html/cgi-bin/backup.cgi b/html/cgi-bin/backup.cgi index 0592ef82c..eacfd789b 100644 --- a/html/cgi-bin/backup.cgi +++ b/html/cgi-bin/backup.cgi @@ -56,6 +56,8 @@ system("/usr/local/bin/backupctrl makedirs >/dev/null 2>&1 ") unless ( -e '/var/ ############################################################################################################################ ############################################## System calls ohne Http Header ############################################### +# Replace slashes from filename +$cgiparams{'FILE'} =~ s/\///; if ( $cgiparams{'ACTION'} eq "download" ) { @@ -66,6 +68,15 @@ if ( $cgiparams{'ACTION'} eq "download" ) print @fileholder; exit (0); } +if ( $cgiparams{'ACTION'} eq "downloadiso" ) +{ + open(DLFILE, "; + print "Content-Type:application/x-download\n"; + print "Content-Disposition:attachment;filename=$cgiparams{'FILE'}\n\n"; + print @fileholder; + exit (0); +} if ( $cgiparams{'ACTION'} eq "downloadaddon" ) { open(DLFILE, "/dev/null`; +my @backupisos = `cd /var/tmp/backupiso/ && ls *.iso 2>/dev/null`; &Header::openbox('100%', 'center', $Lang::tr{'backup'}); @@ -182,6 +194,15 @@ $Size = sprintf("%02d", $Size); print "$Lang::tr{'backup from'} $_ $Lang::tr{'size'} $Size KB
"; print "
"; } +foreach (@backupisos){ +chomp($_); +my $Datei = "/var/tmp/backupiso/".$_; +my @Info = stat($Datei); +my $Size = $Info[7] / 1024; +$Size = sprintf("%02d", $Size); +print "$Lang::tr{'backup from'} $_ $Lang::tr{'size'} $Size KB
"; +print "
"; +} print < END From 07ca0d932f1a9ef270334a882673c2be81549530 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Wed, 1 Oct 2008 16:08:10 +0200 Subject: [PATCH 18/25] Changed alternative kernel to a package --- config/grub/grub.conf | 5 -- config/rootfiles/{common => packages}/linux25 | 0 config/rootfiles/updater/filelists/linux25 | 1 - config/rootfiles/updater/update.sh | 1 - lfs/initrd | 1 - lfs/linux25 | 5 ++ src/install+setup/install/main.c | 7 --- src/paks/linux25/install.sh | 62 +++++++++++++++++++ src/paks/linux25/uninstall.sh | 26 ++++++++ src/paks/linux25/update.sh | 26 ++++++++ 10 files changed, 119 insertions(+), 15 deletions(-) rename config/rootfiles/{common => packages}/linux25 (100%) delete mode 120000 config/rootfiles/updater/filelists/linux25 create mode 100644 src/paks/linux25/install.sh create mode 100644 src/paks/linux25/uninstall.sh create mode 100644 src/paks/linux25/update.sh diff --git a/config/grub/grub.conf b/config/grub/grub.conf index c4b7e2adb..886d6d77b 100644 --- a/config/grub/grub.conf +++ b/config/grub/grub.conf @@ -34,8 +34,3 @@ title IPFire (all storage drivers) kernel /vmlinuz-KVER-ipfire root=ROOT rootdelay=10 panic=10 MOUNT initrd /ipfirerd-KVER-emergency.img savedefault 5 -title IPFire - experimental kernel-2.6.25.17 - no ipsec (vesafb 640x480) - root (hd0,0) - kernel /vmlinuz-2.6.25.17-ipfire root=ROOT rootdelay=10 panic=10 vga=785 MOUNT - initrd /ipfirerd-2.6.25.17.img - savedefault 6 diff --git a/config/rootfiles/common/linux25 b/config/rootfiles/packages/linux25 similarity index 100% rename from config/rootfiles/common/linux25 rename to config/rootfiles/packages/linux25 diff --git a/config/rootfiles/updater/filelists/linux25 b/config/rootfiles/updater/filelists/linux25 deleted file mode 120000 index c9a54cd50..000000000 --- a/config/rootfiles/updater/filelists/linux25 +++ /dev/null @@ -1 +0,0 @@ -../../common/linux25 \ No newline at end of file diff --git a/config/rootfiles/updater/update.sh b/config/rootfiles/updater/update.sh index 18593dcde..895272721 100755 --- a/config/rootfiles/updater/update.sh +++ b/config/rootfiles/updater/update.sh @@ -144,7 +144,6 @@ fi fi mkinitcpio -k $KVER-ipfire -g /boot/ipfirerd-$KVER.img #mkinitcpio -k $KVER-ipfire-smp -g /boot/ipfirerd-$KVER-smp.img -mkinitcpio -k 2.6.25.17-ipfire -g /boot/ipfirerd-2.6.25.17.img # # ReInstall grub # diff --git a/lfs/initrd b/lfs/initrd index 114fab560..b4d0e3bcf 100644 --- a/lfs/initrd +++ b/lfs/initrd @@ -61,7 +61,6 @@ $(TARGET) : # make new dependencies depmod -a -F /boot/System.map-$(KVER)-ipfire $(KVER)-ipfire #depmod -a -F /boot/System.map-$(KVER)-ipfire-smp $(KVER)-ipfire-smp - depmod -a -F /boot/System.map-2.6.25.17-ipfire 2.6.25.17-ipfire cp -a /lib/modules/$(KVER)-ipfire/ /install/initrd/lib/modules/ diff --git a/lfs/linux25 b/lfs/linux25 index b50aafeb0..d1d07defb 100644 --- a/lfs/linux25 +++ b/lfs/linux25 @@ -42,6 +42,9 @@ else TARGET = $(DIR_INFO)/linux-$(VER) endif +PROG = linux25 +PAK_VER = 1 +DEPS = "" ############################################################################### # Top-level Rules @@ -75,6 +78,8 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects)) md5 : $(subst %,%_MD5,$(objects)) +dist: + @$(PAK) ############################################################################### # Downloading, checking, md5sum ############################################################################### diff --git a/src/install+setup/install/main.c b/src/install+setup/install/main.c index 6d6d12cf6..910fd96da 100644 --- a/src/install+setup/install/main.c +++ b/src/install+setup/install/main.c @@ -455,10 +455,6 @@ int main(int argc, char *argv[]) KERNEL_VERSION); mysystem(commandstring); */ - snprintf(commandstring, STRING_SIZE, - "/bin/touch /harddisk/lib/modules/2.6.25.17-ipfire/modules.dep"); - mysystem(commandstring); - /* Rename uname */ rename ("/harddisk/bin/uname.bak", "/harddisk/bin/uname"); @@ -532,9 +528,6 @@ int main(int argc, char *argv[]) /* snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd-%s-smp.img -k %s-ipfire-smp", KERNEL_VERSION, KERNEL_VERSION ); runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]); */ - snprintf(commandstring, STRING_SIZE, "/sbin/chroot /harddisk /sbin/mkinitcpio -g /boot/ipfirerd-2.6.25.17.img -k 2.6.25.17-ipfire"); - runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]); - sprintf(string, "root=%s3", hdparams.devnode_part_run); diff --git a/src/paks/linux25/install.sh b/src/paks/linux25/install.sh new file mode 100644 index 000000000..0794b03db --- /dev/null +++ b/src/paks/linux25/install.sh @@ -0,0 +1,62 @@ +#!/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 2 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) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files +# +KVER=2.6.25.17 +ROOT=`grep "root=" /boot/grub/grub.conf | cut -d"=" -f2 | cut -d" " -f1 | tail -n 1` +MOUNT=`grep "kernel" /boot/grub/grub.conf | tail -n 1` +# Nur den letzten Parameter verwenden +echo $MOUNT > /dev/null +MOUNT=$_ +ENTRY=`grep "savedefault" /boot/grub/grub.conf | tail -n 1` +# Nur den letzten Parameter verwenden +echo $ENTRY > /dev/null +let ENTRY=$_+1 +# +# backup grub.conf +# +cp /boot/grub/grub.conf /boot/grub/grub-backup-$KVER.conf +# +# Add new Entry to grub.conf +# +echo "" >> /boot/grub/grub.conf +echo "title IPFire alternative Kernel:$KVER" >> /boot/grub/grub.conf +echo " root (hd0,0)" >> /boot/grub/grub.conf +echo " kernel /vmlinuz-$KVER-ipfire root=$ROOT rootdelay=10 panic=10 $MOUNT" >> /boot/grub/grub.conf +echo " initrd /ipfirerd-$KVER.img" >> /boot/grub/grub.conf +echo " savedefault $ENTRY" >> /boot/grub/grub.conf +# +# Made initramdisk +# +mkinitcpio -k $KVER-ipfire -g /boot/ipfirerd-$KVER.img +# +# ReInstall grub +# +grub-install --no-floppy ${ROOT::`expr length $ROOT`-1} +# +# Create new module depency +# +depmod -a $KVER-ipfire + diff --git a/src/paks/linux25/uninstall.sh b/src/paks/linux25/uninstall.sh new file mode 100644 index 000000000..9a967627e --- /dev/null +++ b/src/paks/linux25/uninstall.sh @@ -0,0 +1,26 @@ +#!/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 2 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) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +remove_files +mv -f /boot/grub/grub-backup-2.6.25.17.conf /boot/grub/grub.conf diff --git a/src/paks/linux25/update.sh b/src/paks/linux25/update.sh new file mode 100644 index 000000000..89c40d0d7 --- /dev/null +++ b/src/paks/linux25/update.sh @@ -0,0 +1,26 @@ +#!/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 2 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) 2007 IPFire-Team . # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh From dbe2ef8b42d38308e1d1dec07528ac02d29aeb4a Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Wed, 1 Oct 2008 18:22:26 +0200 Subject: [PATCH 19/25] updated iso url in backupiso --- src/scripts/backupiso | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/backupiso b/src/scripts/backupiso index d579e5098..6be63bf0e 100644 --- a/src/scripts/backupiso +++ b/src/scripts/backupiso @@ -3,7 +3,7 @@ # FIXME: edit this lines before release #URL=http://download.ipfire.org/iso/ #ISO=ipfire-2.3-beta4.i586-full.iso -URL=http://www.rowie.at/ipfire/builds/v2.3test/Beta3/20081001-10uhr/ +URL=http://www.rowie.at/ipfire/builds/v2.3test/Beta3/20081001-17uhr/ ISO=ipfire-2.3-test.i586-full.iso if [ -z "$1" ]; then From b9a012b5906ac8fe4fd0bb0b6611dc1e81a9a38a Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Wed, 1 Oct 2008 23:49:43 +0200 Subject: [PATCH 20/25] added more files for vim syntax highlighting --- config/rootfiles/common/vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/rootfiles/common/vim b/config/rootfiles/common/vim index 36f187c97..2c095b238 100644 --- a/config/rootfiles/common/vim +++ b/config/rootfiles/common/vim @@ -838,7 +838,7 @@ usr/share/vim/vim70/syntax/fstab.vim #usr/share/vim/vim70/syntax/ncf.vim #usr/share/vim/vim70/syntax/netrc.vim #usr/share/vim/vim70/syntax/netrw.vim -#usr/share/vim/vim70/syntax/nosyntax.vim +usr/share/vim/vim70/syntax/nosyntax.vim #usr/share/vim/vim70/syntax/nqc.vim #usr/share/vim/vim70/syntax/nroff.vim #usr/share/vim/vim70/syntax/nsis.vim @@ -977,7 +977,7 @@ usr/share/vim/vim70/syntax/strace.vim #usr/share/vim/vim70/syntax/sudoers.vim #usr/share/vim/vim70/syntax/svn.vim #usr/share/vim/vim70/syntax/syncolor.vim -#usr/share/vim/vim70/syntax/synload.vim +usr/share/vim/vim70/syntax/synload.vim usr/share/vim/vim70/syntax/syntax.vim #usr/share/vim/vim70/syntax/sysctl.vim #usr/share/vim/vim70/syntax/tads.vim From d75a31b962d6d08fcd991abf6f8df52ef8294f68 Mon Sep 17 00:00:00 2001 From: Maniacikarus Date: Thu, 2 Oct 2008 00:03:15 +0200 Subject: [PATCH 21/25] Remove /var/spool from tmpfs added /var/run --- config/etc/fstab | 2 +- config/rootfiles/updater/update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/etc/fstab b/config/etc/fstab index a62a74c15..b11ebb8ae 100644 --- a/config/etc/fstab +++ b/config/etc/fstab @@ -11,4 +11,4 @@ devpts /dev/pts devpts gid=4,mode=620 0 0 none /tmp tmpfs defaults,size=128M 0 0 none /var/log/rrd tmpfs defaults,size=64M 0 0 none /var/lock tmpfs defaults,size=16M 0 0 -none /var/spool tmpfs defaults,size=16M 0 0 +none /var/run tmpfs defaults,size=16M 0 0 diff --git a/config/rootfiles/updater/update.sh b/config/rootfiles/updater/update.sh index 5cd6ef9f3..cfa6962f5 100755 --- a/config/rootfiles/updater/update.sh +++ b/config/rootfiles/updater/update.sh @@ -155,7 +155,7 @@ grep -v "tmpfs" /etc/fstab > /tmp/fstab.tmp echo none /tmp tmpfs defaults,size=128M 0 0 >> /tmp/fstab.tmp echo none /var/log/rrd tmpfs defaults,size=64M 0 0 >> /tmp/fstab.tmp echo none /var/lock tmpfs defaults,size=16M 0 0 >> /tmp/fstab.tmp -echo none /var/spool tmpfs defaults,size=16M 0 0 >> /tmp/fstab.tmp +echo none /var/run tmpfs defaults,size=16M 0 0 >> /tmp/fstab.tmp mv /tmp/fstab.tmp /etc/fstab # # Change version of Pakfire.conf From e6b148ab59c613418b9c5bb5a81173550448c7a4 Mon Sep 17 00:00:00 2001 From: Daniel Glanzmann Date: Thu, 2 Oct 2008 00:34:02 +0200 Subject: [PATCH 22/25] busybox does not know --preserve use -p --- src/install+setup/install/unattended.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install+setup/install/unattended.c b/src/install+setup/install/unattended.c index 95ee6698e..cfdf33145 100644 --- a/src/install+setup/install/unattended.c +++ b/src/install+setup/install/unattended.c @@ -150,7 +150,7 @@ int unattended_setup(struct keyvalue *unattendedkv) { if (strlen(restore_file) > 0) { fprintf(flog, "unattended: Restoring Backup\n"); snprintf(commandstring, STRING_SIZE, - "cd /harddisk && /bin/tar -xvz --preserve -f /harddisk/var/ipfire/backup/%s", restore_file); + "cd /harddisk && /bin/tar -xvzp -f /harddisk/var/ipfire/backup/%s", restore_file); if (mysystem(commandstring)) { errorbox("unattended: ERROR restoring backup"); } From d34d9f3b16ae5e36b94e23de80a4664d13723662 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Thu, 2 Oct 2008 00:59:48 +0200 Subject: [PATCH 23/25] Move vnstat database to /var/log/rrd Add a tmpfs script to restore the ramdisk before network start and save after --- config/rootfiles/common/initscripts | 4 +++ config/rootfiles/common/vnstat | 1 - config/rootfiles/updater/filelists/files | 4 +++ doc/packages-list.txt | 2 +- lfs/initscripts | 3 +++ lfs/vnstat | 3 +-- src/initscripts/init.d/collectd | 11 +++------ src/initscripts/init.d/tmpfs | 31 ++++++++++++++++++++++++ 8 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 src/initscripts/init.d/tmpfs diff --git a/config/rootfiles/common/initscripts b/config/rootfiles/common/initscripts index f28343131..f3ba875a7 100644 --- a/config/rootfiles/common/initscripts +++ b/config/rootfiles/common/initscripts @@ -164,3 +164,7 @@ etc/sysconfig/firewall.local etc/sysconfig/modules etc/sysconfig/rc etc/sysconfig/rc.local +etc/rc.d/init.d/tmpfs +etc/rc.d/rc0.d/K85tmpfs +etc/rc.d/rc3.d/S01tmpfs +etc/rc.d/rc6.d/K85tmpfs diff --git a/config/rootfiles/common/vnstat b/config/rootfiles/common/vnstat index 39def7804..57c54dbef 100644 --- a/config/rootfiles/common/vnstat +++ b/config/rootfiles/common/vnstat @@ -4,4 +4,3 @@ etc/vnstat.conf usr/bin/vnstat #usr/share/man/man1/vnstat.1 #var/lib/vnstat -var/log/vnstat diff --git a/config/rootfiles/updater/filelists/files b/config/rootfiles/updater/filelists/files index aea3d8552..0c95631da 100644 --- a/config/rootfiles/updater/filelists/files +++ b/config/rootfiles/updater/filelists/files @@ -8,6 +8,10 @@ etc/ppp/dialer etc/rc.d/init.d/checkfstab etc/rc.d/rcsysinit.d/S19checkfstab etc/rc.d/init.d/dhcp +etc/rc.d/init.d/tmpfs +etc/rc.d/rc0.d/K85tmpfs +etc/rc.d/rc3.d/S01tmpfs +etc/rc.d/rc6.d/K85tmpfs etc/rc.d/init.d/dnsmasq etc/rc.d/init.d/network etc/rc.d/init.d/networking/any diff --git a/doc/packages-list.txt b/doc/packages-list.txt index d35e12979..643e6d41e 100644 --- a/doc/packages-list.txt +++ b/doc/packages-list.txt @@ -180,7 +180,7 @@ * linux-atm-2.4.1 * linux-libc-headers-2.6.12.0 * linuxigd-0.95 -* lm_sensors-3.0.2 +* lm_sensors-3.0.3 * logrotate-3.7.1 * logwatch-7.3.6 * lsof-4.78 diff --git a/lfs/initscripts b/lfs/initscripts index 024973460..345a122e6 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -129,6 +129,9 @@ $(TARGET) : ln -sf ../init.d/beep /etc/rc.d/rc0.d/K99beep ln -sf ../init.d/beep /etc/rc.d/rc3.d/S99beep ln -sf ../init.d/beep /etc/rc.d/rc6.d/K99beep + ln -sf ../init.d/tmpfs /etc/rc.d/rc0.d/K85tmpfs + ln -sf ../init.d/tmpfs /etc/rc.d/rc3.d/S01tmpfs + ln -sf ../init.d/tmpfs /etc/rc.d/rc6.d/K85tmpfs ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs ln -sf ../init.d/modules /etc/rc.d/rcsysinit.d/S05modules diff --git a/lfs/vnstat b/lfs/vnstat index b2a4c6e75..2e7b46c65 100644 --- a/lfs/vnstat +++ b/lfs/vnstat @@ -76,7 +76,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && make $(MAKETUNING) LOCAL_CONFIGURE_OPTIONS="--enable-readline=yes" cd $(DIR_APP) && make install sed -i 's|eth0|green0|g' /etc/vnstat.conf - sed -i 's|/var/lib/vnstat|/var/log/vnstat|g' /etc/vnstat.conf - -mkdir -p /var/log/vnstat + sed -i 's|/var/lib/vnstat|/var/log/rrd/vnstat|g' /etc/vnstat.conf @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/initscripts/init.d/collectd b/src/initscripts/init.d/collectd index 98573749e..a64114fb3 100644 --- a/src/initscripts/init.d/collectd +++ b/src/initscripts/init.d/collectd @@ -24,12 +24,6 @@ case "$1" in fi fi - /etc/init.d/collectd restore - - if [ ! -e $RRDLOG.bak/ ]; then - mkdir $RRDLOG.bak/ - fi - boot_mesg -n "Loading Sensor Modules..." for modul in `cat /etc/sysconfig/lm_sensors | grep '^MODULE_' | cut -d"=" -s -f2`; do modprobe $modul > /dev/null 2>&1; @@ -47,7 +41,10 @@ case "$1" in evaluate_retval ;; stop) - /etc/init.d/collectd backup + # Save the ramdisk at manual stop but not at shutdown + if [ "$(basename $0)" == "collectd" ]; then + /etc/init.d/collectd backup + fi boot_mesg "Stopping Collection daemon..." killproc /usr/sbin/collectd evaluate_retval diff --git a/src/initscripts/init.d/tmpfs b/src/initscripts/init.d/tmpfs new file mode 100644 index 000000000..4a1ae15ca --- /dev/null +++ b/src/initscripts/init.d/tmpfs @@ -0,0 +1,31 @@ +#!/bin/sh +# Begin $rc_base/init.d/tmpfs + + +. /etc/sysconfig/rc +. $rc_functions + +eval $(/usr/local/bin/readhash /var/ipfire/main/settings) + +if [ "$RRDLOG" = '' ]; then + RRDLOG=/var/log/rrd +fi + +case "$1" in + start) + /etc/init.d/collectd restore + if [ ! -e $RRDLOG.bak/vnstat ]; then + mkdir -p $RRDLOG.bak/vnstat + fi + ;; + stop) + /etc/init.d/collectd backup + ;; + + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac + +# End $rc_base/init.d/tmpfs From 1bc535b6c65eeca5415fbe59920a6fff3a3a87af Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Thu, 2 Oct 2008 07:41:52 +0200 Subject: [PATCH 24/25] Move ramdisk backup/restore to tmpfs initskript --- config/cron/crontab | 2 +- config/rootfiles/updater/update.sh | 2 +- src/initscripts/init.d/collectd | 13 +------------ src/initscripts/init.d/tmpfs | 20 ++++++++++++++++---- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/config/cron/crontab b/config/cron/crontab index 2d7552bed..82d2e078f 100644 --- a/config/cron/crontab +++ b/config/cron/crontab @@ -22,7 +22,7 @@ HOME=/ # Make some nice graphs */5 * * * * /usr/local/bin/makegraphs >/dev/null -* 05 * * * /etc/init.d/collectd backup >/dev/null +* 05 * * * /etc/init.d/tmpfs backup >/dev/null # Force update the dynamic dns registration once a week # Force update even if IP has not changed once a month if 'minimize update' selected in GUI diff --git a/config/rootfiles/updater/update.sh b/config/rootfiles/updater/update.sh index cfa6962f5..95de20457 100755 --- a/config/rootfiles/updater/update.sh +++ b/config/rootfiles/updater/update.sh @@ -172,7 +172,7 @@ echo \\n running on \\s \\r \\m >> /etc/issue # grep -v "ipacsum" /var/spool/cron/root.orig | grep -v "hddshutdown" > /tmp/root.orig.tmp echo "# Backup collectd files" >> /tmp/root.orig.tmp -echo "* 05 * * * /etc/init.d/collectd backup >/dev/null" >> /tmp/root.orig.tmp +echo "* 05 * * * /etc/init.d/tmpfs backup >/dev/null" >> /tmp/root.orig.tmp echo "# hddshutdown" >> /tmp/root.orig.tmp echo "*/30 * * * * /usr/local/bin/hddshutdown >/dev/null" >> /tmp/root.orig.tmp mv /tmp/root.orig.tmp /var/spool/cron/root.orig diff --git a/src/initscripts/init.d/collectd b/src/initscripts/init.d/collectd index a64114fb3..2a0cd1666 100644 --- a/src/initscripts/init.d/collectd +++ b/src/initscripts/init.d/collectd @@ -43,7 +43,7 @@ case "$1" in stop) # Save the ramdisk at manual stop but not at shutdown if [ "$(basename $0)" == "collectd" ]; then - /etc/init.d/collectd backup + /etc/init.d/tmpfs backup fi boot_mesg "Stopping Collection daemon..." killproc /usr/sbin/collectd @@ -54,17 +54,6 @@ case "$1" in sleep 1 ${0} start ;; - backup) - boot_mesg "Save rrd files from ramd..." - cp -pR $RRDLOG/* $RRDLOG.bak/ - evaluate_retval - ;; - restore) - if [ -e $RRDLOG.bak ];then - boot_mesg "Copying rrd files to ramd..." - cp -pR $RRDLOG.bak/* $RRDLOG/ - fi - ;; status) statusproc /usr/sbin/collectd ;; diff --git a/src/initscripts/init.d/tmpfs b/src/initscripts/init.d/tmpfs index 4a1ae15ca..d27417628 100644 --- a/src/initscripts/init.d/tmpfs +++ b/src/initscripts/init.d/tmpfs @@ -1,7 +1,6 @@ #!/bin/sh # Begin $rc_base/init.d/tmpfs - . /etc/sysconfig/rc . $rc_functions @@ -13,17 +12,30 @@ fi case "$1" in start) - /etc/init.d/collectd restore + $0 restore if [ ! -e $RRDLOG.bak/vnstat ]; then mkdir -p $RRDLOG.bak/vnstat fi ;; stop) - /etc/init.d/collectd backup + $0 backup ;; + backup) + boot_mesg "Save ramdisk..." + cp -pR $RRDLOG/* $RRDLOG.bak/ + evaluate_retval + ;; + restore) + if [ -e $RRDLOG.bak ];then + boot_mesg "Restore ramdisk..." + cp -pR $RRDLOG.bak/* $RRDLOG/ + fi + ;; + + *) - echo "Usage: $0 {start|stop}" + echo "Usage: $0 {start|stop|backup}" exit 1 ;; esac From 6689ee3285786df6bcef4c183dbfc2187875c5d9 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Thu, 2 Oct 2008 17:15:02 +0200 Subject: [PATCH 25/25] Updater / sysklog@boot Updater: Fix fstab modify Updater: update vnstat path Syslog: create an extra log at boot to short the time at syslog start --- config/rootfiles/updater/filelists/files | 2 +- config/rootfiles/updater/update.sh | 25 +++++++++++++++--------- src/initscripts/init.d/sysklogd | 12 +++++++++--- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/config/rootfiles/updater/filelists/files b/config/rootfiles/updater/filelists/files index 0c95631da..75e18a8ce 100644 --- a/config/rootfiles/updater/filelists/files +++ b/config/rootfiles/updater/filelists/files @@ -3,7 +3,6 @@ etc/init.d/mISDN etc/modprobe.d/blacklist usr/bin/bc usr/bin/dc -etc/fstab etc/ppp/dialer etc/rc.d/init.d/checkfstab etc/rc.d/rcsysinit.d/S19checkfstab @@ -13,6 +12,7 @@ etc/rc.d/rc0.d/K85tmpfs etc/rc.d/rc3.d/S01tmpfs etc/rc.d/rc6.d/K85tmpfs etc/rc.d/init.d/dnsmasq +etc/rc.d/init.d/sysklogd etc/rc.d/init.d/network etc/rc.d/init.d/networking/any etc/rc.d/init.d/networking/red diff --git a/config/rootfiles/updater/update.sh b/config/rootfiles/updater/update.sh index 95de20457..dd9eadfb6 100755 --- a/config/rootfiles/updater/update.sh +++ b/config/rootfiles/updater/update.sh @@ -38,10 +38,10 @@ echo Update IPFire $OLDVERSION to $NEWVERSION echo # # check if we the backup file already exist -if [ -e /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.bz2 ]; then +if [ -e /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.gz ]; then echo Moving backup to backup-old ... - mv -f /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.bz2 \ - /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION-old.tar.bz2 + mv -f /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.gz \ + /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION-old.tar.gz fi echo First we made a backup of all files that was inside of the echo update archive. This may take a while ... @@ -52,6 +52,7 @@ echo var/spool/cron/root.orig >> /opt/pakfire/tmp/ROOTFILES echo etc/udev/rules.d/30-persistent-network.rules >> /opt/pakfire/tmp/ROOTFILES echo etc/sysconfig/lm_sensors >> /opt/pakfire/tmp/ROOTFILES echo var/log/rrd >> /opt/pakfire/tmp/ROOTFILES +echo var/log/vnstat >> /opt/pakfire/tmp/ROOTFILES echo var/updatexlerator >> /opt/pakfire/tmp/ROOTFILES echo lib/iptables >> /opt/pakfire/tmp/ROOTFILES echo lib/modules >> /opt/pakfire/tmp/ROOTFILES @@ -62,7 +63,7 @@ echo srv/web/ipfire/cgi-bin/traffics.cgi >> /opt/pakfire/tmp/ROOTFILES echo srv/web/ipfire/cgi-bin/graphs.cgi >> /opt/pakfire/tmp/ROOTFILES echo srv/web/ipfire/cgi-bin/qosgraph.cgi >> /opt/pakfire/tmp/ROOTFILES # -tar cjvf /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.bz2 \ +tar czvf /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.gz \ -T /opt/pakfire/tmp/ROOTFILES --exclude='#*' -C / > /dev/null 2>&1 echo echo Update IPfire to $NEWVERSION ... @@ -152,10 +153,10 @@ grub-install --no-floppy ${ROOT::`expr length $ROOT`-1} # Update fstab # grep -v "tmpfs" /etc/fstab > /tmp/fstab.tmp -echo none /tmp tmpfs defaults,size=128M 0 0 >> /tmp/fstab.tmp -echo none /var/log/rrd tmpfs defaults,size=64M 0 0 >> /tmp/fstab.tmp -echo none /var/lock tmpfs defaults,size=16M 0 0 >> /tmp/fstab.tmp -echo none /var/run tmpfs defaults,size=16M 0 0 >> /tmp/fstab.tmp +echo "none /tmp tmpfs defaults,size=128M 0 0" >> /tmp/fstab.tmp +echo "none /var/log/rrd tmpfs defaults,size=64M 0 0" >> /tmp/fstab.tmp +echo "none /var/lock tmpfs defaults,size=16M 0 0" >> /tmp/fstab.tmp +echo "none /var/run tmpfs defaults,size=16M 0 0" >> /tmp/fstab.tmp mv /tmp/fstab.tmp /etc/fstab # # Change version of Pakfire.conf @@ -174,7 +175,7 @@ grep -v "ipacsum" /var/spool/cron/root.orig | grep -v "hddshutdown" > /tmp/root. echo "# Backup collectd files" >> /tmp/root.orig.tmp echo "* 05 * * * /etc/init.d/tmpfs backup >/dev/null" >> /tmp/root.orig.tmp echo "# hddshutdown" >> /tmp/root.orig.tmp -echo "*/30 * * * * /usr/local/bin/hddshutdown >/dev/null" >> /tmp/root.orig.tmp +echo "*/30 * * * * /usr/local/bin/hddshutdown >/dev/null" >> /tmp/root.orig.tmp mv /tmp/root.orig.tmp /var/spool/cron/root.orig chmod 600 /var/spool/cron/root.orig chown root:cron /var/spool/cron/root.orig @@ -190,6 +191,12 @@ perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang" perl /var/ipfire/qos/bin/migrate.pl /var/ipfire/updatexlrator/bin/convert # +# Move vnstat database to /var/log/rrd +# +mkdir -p /var/log/rrd.bak/vnstat +cp /var/log/vnstat /var/log/rrd.bak/vnstat +mv /var/log/vnstat /var/log/rrd/vnstat +# # Delete old lm-sensor modullist... # rm -rf /etc/sysconfig/lm_sensors diff --git a/src/initscripts/init.d/sysklogd b/src/initscripts/init.d/sysklogd index 1912df408..7aa9a4c02 100644 --- a/src/initscripts/init.d/sysklogd +++ b/src/initscripts/init.d/sysklogd @@ -17,13 +17,19 @@ case "${1}" in start) + boot_mesg "Starting kernel log daemon..." + loadproc klogd + boot_mesg "Starting system log daemon..." loadproc syslogd -m 0 - boot_mesg "Starting kernel log daemon..." - loadproc klogd + boot_mesg "Saving Bootlog..." + if [ -e /var/log/bootlog ]; then + mv -f /var/log/bootlog /var/log/bootlog.old + fi + dmesg -c > /var/log/bootlog + evaluate_retval ;; - stop) boot_mesg "Stopping kernel log daemon..." killproc klogd