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
|
2021-12-21 06:37:00 +05:30
|
|
|
.\" https://github.com/OpenRC/openrc/blob/HEAD/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
|
2021-12-21 06:37:00 +05:30
|
|
|
.\" distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
|
2015-12-05 04:22:19 +05:30
|
|
|
.\" 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_RUNLEVEL 3 SMM
|
|
|
|
.Os OpenRC
|
|
|
|
.Sh NAME
|
|
|
|
.Nm rc_runlevel_get , rc_runlevel_exists , rc_runlevel_list , rc_runlevel_set ,
|
|
|
|
.Nm rc_runlevel_starting , rc_runlevel_stopping
|
|
|
|
.Nd RC runlevel 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 "char *" Fn rc_runlevel_get void
|
|
|
|
.Ft bool Fn rc_runlevel_exists
|
2008-03-16 22:30:56 +05:30
|
|
|
.Ft "RC_STRINGLIST *" Fn rc_runlevel_list void
|
2007-12-25 03:33:27 +05:30
|
|
|
.Ft bool Fn rc_runlevel_set "const char *runlevel"
|
|
|
|
.Ft bool Fn rc_runlevel_starting void
|
|
|
|
.Ft bool Fn rc_runlevel_stopping void
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
These functions provide a means of querying OpenRC to find out which runlevel
|
|
|
|
we are in and what services are in which runlevel.
|
|
|
|
.Sh IMPLEMENTATION NOTES
|
|
|
|
Each function that returns
|
|
|
|
.Fr "char *"
|
|
|
|
returns a malloced NULL terminated string that should be freed when done.
|
|
|
|
.Pp
|
|
|
|
Each function that returns
|
2008-03-16 22:30:56 +05:30
|
|
|
.Fr "RC_STRINGLIST *"
|
|
|
|
should by freed by calling
|
|
|
|
.Fn rc_stringlist_free
|
2007-12-25 03:33:27 +05:30
|
|
|
when done.
|
|
|
|
.Sh FILES
|
|
|
|
.Pa /etc/init.d/functions.sh
|
|
|
|
is provided by OpenRC, which allows shell scripts to use the above functions.
|
|
|
|
For historical reasons our verbose functions are prefixed with v instead of
|
|
|
|
suffixed. So einfov becomes veinfo, einfovn becomes veinfon.
|
|
|
|
Rinse and repeat for the other verbose functions.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr malloc 3 ,
|
|
|
|
.Xr free 3
|
2008-03-16 22:30:56 +05:30
|
|
|
.Xr rc_stringlist_free 3
|
2007-12-25 03:33:27 +05:30
|
|
|
.Sh AUTHORS
|
2008-12-31 00:38:51 +05:30
|
|
|
.An Roy Marples <roy@marples.name>
|