]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Den Installer ordentlich abgespeckt.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Fri, 17 Aug 2007 09:01:02 +0000 (09:01 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Fri, 17 Aug 2007 09:01:02 +0000 (09:01 +0000)
restartsyslogd entfernt.

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

12 files changed:
config/rootfiles/common/misc-progs
doc/packages-list.txt
src/install+setup/install/Makefile
src/install+setup/install/ide.c [deleted file]
src/install+setup/install/install.h
src/install+setup/install/main.c
src/install+setup/install/scsi.c [deleted file]
src/install+setup/install/usb.c [deleted file]
src/install+setup/setup/setup.h
src/misc-progs/Makefile
src/misc-progs/restartsyslogd.c [deleted file]
src/scripts/httpscert

index 91085966be27b09ea44c29cd9c704563fdd008ec..419920c04e076fd4d5e834d8d105a360413f502e 100644 (file)
@@ -17,7 +17,6 @@ usr/local/bin/qosctrl
 usr/local/bin/rebuildhosts
 usr/local/bin/redctrl
 usr/local/bin/restartssh
-usr/local/bin/restartsyslogd
 usr/local/bin/restartwireless
 #usr/local/bin/sambactrl
 usr/local/bin/setaliases
index ca7aea70a36896cae991adb7dce78ee2658fbd19..a90f587114e381219343a47027fc9bb325c42e11 100644 (file)
@@ -28,7 +28,6 @@
 * Net-Server-0.93
 * Net_SSLeay.pm-1.25
 * Python-2.4.3
-* SnortSnarf-050314.1
 * Text-Tabs+Wrap-2005.0824
 * URI-1.35
 * Unix-Syslog-0.100
@@ -52,7 +51,6 @@
 * bwm-ng-0.6
 * bzip2-1.0.3
 * calamaris-2.59
-* capi4k-utils-2005-07-18
 * ccache-2.4
 * cdrtools-2.01
 * cftp-0.12
 * ethtool-3
 * expat-2.0.0
 * ez-ipupdate-3.0.11b8
-* fcdsl-suse93-3.11-07
-* fcdsl2-suse93-3.11-07
-* fcdslsl-suse93-3.11-07
-* fcdslslusb-suse93-3.11-05
-* fcdslusb-suse93-3.11-07
 * fcron-3.0.1
 * fetchmail-6.3.4
 * file-4.17
index 6f3a66fbd7af3e55ea9fde9a4cfce36725cef07f..9fddb4f701265dcc681d0ffa8b472af8301b4f9b 100644 (file)
@@ -23,7 +23,7 @@ clean :
 
 ######
 
-OBJS=main.o ide.o nic.o net.o config.o ../libsmooth/libsmooth.o usb.o scsi.o unattended.o
+OBJS=main.o nic.o net.o config.o ../libsmooth/libsmooth.o unattended.o
 
 install: $(OBJS)
        $(LINK) $(OBJS) -o $@ $(LIBS)
diff --git a/src/install+setup/install/ide.c b/src/install+setup/install/ide.c
deleted file mode 100644 (file)
index 795e69d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/* SmoothWall install program.
- *
- * This program is distributed under the terms of the GNU General Public
- * Licence.  See the file COPYING for details.
- *
- * (c) Lawrence Manning, 2001
- * Contains some functs for scanning /proc for ide info on CDROMS and
- * harddisks.
- * 
- */
-
-#include "install.h"
-
-int initialize_ide() {
-    mysystem("/sbin/modprobe ide-generic");
-    mysystem("/sbin/modprobe generic");
-    mysystem("/sbin/modprobe ide-cd");
-    mysystem("/sbin/modprobe ide-disk");
-
-    return 0;
-}
-
-/* checkide().  Scans the named drive letter and returns the IDE_??? type. */
-int checkide(char letter)
-{
-       FILE *f = NULL;
-       char filename[STRING_SIZE];
-       char buffer[STRING_SIZE];
-       
-       sprintf(filename, "/proc/ide/hd%c/media", letter);
-       
-       if (!(f = fopen(filename, "r")))
-               return IDE_EMPTY;
-               
-       if (!(fgets(buffer, STRING_SIZE, f)))
-       {
-               printf("Couldn't read from %s\n", filename);
-               fclose(f);
-               return IDE_EMPTY;
-       }
-               
-       fclose(f);
-       
-       stripnl(buffer);
-       
-       if (strcmp(buffer, "cdrom") == 0)
-               return IDE_CDROM;
-       else if (strcmp(buffer, "disk") == 0)
-               return IDE_HD;
-       else
-               return IDE_UNKNOWN;
-}
-
-/* findidetype().  Finds the first ide deveice of the given IDE_?? type. */
-char findidetype(int type)
-{
-       char letter;
-       
-       for (letter = 'a'; letter <= 'z'; letter++)
-       {
-               if ((checkide(letter)) == type)
-               {
-                       return letter;
-               }
-       }
-       return '\0';
-}
-
index be62c8b360cd6b12d5c5e5adf060ec5607b5a189..14df0531abccf9d933581bc195897e73deb90c27 100644 (file)
@@ -26,14 +26,6 @@ struct devparams
        char options[STRING_SIZE];
 };
 
