]> git.pld-linux.org Git - packages/chkconfig.git/commitdiff
- updated
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 24 Apr 2008 07:39:11 +0000 (07:39 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    chkconfig-noxinet.patch -> 1.7

chkconfig-noxinet.patch

index 0ad1689909aa1642928fcbea2c0e248d82202f9f..d80da787804afbde44aac7c1544b5b424987c3fc 100644 (file)
@@ -162,7 +162,7 @@ diff -urN chkconfig-1.3.37.org/chkconfig.c chkconfig-1.3.37/chkconfig.c
        else if (!strcmp(state, "off"))
 diff -urN chkconfig-1.3.37.org/leveldb.c chkconfig-1.3.37/leveldb.c
 --- chkconfig-1.3.37.org/leveldb.c     2007-08-03 19:57:56.000000000 +0200
-+++ chkconfig-1.3.37/leveldb.c 2008-04-24 09:30:40.913595417 +0200
++++ chkconfig-1.3.37/leveldb.c 2008-04-24 09:34:20.447423719 +0200
 @@ -149,101 +149,6 @@
        return 0;
  }
@@ -265,6 +265,24 @@ diff -urN chkconfig-1.3.37.org/leveldb.c chkconfig-1.3.37/leveldb.c
  int readServiceInfo(char * name, struct service * service, int honorHide) {
      char * filename = alloca(strlen(name) + strlen(RUNLEVELS) + 50);
      int fd;
+@@ -253,7 +158,7 @@
+     sprintf(filename, RUNLEVELS "/init.d/%s", name);
+     if ((fd = open(filename, O_RDONLY)) < 0) {
+-          return readXinetdServiceInfo(name,service,honorHide);
++          return -1;
+     }
+     parseret = parseServiceInfo(fd, name, &serv, honorHide, 0);
+@@ -290,7 +195,7 @@
+     sprintf(filename, RUNLEVELS "/init.d/%s", name);
+     if ((fd = open(filename, O_RDONLY)) < 0) {
+-          return readXinetdServiceInfo(name,service,honorHide);
++          return -1;
+     }
+     parseret = parseServiceInfo(fd, name, &serv, honorHide, 0);
 @@ -656,60 +561,6 @@
      return 1;
  }
@@ -326,3 +344,73 @@ diff -urN chkconfig-1.3.37.org/leveldb.c chkconfig-1.3.37/leveldb.c
  int doSetService(struct service s, int level, int on) {
      int priority = on ? s.sPriority : s.kPriority;
      char linkname[200];
+diff -urN chkconfig-1.3.37.org/ntsysv.c chkconfig-1.3.37/ntsysv.c
+--- chkconfig-1.3.37.org/ntsysv.c      2007-08-03 19:57:56.000000000 +0200
++++ chkconfig-1.3.37/ntsysv.c  2008-04-24 09:34:50.485526379 +0200
+@@ -131,16 +131,10 @@
+     if (!update) return 1;
+     for (i = 0; i < numServices; i++) {
+-      if (services[i].type == TYPE_XINETD) {
+-        if ((services[i].enabled && states[i] != '*') ||
+-          (!services[i].enabled && states[i] == '*'))
+-            setXinetdService(services[i], states[i] == '*');
+-      } else {
+             for (j = 0; j < 7; j++) {
+                     if (levels & (1 << j))
+                       doSetService(services[i], j, states[i] == '*');
+             }
+-      }
+     }
+     return 0;
+@@ -217,49 +211,6 @@
+     closedir(dir);
+-    if (!stat("/usr/sbin/xinetd",&sb)) {
+-    if (!(dir = opendir(XINETDDIR))) {
+-      fprintf(stderr, "failed to open " XINETDDIR ": %s\n",
+-              strerror(errno));
+-        return 2;
+-    }
+-
+-    while ((ent = readdir(dir))) {
+-      if (strchr(ent->d_name, '~') || strchr(ent->d_name, ',') ||
+-          strchr(ent->d_name, '.')) continue;
+-
+-      sprintf(fn, "%s/%s", XINETDDIR, ent->d_name);
+-      if (stat(fn, &sb))
+-      {
+-              err = errno;
+-              continue;
+-      }
+-      if (!S_ISREG(sb.st_mode)) continue;
+-
+-      if (numServices == numServicesAlloced) {
+-          numServicesAlloced += 10;
+-          services = realloc(services, 
+-                              numServicesAlloced * sizeof(*services));
+-      }
+-
+-      rc = readXinetdServiceInfo(ent->d_name, services + numServices, honorHide);
+-      
+-      if (rc == -1) {
+-          fprintf(stderr, _("error reading info for service %s: %s\n"),
+-                      ent->d_name, strerror(errno));
+-          closedir(dir);
+-          return 2;
+-      } else if (!rc)
+-          numServices++;
+-    }
+-
+-    if (err) {
+-      fprintf(stderr, _("error reading from directory %s: %s\n"),
+-              XINETDDIR, strerror(err));
+-        return 1;
+-    }
+-    }
+-
+     qsort(services, numServices, sizeof(*services), serviceNameCmp);
+     *servicesPtr = services;
This page took 0.10267 seconds and 4 git commands to generate.