1 diff -Nru chkconfig-1.2.24h.orig/chkconfig.c chkconfig-1.2.24h/chkconfig.c
2 --- chkconfig-1.2.24h.orig/chkconfig.c Wed Jul 17 20:10:55 2002
3 +++ chkconfig-1.2.24h/chkconfig.c Wed Jan 22 11:56:32 2003
9 struct config conf; // used by leveldb.c
11 #define _(String) gettext((String))
13 if (s.type == TYPE_XINETD) return 0;
15 for (i = 0; i <= conf.maxlevel; i++) {
16 - if (!isConfigured(name, i)) {
17 if ((1 << i) & s.levels)
18 doSetService(s, i, 1);
20 doSetService(s, i, 0);
28 int main(int argc, char ** argv) {
29 - int listItem = 0, addItem = 0, delItem = 0;
30 + int listItem = 0, delItem = 0;
33 int help=0, version=0;
34 diff -Nru chkconfig-1.2.24h.orig/leveldb.c chkconfig-1.2.24h/leveldb.c
35 --- chkconfig-1.2.24h.orig/leveldb.c Fri Apr 19 03:15:55 2002
36 +++ chkconfig-1.2.24h/leveldb.c Wed Jan 22 12:04:47 2003
41 +#include <sys/types.h>
47 2001-12-03 - Petter Reinholdtsen <pere@hungry.com>
51 char * english_desc = NULL;
53 + struct dirent *dirent;
56 sprintf(filename, "%s/%s", conf.initdir, name);
60 serv.name = strdup(name);
63 + strcpy(levelbuf,"/etc/rc.d/rc0.d");
64 + for(i=0;i<7;i++,levelbuf[12]++) {
65 + dir=opendir(levelbuf);
67 + while ((dirent=readdir(dir))) {
68 + if (strlen(dirent->d_name)<4) continue;
69 + if (strcmp(dirent->d_name+3,name)) continue;
70 + if (*dirent->d_name=='K') serv.levels &= ~(1<<i);
71 + else if (*dirent->d_name=='S') serv.levels |= 1<<i;