-/* ide.c */
-int initialize_ide();
-int checkide(char letter);
-char findidetype(int type);
-
-/* cdrom.c */
-int ejectcdrom(char *dev);
-
 /* nic.c */
 int networkmenu(struct keyvalue *ethernetkv);
 
@@ -45,14 +37,5 @@ int write_disk_configs(struct devparams *dp);
 int write_lang_configs( char *lang);
 int write_ethernet_configs(struct keyvalue *ethernetkv);
 
-/* usb.c */
-int initialize_usb();
-int write_usb_modules_conf();
-int checkusb (char *partition);
-
-/* scsi.c */
-int try_scsi(char *dev);
-int get_boot(char *dev);
-
 /* unattended.c */
 int unattended_setup(struct keyvalue *unattendedkv);
index 6732c8aac84138814b2a41aa9890d0532c5bfe0f..c8c14bbccb37c97031b49bd1f035b7678cdc5cde 100644 (file)
@@ -142,29 +142,23 @@ int main(int argc, char *argv[])
        {
                fprintf(flog, "Couldn't open commandline: /proc/cmdline\n");
        } else {
+               mysystem("/sbin/modprobe ide-generic");
+               mysystem("/sbin/modprobe generic");
+               mysystem("/sbin/modprobe ide-cd");
+               mysystem("/sbin/modprobe ide-disk");
+               mysystem("/sbin/modprobe sd_mod");
+               mysystem("/sbin/modprobe sr_mod");
+               mysystem("/sbin/modprobe usb-storage");
+               
                fgets(line, STRING_SIZE, cmdfile);
-               if (strstr (line, "noide") == NULL) {
-                       fprintf(flog, "Initializing IDE controllers.\n");
-                       initialize_ide();
-               } else {
-                       fprintf(flog, "Skipping IDE detection.\n");
-               }
-               if (strstr (line, "nousb") == NULL) {
-                       fprintf(flog, "Initializing USB controllers.\n");
-                       initialize_usb();
-               } else {
-                       fprintf(flog, "Skipping USB detection.\n");
-               }
+               
                // check if we have to make an unattended install
                if (strstr (line, "unattended") != NULL) {
                    unattended = 1;
                }
-               // Loading the cdrom-filesystem and ext2
-               mysystem("/sbin/modprobe iso9660");
-               mysystem("/sbin/modprobe ext2");
-               
-               // Loading the via_rhine driver because it isn't detected correctly (sometimes)
-               mysystem("/sbin/modprobe via-rhine");
+               mysystem("/sbin/modprobe iso9660"); // CDROM
+               mysystem("/sbin/modprobe ext2"); // Boot patition
+               mysystem("/sbin/modprobe vfat"); // USB key
        }
 
        if (unattended) {
@@ -535,9 +529,6 @@ int main(int argc, char *argv[])
                errorbox(ctr[TR_UNABLE_TO_INSTALL_FILES]);
                goto EXIT;
        }
-               
-       /* Save USB controller type to modules.conf */
-       write_usb_modules_conf();
        
        /* Save language und local settings */
        write_lang_configs(shortlangname);
