rc_deptree_update(3) rc_deptree_load

LIBRARY

Run Command library (librc, -lrc)

SYNOPSIS

In rc.h Ft bool Fn rc_deptree_update void Ft bool Fn rc_deptree_update_needed void Ft RC_DEPTREE Fn rc_deptree_load void Ft RC_STRINGLIST * Fo rc_deptree_depend Fa const RC_DEPTREE *deptree Fa const char *type Fa const char *service Fc Ft bool Fo rc_deptree_depends Fa const RC_DEPTREE *deptree Fa const char *const *types Fa const char *const *services Fa const char *runlevel Fa int options Fc Ft RC_STRINGLIST * Fo rc_deptree_order Fa const RC_DEPTREE *deptree Fa const char *runlevel Fa int options Fc Ft void Fn rc_deptree_free RC_DEPTREE *deptree

DESCRIPTION

These functions provide a means of querying the dependencies of OpenRC services.

Fn rc_deptree_update updates the service dependency tree, normally /lib/rc/init.d/deptree Fn rc_deptree_update_needed checks to see if the dependency tree needs updated based on the mtime of it compared to /etc/init.d /etc/conf.d /usr/local/etc/init.d /usr/local/etc/conf.d /etc/rc.conf and any files specified by a service.

Fn rc_deptree_load loads the deptree and returns a pointer to it which needs to be freed by Fn rc_deptree_free when done.

Fn rc_deptree_depend , Fn rc_deptree_depends and Fn rc_deptree_order return a list of services from the Fa deptree based on the Fa type or Fa types of dependency. Fa options can be a bitmask of RC_DEP_TRACE and RC_DEP_STRICT RC_DEP_TRACE follows each services dependencies right down to the first service needed and RC_DEP_STRICT only lists services actually needed or in the runlevel

IMPLEMENTATION NOTES

Each function that returns RC_STRINGLIST * should be freed by calling Fn rc_stringlist_free when done.

AUTHORS

An Roy Marples <[email protected]>