From bf660619ef0af1c5af7438c80ed3e678aebc533f Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Wed, 9 Apr 2008 18:16:45 +0200 Subject: [PATCH 1/1] Added include file for squidclam and corrected install routine fixed some line in services cgi --- config/backup/includes/squidclamav | 1 + config/rootfiles/core/12/files | 1 + html/cgi-bin/services.cgi | 8 ++++---- lfs/squidclamav | 2 +- src/paks/squidclamav/install.sh | 27 +++++++++++++++++++++++++++ src/paks/squidclamav/uninstall.sh | 28 ++++++++++++++++++++++++++++ src/paks/squidclamav/update.sh | 26 ++++++++++++++++++++++++++ 7 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 config/backup/includes/squidclamav create mode 100644 src/paks/squidclamav/install.sh create mode 100644 src/paks/squidclamav/uninstall.sh create mode 100644 src/paks/squidclamav/update.sh diff --git a/config/backup/includes/squidclamav b/config/backup/includes/squidclamav new file mode 100644 index 0000000000..bacc23b67b --- /dev/null +++ b/config/backup/includes/squidclamav @@ -0,0 +1 @@ +/etc/squidclamav.conf diff --git a/config/rootfiles/core/12/files b/config/rootfiles/core/12/files index 9041c64166..e608375bca 100644 --- a/config/rootfiles/core/12/files +++ b/config/rootfiles/core/12/files @@ -128,3 +128,4 @@ lib/modules/2.6.16.57-ipfire-smp/kernel/drivers/media/video/v4l1-compat.ko lib/modules/2.6.16.57-ipfire-smp/kernel/drivers/media/video/v4l2-common.ko etc/udev/dvb.sh etc/udev/rules.d/10-dvb.rules +srv/web/ipfire/cgi-bin/services.cgi diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 67dd043536..1b781404c3 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -140,13 +140,13 @@ END my $lines=0; # Used to count the outputlines to make different bgcolor # Generate list of installed addon pak's -my @pak = `find /opt/pakfire/db/installed/meta-* | cut -d"-" -f2`; +my @pak = `find /opt/pakfire/db/installed/meta-* 2>/dev/null | cut -d"-" -f2`; foreach (@pak) { chomp($_); # Check which of the paks are services - my @svc = `find /etc/init.d/$_ | cut -d"/" -f4`; + my @svc = `find /etc/init.d/$_ 2>/dev/null | cut -d"/" -f4`; foreach (@svc) { # blacklist some packages @@ -216,12 +216,12 @@ sub isautorun { my $cmd = $_[0]; my $status = ""; - my $init = `find /etc/rc.d/rc3.d/S??${cmd}`; + my $init = `find /etc/rc.d/rc3.d/S??${cmd} 2>/dev/null`; chomp ($init); if ($init ne '') { $status = "$Lang::tr{"; } - $init = `find /etc/rc.d/rc3.d/off/S??${cmd}`; + $init = `find /etc/rc.d/rc3.d/off/S??${cmd} 2>/dev/null`; chomp ($init); if ($init ne '') { $status = "$Lang::tr{"; diff --git a/lfs/squidclamav b/lfs/squidclamav index 638bf98f10..544f04ecc4 100644 --- a/lfs/squidclamav +++ b/lfs/squidclamav @@ -79,7 +79,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && ./configure --prefix=/usr cd $(DIR_APP) && make install - cp -f $(DIR_CONF)/squidclamav/squidclamav.conf /etc/squidclamav.conf + install -v -m 755 $(DIR_CONF)/squidclamav/squidclamav.conf /etc/squidclamav.conf install -v -m 644 $(DIR_SRC)/config/backup/includes/squidclamav /var/ipfire/backup/addons/includes/squidclamav @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/paks/squidclamav/install.sh b/src/paks/squidclamav/install.sh new file mode 100644 index 0000000000..42bd5ba36c --- /dev/null +++ b/src/paks/squidclamav/install.sh @@ -0,0 +1,27 @@ +#!/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} +/etc/init.d/squid restart diff --git a/src/paks/squidclamav/uninstall.sh b/src/paks/squidclamav/uninstall.sh new file mode 100644 index 0000000000..d2aa435e32 --- /dev/null +++ b/src/paks/squidclamav/uninstall.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 +/etc/init.d/squid stop +make_backup ${NAME} +remove_files +/etc/init.d/squid start diff --git a/src/paks/squidclamav/update.sh b/src/paks/squidclamav/update.sh new file mode 100644 index 0000000000..89c40d0d7c --- /dev/null +++ b/src/paks/squidclamav/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 -- 2.39.2