diff --git a/src/install+setup/install/scsi.c b/src/install+setup/install/scsi.c
deleted file mode 100644 (file)
index b9c2fe0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* IPCop install program.
- *
- * This program is distributed under the terms of the GNU General Public
- * Licence.  See the file COPYING for details.
- *
- * (c) Alan Hourihane, 2003 <alanh@fairlite.demon.co.uk>
- * 
- * $Id: scsi.c
- * 
- */
-
-#include "install.h"
-
-int
-try_scsi(char *disk_device)
-{
-       int fd;
-       char dev[10];
-
-       sprintf(dev, "/dev/%s", disk_device);
-
-       if ((fd = open(dev, O_RDONLY)) < 0)
-               return 0;
-
-       close(fd);
-       // remove usb scsi
-       return (checkusb(disk_device) ? 0:1);
-       //return 1;
-}
diff --git a/src/install+setup/install/usb.c b/src/install+setup/install/usb.c
deleted file mode 100644 (file)
index 57ba56f..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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 2002: Mark Wormgoor <mark@wormgoor.com>
- * 
- */
-
-#include "install.h"
-
-int usbuhci = 0;
-int usbohci = 0;
-int ehcihcd = 0;
-
-int initialize_usb() {
-    mysystem("/sbin/modprobe sd_mod");
-    mysystem("/sbin/modprobe sr_mod");
-    mysystem("/sbin/modprobe usb-storage");
-    mysystem("/sbin/modprobe vfat");
-
-    if (ehcihcd) {
-       mysystem("/sbin/rmmod ehci-hcd");
-       ehcihcd = 0;
-    }
-    if (usbohci) {
-       mysystem("/sbin/rmmod ohci-hcd");
-       usbohci = 0;
-    }
-    if (usbuhci) {
-       mysystem("/sbin/rmmod uhci-hcd");
-       usbuhci = 0;
-    }
-
-    if (mysystem("/sbin/modprobe ehci-hcd") == 0)
-       ehcihcd = 1;
-    if (mysystem("/sbin/modprobe ohci-hcd") == 0)
-       usbohci = 1;
-    if (mysystem("/sbin/modprobe uhci-hcd") == 0)
-       usbuhci = 1;
-
-    mysystem("/sbin/modprobe usbhid");
-    return 0;
-}
-
-int write_usb_modules_conf() {
-    int index;
-    FILE *handle;
-
-    if (!(handle = fopen("/harddisk/etc/modules.conf", "a")))
-       return 0;
-
-    index = 0;
-
-#if 0 /* we don't do this yet, because one of the drivers has a problem 
-       * with it */
-    if (ehcihcd) {
-       if (index)
-               fprintf(handle,"alias usb-controller%d ehci-hcd\n",index);
-       else
-               fprintf(handle,"alias usb-controller ehci-hcd\n");
-       index++;
-    }
-#endif
-
-    if (usbohci) {
-       if (index)
-               fprintf(handle,"alias usb-controller%d ohci-hcd\n",index);
-       else
-               fprintf(handle,"alias usb-controller ohci-hcd\n");
-       index++;
-    }
-
-    if (usbuhci) {
-       if (index)
-               fprintf(handle,"alias usb-controller%d uhci-hcd\n",index);
-       else
-               fprintf(handle,"alias usb-controller uhci-hcd\n");
-       index++;
-    }
-    fclose(handle);
-    
-    return 0;
-}
-
-/* Scans the named partitions and returns true if USB-removable. */
-int checkusb(char *device)
-{
-       FILE *f = NULL;
-       char filename[STRING_SIZE];
-       char command[STRING_SIZE];
-       char buffer[STRING_SIZE];
-       int found = 0;
-       
-       sprintf(command, "udevinfo -a -p /sys/block/%s | grep BUS | sort| uniq >/tmp/usbscan 2>/dev/null", device);
-       system(command);
-       
-       f = fopen("/tmp/usbscan", "r");
-       while (fgets(buffer, STRING_SIZE, f)) {
-               if (strstr(buffer,"usb")) found=1;
-       }
-       fclose(f);
-       
-       if (found) return 0;
-               else return 1;
-}
index 064ebff88a56b869b5f336081d4da1b92d78997d..f1b9129ed1acf8cdd6014827d0bebd8d8aecc111 100644 (file)
@@ -18,9 +18,6 @@ int handlehostname(void);
 /* domainname.c */
 int handledomainname(void);
 
-/* isdn.c */
-int handleisdn(void);
-
 /* networking.c */
 int handlenetworking(void);
 
