Author: arekm                        Date: Thu Apr 24 07:39:17 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated

---- Files affected:
SOURCES:
   chkconfig-noxinet.patch (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SOURCES/chkconfig-noxinet.patch
diff -u SOURCES/chkconfig-noxinet.patch:1.6 SOURCES/chkconfig-noxinet.patch:1.7
--- SOURCES/chkconfig-noxinet.patch:1.6 Thu Apr 24 09:34:28 2008
+++ SOURCES/chkconfig-noxinet.patch     Thu Apr 24 09:39:11 2008
@@ -162,7 +162,7 @@
        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 @@
  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 @@
  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;
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/chkconfig-noxinet.patch?r1=1.6&r2=1.7&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to