Clamav-Update
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 7 May 2007 17:20:46 +0000 (17:20 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Mon, 7 May 2007 17:20:46 +0000 (17:20 +0000)
Hardwareinformationen fuer Kudzu hinzugefuegt.
dhcpctrl-Datei erstellt.

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@540 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/rootfiles/common/hwdata [new file with mode: 0644]
config/rootfiles/common/initscripts
config/rootfiles/common/misc-progs
html/cgi-bin/dhcp.cgi
lfs/clamav
src/initscripts/init.d/dhcp [new file with mode: 0644]
src/misc-progs/Makefile
src/misc-progs/dhcpctrl.c [new file with mode: 0644]
src/misc-progs/restartdhcp.c [deleted file]

diff --git a/config/rootfiles/common/hwdata b/config/rootfiles/common/hwdata
new file mode 100644 (file)
index 0000000..30d51a2
--- /dev/null
@@ -0,0 +1,2 @@
+usr/share/hwdata/usb.ids
+usr/share/hwdata/pci.ids
index 5e74204..cbd8d77 100644 (file)
@@ -9,6 +9,7 @@ etc/rc.d/init.d/checkfs
 etc/rc.d/init.d/cleanfs
 etc/rc.d/init.d/connectioncheck
 etc/rc.d/init.d/console
+etc/rc.d/init.d/dhcp
 etc/rc.d/init.d/fcron
 etc/rc.d/init.d/firewall
 etc/rc.d/init.d/functions
index 6d2ed9e..4f4a498 100644 (file)
@@ -1,3 +1,4 @@
+usr/local/bin/dhcpctrl
 usr/local/bin/extrahdctrl
 usr/local/bin/getipstat
 #usr/local/bin/iowrap
@@ -10,7 +11,6 @@ usr/local/bin/qosctrl
 usr/local/bin/rebuildhosts
 usr/local/bin/redctrl
 usr/local/bin/restartapplejuice
-usr/local/bin/restartdhcp
 usr/local/bin/restartntpd
 usr/local/bin/restartsnort
 usr/local/bin/restartssh
index 87134a4..6ae7253 100644 (file)
@@ -1224,7 +1224,7 @@ sub buildconf {
        }
     }
     close FILE;
-    system '/usr/local/bin/restartdhcp';
+    system '/usr/local/bin/dhcpctrl restart >/dev/null 2>&1';
 }
 
 #
index 801c288..27c6dde 100644 (file)
@@ -26,7 +26,7 @@
 
 include Config
 
-VER        = 0.90
+VER        = 0.90.2
 
 THISAPP    = clamav-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = f04372e49c3c5ff3bd94bbe1fef2eaca
+$(DL_FILE)_MD5 = 39d1f07a399b551b55096b6ec7325c33
 
 install : $(TARGET)
 
