summaryrefslogtreecommitdiff
path: root/man/rc_runlevel.3
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-12-24 22:03:27 +0000
committerRoy Marples <roy@marples.name>2007-12-24 22:03:27 +0000
commit5741ad634d778df45d802aa3ee1de5bee178f138 (patch)
treea79922fad6a955220b11d815372b333f721465f6 /man/rc_runlevel.3
parent7de72229a55300a7a22bfe4a4da43207f3fe475f (diff)
downloadopenrc-5741ad634d778df45d802aa3ee1de5bee178f138.tar.gz
openrc-5741ad634d778df45d802aa3ee1de5bee178f138.tar.bz2
openrc-5741ad634d778df45d802aa3ee1de5bee178f138.tar.xz
Add man pages for all librc functions.
Diffstat (limited to 'man/rc_runlevel.3')
-rw-r--r--man/rc_runlevel.367
1 files changed, 67 insertions, 0 deletions
diff --git a/man/rc_runlevel.3 b/man/rc_runlevel.3
new file mode 100644
index 0000000..3880c41
--- /dev/null
+++ b/man/rc_runlevel.3
@@ -0,0 +1,67 @@
+.\" Copyright 2007 Roy Marples
+.\" All rights reserved
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd Dec 24, 2007
+.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
+.In rc.h
+.Ft "char *" Fn rc_runlevel_get void
+.Ft bool Fn rc_runlevel_exists
+.Ft "char **" Fn rc_runlevel_list void
+.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
+.Fr "char **"
+returns a malloced NULL terminated array of malloced NULL terminated strings,
+all of which need to be freed using
+.Fn rc_strlist_free
+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
+.Xr rc_strlist_free 3
+.Sh AUTHORS
+.An "Roy Marples" Aq roy@marples.name