index c7eb052c07278d5fd5d710c63e27971459d65b0a..01889fe5a9534ea5a1344dbb8178afd887e8d635 100644 (file)
@@ -8,7 +8,7 @@ SUID_PROGS = setdmzholes setportfw setfilters setxtaccess \
        squidctrl restartssh ipfirereboot setaliases \
        ipsecctrl timectrl dhcpctrl snortctrl \
        applejuicectrl rebuildhosts backupctrl \
-       restartsyslogd logwatch openvpnctrl outgoingfwctrl \
+       logwatch openvpnctrl outgoingfwctrl \
        restartwireless getipstat qosctrl launch-ether-wake \
        redctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
        smartctrl clamavctrl pakfire mpfirectrl
@@ -106,9 +106,6 @@ squidctrl: squidctrl.c setuid.o ../install+setup/libsmooth/varval.o
 snortctrl: snortctrl.c setuid.o ../install+setup/libsmooth/varval.o
        $(COMPILE) -I../install+setup/libsmooth/ snortctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
 
-restartsyslogd: restartsyslogd.c setuid.o ../install+setup/libsmooth/varval.o
-       $(COMPILE) -I../install+setup/libsmooth/ restartsyslogd.c setuid.o ../install+setup/libsmooth/varval.o -o $@
-
 restartwireless: restartwireless.c setuid.o ../install+setup/libsmooth/varval.o
        $(COMPILE) -I../install+setup/libsmooth/ restartwireless.c setuid.o ../install+setup/libsmooth/varval.o -o $@
 
