summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-05-20 08:54:15 -0700
committerDan Nicholson <dbn.lists@gmail.com>2008-05-20 08:54:15 -0700
commit7bb1fab3c564e937de4d6e81196984d87df8ddc6 (patch)
tree96bba963647aa046fe44bb052bb2542b430b5ae8 /test
parente83dc0011726c8ae4cfe75f873d38caba968f52f (diff)
Cache active links when scanning rc?.d directories
When scanning the rc?.d directories to find which services are active, we now add paths to the active links in the initd_t astart_links and astop_links fields. These paths are relative to the init.d directory, e.g., ../rc1.d/S20foo.
Diffstat (limited to 'test')
-rw-r--r--test/tactive.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/tactive.c b/test/tactive.c
index 2a6a994..cc4ac18 100644
--- a/test/tactive.c
+++ b/test/tactive.c
@@ -32,6 +32,7 @@ int main(int argc, char *argv[])
static void print_actives(const initd_list_t *ilp)
{
initd_t *ip;
+ int n, nstr;
if (!ilp)
return;
@@ -40,8 +41,24 @@ static void print_actives(const initd_list_t *ilp)
printf("%s active start levels:", ip->name);
print_rc_string(ip, SK_START);
+ nstr = ip->astart_links->nstr;
+ if (nstr > 0) {
+ printf("%s active start links:", ip->name);
+ for (n = 0; n < nstr; n++)
+ printf(" %s", ip->astart_links->str[n]);
+ printf("\n");
+ }
+
printf("%s active stop levels:", ip->name);
print_rc_string(ip, SK_STOP);
+
+ nstr = ip->astop_links->nstr;
+ if (nstr > 0) {
+ printf("%s active stop links:", ip->name);
+ for (n = 0; n < nstr; n++)
+ printf(" %s", ip->astop_links->str[n]);
+ printf("\n");
+ }
}
}