]> git.pld-linux.org Git - packages/chkconfig.git/blob - chkconfig-more_readable.patch
- adjust for PLD
[packages/chkconfig.git] / chkconfig-more_readable.patch
1 diff -Nur b.chkconfig-1.2.24h/chkconfig.c n.chkconfig-1.2.24h/chkconfig.c
2 --- b.chkconfig-1.2.24h/chkconfig.c     2005-08-04 20:31:03.145936000 +0200
3 +++ n.chkconfig-1.2.24h/chkconfig.c     2005-08-04 22:29:48.719684984 +0200
4 @@ -106,6 +106,7 @@
5      int rc;
6      int i;
7      struct service s;
8 +       char *on, *off;
9  
10      if ((rc = readServiceInfo(name, &s, 0))) {
11         if (!forgiving)
12 @@ -115,10 +116,13 @@
13  
14      printf("%-15s", s.name);
15  
16 -    for (i = 0; i <= conf.maxlevel; i++) {
17 -       printf("\t%d:%s", i, isOn(s.name, i) ? _("on") : _("off"));
18 -    }
19 -    printf("\n");
20 +       on = getenv("CHKCONFIG_ON");
21 +       off = getenv("CHKCONFIG_OFF");
22 +
23 +    for (i = 0; i <= conf.maxlevel; i++)
24 +               printf("\t%d:%s", i, isOn(s.name, i) ? on ? on : _("on") : off ? off : _("off"));
25 +    
26 +       printf("\n");
27  
28      return 0;
29  }
This page took 0.182092 seconds and 3 git commands to generate.