Added include file for squidclam and corrected install routine
authorChristian Schmidt <maniacikarus@ipfire.org>
Wed, 9 Apr 2008 16:16:45 +0000 (18:16 +0200)
committerChristian Schmidt <maniacikarus@ipfire.org>
Wed, 9 Apr 2008 16:16:45 +0000 (18:16 +0200)
fixed some line in services cgi

config/backup/includes/squidclamav [new file with mode: 0644]
config/rootfiles/core/12/files
html/cgi-bin/services.cgi
lfs/squidclamav
src/paks/squidclamav/install.sh [new file with mode: 0644]
src/paks/squidclamav/uninstall.sh [new file with mode: 0644]
src/paks/squidclamav/update.sh [new file with mode: 0644]

diff --git a/config/backup/includes/squidclamav b/config/backup/includes/squidclamav
new file mode 100644 (file)
index 0000000..bacc23b
--- /dev/null
@@ -0,0 +1 @@
+/etc/squidclamav.conf
index 9041c64..e608375 100644 (file)
@@ -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
index 67dd043..1b78140 100644 (file)
@@ -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 = "<td align='center'></td>";
-       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 = "<td align='center'><A HREF=services.cgi?$_!disable><img alt='$Lang::tr{'deactivate'}' title='$Lang::tr{'deactivate'}' src='/images/on.gif' border='0' width='16' height='16' /></A></td>";
        }
-       $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 = "<td align='center'><A HREF=services.cgi?$_!enable><img alt='$Lang::tr{'activate'}' title='$Lang::tr{'activate'}' src='/images/off.gif' border='0' width='16' height='16' /></A></td>";
index 638bf98..544f04e 100644 (file)
@@ -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 (file)
index 0000000..42bd5ba
--- /dev/null
@@ -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 <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /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 (file)
index 0000000..d2aa435
--- /dev/null
@@ -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 <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /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 (file)
index 0000000..89c40d0
--- /dev/null
@@ -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 <info@ipfire.org>.                        #
+#                                                                          #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+./uninstall.sh
+./install.sh