2015-12-05 04:22:19 +05:30
|
|
|
.\" Copyright (c) 2007-2015 The OpenRC Authors.
|
|
|
|
.\" See the Authors file at the top-level directory of this distribution and
|
|
|
|
.\" https://github.com/OpenRC/openrc/blob/master/AUTHORS
|
2007-12-25 03:33:27 +05:30
|
|
|
.\"
|
2015-12-05 04:22:19 +05:30
|
|
|
.\" This file is part of OpenRC. It is subject to the license terms in
|
|
|
|
.\" the LICENSE file found in the top-level directory of this
|
|
|
|
.\" distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
|
|
|
|
.\" This file may not be copied, modified, propagated, or distributed
|
|
|
|
.\" except according to the terms contained in the LICENSE file.
|
2007-12-25 03:33:27 +05:30
|
|
|
.\"
|
2008-03-16 22:30:56 +05:30
|
|
|
.Dd Mar 16, 2008
|
2007-12-25 03:33:27 +05:30
|
|
|
.Dt RC_DEPTREE 3 SMM
|
|
|
|
.Os OpenRC
|
|
|
|
.Sh NAME
|
|
|
|
.Nm rc_deptree_update , rc_deptree_update_needed , rc_deptree_load ,
|
|
|
|
.Nm rc_deptree_depend , rc_deptree_depends , rc_deptree_order ,
|
|
|
|
.Nm rc_deptree_free
|
|
|
|
.Nd RC dependency tree functions
|
|
|
|
.Sh LIBRARY
|
|
|
|
Run Command library (librc, -lrc)
|
|
|
|
.Sh SYNOPSIS
|
2012-01-22 05:47:42 +05:30
|
|
|
.In rc.h
|
2007-12-25 03:33:27 +05:30
|
|
|
.Ft bool Fn rc_deptree_update void
|
|
|
|
.Ft bool Fn rc_deptree_update_needed void
|
2008-03-16 22:30:56 +05:30
|
|
|
.Ft RC_DEPTREE Fn rc_deptree_load void
|
|
|
|
.Ft "RC_STRINGLIST *" Fo rc_deptree_depend
|
|
|
|
.Fa "const RC_DEPTREE *deptree"
|
2007-12-25 03:33:27 +05:30
|
|
|
.Fa "const char *type"
|
|
|
|
.Fa "const char *service"
|
|
|
|
.Fc
|
|
|
|
.Ft bool Fo rc_deptree_depends
|
2008-03-16 22:30:56 +05:30
|
|
|
.Fa "const RC_DEPTREE *deptree"
|
2007-12-25 03:33:27 +05:30
|
|
|
.Fa "const char *const *types"
|
|
|
|
.Fa "const char *const *services"
|
|
|
|
.Fa "const char *runlevel"
|
|
|
|
.Fa "int options"
|
|
|
|
.Fc
|
2008-03-16 22:30:56 +05:30
|
|
|
.Ft "RC_STRINGLIST *" Fo rc_deptree_order
|
|
|
|
.Fa "const RC_DEPTREE *deptree"
|
2007-12-25 03:33:27 +05:30
|
|
|
.Fa "const char *runlevel"
|
|
|
|
.Fa "int options"
|
|
|
|
.Fc
|
2008-03-16 22:30:56 +05:30
|
|
|
.Ft void Fn rc_deptree_free "RC_DEPTREE *deptree"
|
2007-12-25 03:33:27 +05:30
|
|
|
.Sh DESCRIPTION
|
|
|
|
These functions provide a means of querying the dependencies of OpenRC
|
|
|
|
services.
|
|
|
|
.Pp
|
|
|
|
.Fn rc_deptree_update
|
|
|
|
updates the service dependency tree, normally
|
|
|
|
.Pa /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
|
|
|
|
.Pa /etc/init.d ,
|
|
|
|
.Pa /etc/conf.d ,
|
|
|
|
.Pa /usr/local/etc/init.d ,
|
|
|
|
.Pa /usr/local/etc/conf.d ,
|
|
|
|
.Pa /etc/rc.conf
|
|
|
|
and any files specified by a service.
|
|
|
|
.Pp
|
|
|
|
.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.
|
|
|
|
.Pp
|
|
|
|
.Fn rc_deptree_depend ,
|
2012-01-22 05:47:42 +05:30
|
|
|
.Fn rc_deptree_depends
|
2007-12-25 03:33:27 +05:30
|
|
|
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
|
|
|
|
.Va RC_DEP_TRACE
|
|
|
|
and
|
|
|
|
.Va RC_DEP_STRICT .
|
|
|
|
.Va RC_DEP_TRACE
|
|
|
|
follows each services dependencies right down to the first service needed and
|
|
|
|
.Va RC_DEP_STRICT
|
|
|
|
only lists services actually needed or in the
|
|
|
|
.Va runlevel .
|
|
|
|
.Sh IMPLEMENTATION NOTES
|
|
|
|
Each function that returns
|
2008-03-16 22:30:56 +05:30
|
|
|
.Fr "RC_STRINGLIST *"
|
|
|
|
should be freed by calling
|
|
|
|
.Fn rc_stringlist_free
|
2007-12-25 03:33:27 +05:30
|
|
|
when done.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr malloc 3 ,
|
|
|
|
.Xr free 3 ,
|
2008-03-16 22:30:56 +05:30
|
|
|
.Xr rc_stringlist_free 3 ,
|
2013-12-22 02:21:11 +05:30
|
|
|
.Xr openrc-run 8
|
2007-12-25 03:33:27 +05:30
|
|
|
.Sh AUTHORS
|
2008-12-31 00:38:51 +05:30
|
|
|
.An Roy Marples <roy@marples.name>
|