diff --git a/src/misc-progs/restartsyslogd.c b/src/misc-progs/restartsyslogd.c
deleted file mode 100644 (file)
index ee36f04..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/* This file is part of the IPCop Firewall.\r
- *\r
- * This program is distributed under the terms of the GNU General Public\r
- * Licence.  See the file COPYING for details.\r
- *\r
- * Copyright (C) 2003-07-12 Robert Kerr <rkerr@go.to>\r
- *\r
- * $Id: restartsyslogd.c,v 1.2.2.3 2004/12/14 17:56:37 gespinasse Exp $\r
- *\r
- */\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <unistd.h>\r
-#include <string.h>\r
-#include <sys/stat.h>\r
-#include <sys/types.h>\r
-#include <fcntl.h>\r
-#include <signal.h>\r
-#include <errno.h>\r
-#include "libsmooth.h"\r
-#include "setuid.h"\r
-\r
-#define ERR_ANY 1\r
-#define ERR_SETTINGS 2    /* error in settings file */\r
-#define ERR_ETC 3         /* error with /etc permissions */\r
-#define ERR_CONFIG 4      /* error updated sshd_config */\r
-#define ERR_SYSLOG 5      /* error restarting syslogd */\r
-\r
-int main(void)\r
-{\r
-   char buffer[STRING_SIZE], hostname[STRING_SIZE];\r
-   int config_fd,rc,fd,pid;\r
-   struct stat st;\r
-   struct keyvalue *kv = NULL;\r
-   memset(buffer, 0, STRING_SIZE);\r
-   memset(hostname, 0, STRING_SIZE);\r
-\r
-   if (!(initsetuid()))\r
-      exit(1);\r
-\r
-\r
-   /* Read in and verify config */\r
-   kv=initkeyvalues();\r
-\r
-   if (!readkeyvalues(kv, CONFIG_ROOT "/logging/settings"))\r
-   {\r
-      fprintf(stderr, "Cannot read syslog settings\n");\r
-      exit(ERR_SETTINGS);\r
-   }\r
-\r
-   if (!findkey(kv, "ENABLE_REMOTELOG", buffer))\r
-   {\r
-      fprintf(stderr, "Cannot read ENABLE_REMOTELOG\n");\r
-      exit(ERR_SETTINGS);\r
-   }\r
-\r
-   if (!findkey(kv, "REMOTELOG_ADDR", hostname))\r
-   {\r
-      fprintf(stderr, "Cannot read REMOTELOG_ADDR\n");\r
-      exit(ERR_SETTINGS);\r
-   }\r
-\r
-   if (strspn(hostname, VALID_FQDN) != strlen(hostname))\r
-   {\r
-      fprintf(stderr, "Bad REMOTELOG_ADDR: %s\n", hostname);\r
-      exit(ERR_SETTINGS);\r
-   }\r
-\r
-   freekeyvalues(kv);\r
-\r
-\r
-   /* If anyone other than root can write to /etc this would be totally\r
-    * insecure - same if anyone other than root owns /etc, as they could\r
-    * change the file mode to give themselves or anyone else write access. */\r
-   if(lstat("/etc",&st))\r
-   {\r
-      perror("Unable to stat /etc");\r
-      exit(ERR_ETC);\r
-   }\r
-   if(!S_ISDIR(st.st_mode))\r
-   {\r
-      fprintf(stderr,"/etc is not a directory?!\n");\r
-      exit(ERR_ETC);\r
-   }\r
-   if ( st.st_uid != 0  ||  st.st_mode & S_IWOTH ||\r
-      ((st.st_gid != 0) && (st.st_mode & S_IWGRP)) )\r
-   {\r
-      fprintf(stderr,"/etc is owned/writable by non-root users\n");\r
-      exit(ERR_ETC);\r
-   }\r
-\r
-   /* O_CREAT with O_EXCL will make open() fail if the file already exists -\r
-    * mostly to prevent 2 copies running at once */\r
-   if ((config_fd = open( "/etc/syslog.conf.new", O_WRONLY|O_CREAT|O_EXCL, 0644 )) == -1 )\r
-   {\r
-      perror("Unable to open new config file");\r
-      exit(ERR_CONFIG);\r
-   }\r
-\r
-   if (!strcmp(buffer,"on"))\r
-      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@\\).\\+$/\\1%s/' /etc/syslog.conf >&%d", hostname, config_fd );\r
-   else\r
-      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@.\\+\\)$/#\\1/' /etc/syslog.conf >&%d", config_fd );\r
-\r
-   /* if the return code isn't 0 failsafe */\r
-   if ((rc = unpriv_system(buffer,99,99)) != 0)\r
-   {\r
-      fprintf(stderr, "sed returned bad exit code: %d\n", rc);\r
-      close(config_fd);\r
-      unlink("/etc/syslog.conf.new");\r
-      exit(ERR_CONFIG);\r
-   }\r
-   close(config_fd);\r
-   if (rename("/etc/syslog.conf.new","/etc/syslog.conf") == -1)\r
-   {\r
-      perror("Unable to replace old config file");\r
-      unlink("/etc/syslog.conf.new");\r
-      exit(ERR_CONFIG);\r
-   }\r
-\r
-\r
-   /* Get syslogd to read the new config file */\r
-   if ((fd = open("/var/run/syslogd.pid", O_RDONLY)) == -1)\r
-   {\r
-      if(errno == ENOENT)\r
-      {\r
-         /* pid file doesn't exists.. restart syslog */\r
-         if((rc = safe_system("/usr/sbin/syslogd -m 0")) == 0 )\r
-            return 0;\r
-         else\r
-         {\r
-            fprintf(stderr,\r
-               "Unable to restart syslogd - returned exit code %d\n", rc);\r
-            exit(ERR_SYSLOG);\r
-         }\r
-      } else {\r
-         /* Something odd is going on, failsafe */\r
-         perror("Unable to open pid file");\r
-         exit(ERR_SYSLOG);\r
-      }\r
-   }\r
-\r
-   memset(buffer, 0, STRING_SIZE);\r
-   if (read(fd, buffer, STRING_SIZE - 1) == -1)\r
-   {\r
-      close(fd);\r
-      perror("Couldn't read from pid file");\r
-      exit(ERR_SYSLOG);\r
-   }\r
-   close(fd);\r
-   /* strtol does sanity checks that atoi doesn't do */\r
-   errno = 0;\r
-   pid = (int)strtol(buffer, (char **)NULL, 10);\r
-   if (errno || pid <= 1)\r
-   {\r
-      fprintf(stderr, "Bad pid value\n");\r
-      exit(ERR_SYSLOG);\r
-   }\r
-   if (kill(pid, SIGHUP) == -1)\r
-   {\r
-      fprintf(stderr, "Unable to send SIGHUP\n");\r
-      exit(ERR_SYSLOG);\r
-   }\r
-\r
-   return 0;\r
-}\r
index 2c5a928296e4d699ebd005381465505b98752b5c..fb2d64bace8d9060a3083d847eb54218dac10c27 100644 (file)
@@ -1,6 +1,5 @@
 #!/bin/sh
 #
-# $Id: httpscert,v 1.1.2.2 2005/12/15 21:59:57 eoberlander Exp $
 # new : generate new certificate
 # read: read issuer in certificate and verify if it is the same as hostname