1 diff -Nur chkconfig-1.2.22.orig/chkconfig.c chkconfig-1.2.22/chkconfig.c
2 --- chkconfig-1.2.22.orig/chkconfig.c Sat Dec 30 05:25:26 2000
3 +++ chkconfig-1.2.22/chkconfig.c Thu Apr 5 23:39:20 2001
10 #define _(String) gettext((String))
13 if (s.type == TYPE_XINETD) return 0;
15 for (i = 0; i < 7; 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 -Nur chkconfig-1.2.22.orig/leveldb.c chkconfig-1.2.22/leveldb.c
35 --- chkconfig-1.2.22.orig/leveldb.c Fri Feb 2 18:51:01 2001
36 +++ chkconfig-1.2.22/leveldb.c Thu Apr 5 23:39:01 2001
41 +#include <sys/types.h>
47 1998-09-22 - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
51 char * english_desc = NULL;
53 + struct dirent *dirent;
56 sprintf(filename, RUNLEVELS "/init.d/%s", name);
61 serv.name = strdup(name);
64 + strcpy(levelbuf,"/etc/rc.d/rc0.d");
65 + for(i=0;i<7;i++,levelbuf[12]++) {
66 + dir=opendir(levelbuf);
68 + while ((dirent=readdir(dir))) {
69 + if (strlen(dirent->d_name)<4) continue;
70 + if (strcmp(dirent->d_name+3,name)) continue;
71 + if (*dirent->d_name=='K') serv.levels &= ~(1<<i);
72 + else if (*dirent->d_name=='S') serv.levels |= 1<<i;