@@ -80,7 +80,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/var/ipfire/clamav
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
-       chown clamav.clamav /usr/share/clamav -R
+       chown clamav.clamav -R /usr/share/clamav/
        cp -rf $(DIR_SRC)/config/clamav/* /var/ipfire/clamav/
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/src/initscripts/init.d/dhcp b/src/initscripts/init.d/dhcp
new file mode 100644 (file)
index 0000000..3084410
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/sh
+# Begin $rc_base/init.d/dhcp
+
+# Based on sysklogd script from LFS-3.1 and earlier.
+# Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
+# Modified for IPFire by Michael Tremer - mitch@ipfire.org
+
+. /etc/sysconfig/rc
+. $rc_functions
+eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
+
+case "$1" in
+       start)
+               iptables -F DHCPBLUEINPUT
+               if [ -e /var/ipfire/dhcp/enable_green ]; then
+                       devices="${GREEN_DEV}"
+               fi
+               if [ -e /var/ipfire/dhcp/enable_blue ]; then
+                       devices=+" ${BLUE_DEV}"
+                       
+                       iptables -A DHCPBLUEINPUT -p tcp --source-port 68 --destination-port 67 -i ${BLUE_DEV} -j ACCEPT > /dev/null 2>&1
+                       iptables -A DHCPBLUEINPUT -p udp --source-port 68 --destination-port 67 -i ${BLUE_DEV} -j ACCEPT > /dev/null 2>&1
+               fi              
+               
+               boot_mesg "Starting DHCP Server..."
+               loadproc /usr/sbin/dhcpd -q ${devices}
+               
+               chmod 644 /var/run/dhcpd.pid # Fix because silly dhcpd creates its pid with mode 640
+               ;;
+
+       stop)
+               boot_mesg "Stopping DHCP Server..."
+               killproc /usr/sbin/dhcpd
+               ;;
+
+       reload)
+               boot_mesg "Reloading DHCP Server..."
+               reloadproc /usr/sbin/dhcpd
+               ;;
+
+       restart)
+               $0 stop
+               sleep 1
+               $0 start
+               ;;
+
+       status)
+               statusproc /usr/sbin/dhcpd
+               ;;
+
+       *)
+               echo "Usage: $0 {start|stop|reload|restart|status}"
+               exit 1
+               ;;
+esac
+
+# End $rc_base/init.d/dhcp
index 7302cff..75e8f63 100644 (file)
@@ -6,7 +6,7 @@ COMPILE=$(CC) $(CFLAGS)
 PROGS = iowrap
 SUID_PROGS = setdmzholes setportfw setfilters setxtaccess \
        squidctrl restartssh ipfirereboot setaliases \
-       ipsecctrl restartntpd restartdhcp restartsnort \
+       ipsecctrl restartntpd dhcpctrl restartsnort \
        restartapplejuice rebuildhosts \
        restartsyslogd logwatch openvpnctrl timecheckctrl \
        restartwireless getipstat qosctrl launch-ether-wake \
@@ -85,8 +85,8 @@ rebuildhosts: rebuildhosts.c setuid.o ../install+setup/libsmooth/varval.o
 restartapplejuice: restartapplejuice.c setuid.o ../install+setup/libsmooth/varval.o
        $(COMPILE) -I../install+setup/libsmooth/ restartapplejuice.c setuid.o ../install+setup/libsmooth/varval.o -o $@
 
-restartdhcp: restartdhcp.c setuid.o ../install+setup/libsmooth/varval.o
-       $(COMPILE) -I../install+setup/libsmooth/ restartdhcp.c setuid.o ../install+setup/libsmooth/varval.o -o $@
+dhcpctrl: dhcpctrl.c setuid.o ../install+setup/libsmooth/varval.o
+       $(COMPILE) -I../install+setup/libsmooth/ dhcpctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
 
 restartssh: restartssh.c setuid.o ../install+setup/libsmooth/varval.o
        $(COMPILE) -I../install+setup/libsmooth/ restartssh.c setuid.o ../install+setup/libsmooth/varval.o -o $@
diff --git a/src/misc-progs/dhcpctrl.c b/src/misc-progs/dhcpctrl.c
new file mode 100644 (file)
index 0000000..85ef709
--- /dev/null
@@ -0,0 +1,46 @@
+/* This file is part of the IPFire Firewall.
+ *
+ * This program is distributed under the terms of the GNU General Public
+ * Licence.  See the file COPYING for details.
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include "setuid.h"
+
+int main(int argc, char *argv[]) {
+
+       if (!(initsetuid()))
+               exit(1);
+
+       if (argc < 2) {
+               fprintf(stderr, "\nNo argument given.\n\ndhcpctrl (start|stop|restart|reload)\n\n");
+               exit(1);
+       }
+
+       if (strcmp(argv[1], "start") == 0) {
+               safe_system("/etc/rc.d/init.d/dhcp start");
+       } else if (strcmp(argv[1], "stop") == 0) {
+               safe_system("/etc/rc.d/init.d/dhcp stop");
+       } else if (strcmp(argv[1], "restart") == 0) {
+               safe_system("/etc/rc.d/init.d/dhcp restart");
+       } else if (strcmp(argv[1], "reload") == 0) {
+               safe_system("/etc/rc.d/init.d/dhcp reload");
+       } else if (strcmp(argv[1], "enable") == 0) {
+               safe_system("ln -fs ../init.d/dhcp /etc/rc.d/rc3.d/S30dhcp >/dev/null 2>&1");
+               safe_system("ln -fs ../init.d/dhcp /etc/rc.d/rc0.d/K30dhcp >/dev/null 2>&1");
+               safe_system("ln -fs ../init.d/dhcp /etc/rc.d/rc6.d/K30dhcp >/dev/null 2>&1");
+       } else if (strcmp(argv[1], "disable") == 0) {
+               safe_system("rm -f /etc/rc.d/rc*.d/*dhcp >/dev/null 2>&1");
+       } else {
+               fprintf(stderr, "\nBad argument given.\n\ndhcpctrl (start|stop|restart|reload)\n\n");
+               exit(1);
+       }
+
+       return 0;
+}
diff --git a/src/misc-progs/restartdhcp.c b/src/misc-progs/restartdhcp.c
deleted file mode 100644 (file)
index 178a51e..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/* SmoothWall helper program - restartdhcp\r
- *\r
- * This program is distributed under the terms of the GNU General Public\r
- * Licence.  See the file COPYING for details.\r
- *\r
- * (c) Lawrence Manning, 2001\r
- * Simple program intended to be installed setuid(0) that can be used for\r
- * restarting DHCPd.\r
- * \r
- * $Id: restartdhcp.c,v 1.5.2.1 2004/11/03 13:50:26 alanh Exp $\r
- * \r
- */\r
-\r
-#include "libsmooth.h"\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <unistd.h>\r
-#include <fcntl.h>\r
-#include <string.h>\r
-#include <sys/types.h>\r
-#include <sys/stat.h>\r
-#include <signal.h>\r
-#include "setuid.h"\r
-\r
-int main(void)\r
-{\r
-       int fd = -1;\r
-       int fdblue = -1;\r
-       char buffer[STRING_SIZE];\r
-       char blue_dev[STRING_SIZE] = "", green_dev[STRING_SIZE] = "";\r
-       int pid;\r
-       struct keyvalue *kv = NULL;\r
-       \r
-       if (!(initsetuid()))\r
-               exit(1);\r
-               \r
-       memset(buffer, 0, STRING_SIZE);\r
-\r
-       /* Init the keyvalue structure */\r
-       kv=initkeyvalues();\r
-\r
-       /* Read in the current values */\r
-       if (!readkeyvalues(kv, CONFIG_ROOT "/ethernet/settings"))\r
-       {\r
-               fprintf(stderr, "Cannot read ethernet settings\n");\r
-               exit(1);\r
-       }\r
-\r
-       if (!findkey(kv, "GREEN_DEV", green_dev))\r
-       {\r
-               fprintf(stderr, "Cannot read GREEN_DEV\n");\r
-               exit(1);\r
-       }\r
-\r
-       if (!VALID_DEVICE(green_dev))\r
-       {\r
-               fprintf(stderr, "Bad GREEN_DEV: %s\n", green_dev);\r
-               exit(1);\r
-       }\r
-\r
-       /* Get the BLUE interface details */\r
-       findkey(kv, "BLUE_DEV", blue_dev);\r
-\r
-       freekeyvalues(kv);\r
-\r
-       if ((fdblue = open(CONFIG_ROOT "/dhcp/enable_blue", O_RDONLY)) != -1)\r
-       {\r
-               close(fdblue);\r
-               if (!VALID_DEVICE(blue_dev))\r
-               {\r
-                       fprintf(stderr, "Bad BLUE_DEV: %s\n", blue_dev);\r
-                       exit(1);\r
-               }\r
-       }\r
-\r
-       if ((fd = open("/var/run/dhcpd.pid", O_RDONLY)) != -1)\r
-       {\r
-               if (read(fd, buffer, STRING_SIZE - 1) == -1)\r
-                       fprintf(stderr, "Couldn't read from pid file\n");\r
-               else\r
-               {\r
-                       pid = atoi(buffer);\r
-                       if (pid <= 1)\r
-                               fprintf(stderr, "Bad pid value\n");\r
-                       else\r
-                       {\r
-                               if (kill(pid, SIGTERM) == -1)\r
-                                       fprintf(stderr, "Unable to send SIGTERM\n");\r
-                               else\r
-                                       unlink("/var/run/dhcpd.pid");\r
-                       }\r
-               }\r
-               safe_system("/bin/killall -KILL dhcpd");\r
-               close(fd);\r
-       }\r
-\r
-       safe_system("/sbin/iptables -F DHCPBLUEINPUT");\r
-\r
-       buffer[0] = '\0';\r
-\r
-       if ((fd = open(CONFIG_ROOT "/dhcp/enable_green", O_RDONLY)) != -1)\r
-       {\r
-               close(fd);\r
-               if ((fdblue = open(CONFIG_ROOT "/dhcp/enable_blue", O_RDONLY)) != -1)\r
-               {\r
-                       close(fdblue);\r
-                       \r
-                       snprintf(buffer, STRING_SIZE-1, "/sbin/iptables -A DHCPBLUEINPUT -p tcp --source-port 68 --destination-port 67 -i %s -j ACCEPT > /dev/null 2>&1", blue_dev);\r
-                       safe_system(buffer);\r
-                       snprintf(buffer, STRING_SIZE-1, "/sbin/iptables -A DHCPBLUEINPUT -p udp --source-port 68 --destination-port 67 -i %s -j ACCEPT > /dev/null 2>&1", blue_dev);\r
-                       safe_system(buffer);\r
-                       snprintf(buffer, STRING_SIZE-1, "/usr/sbin/dhcpd -q %s %s", green_dev, blue_dev);\r
-               } else {\r
-                       snprintf(buffer, STRING_SIZE-1, "/usr/sbin/dhcpd -q %s", green_dev);\r
-               }\r
-               safe_system(buffer);\r
-       } else {\r
-               if ((fdblue = open(CONFIG_ROOT "/dhcp/enable_blue", O_RDONLY)) != -1)\r
-               {\r
-                       close(fdblue);\r
-\r
-                       snprintf(buffer, STRING_SIZE-1, "/sbin/iptables -A DHCPBLUEINPUT -p tcp --source-port 68 --destination-port 67 -i %s -j ACCEPT > /dev/null 2>&1", blue_dev);\r
-                       safe_system(buffer);\r
-                       snprintf(buffer, STRING_SIZE-1, "/sbin/iptables -A DHCPBLUEINPUT -p udp --source-port 68 --destination-port 67 -i %s -j ACCEPT > /dev/null 2>&1", blue_dev);\r
-                       safe_system(buffer);\r
-                       snprintf(buffer, STRING_SIZE-1,  "/usr/sbin/dhcpd -q %s", blue_dev);\r
-                       safe_system(buffer);\r
-               }\r
-       }\r
-\r
-       if (buffer[0] != '\0')\r
-       {\r
-               /* Silly dhcpd creates pids with mode 640 */\r
-               sleep (1);\r
-               if ((fd = open("/var/run/dhcpd.pid", 0)) == -1)\r
-               {\r
-                       fprintf(stderr, "No pid file\n");\r
-                       return 1;\r
-               }\r
-               fchmod(fd, 00644);\r
-               close(fd);\r
-       }\r
-\r
-       return 0;\r
-}\r