rc_runlevel(3)

rc_runlevel3

Rc runlevel functions

Usage

#include <rc.h>

char * Fn rc_runlevel_get void

bool Fn rc_runlevel_exists

RC_STRINGLIST * Fn rc_runlevel_list void

bool Fn rc_runlevel_set const char *runlevel

bool Fn rc_runlevel_starting void

bool Fn rc_runlevel_stopping void

Library

Run Command library (librc, -lrc)

Overview

These functions provide a means of querying OpenRC to find out which runlevel we are in and what services are in which runlevel.

Implementation notes

Each function that returns char * returns a malloced NULL terminated string that should be freed when done.

Each function that returns RC_STRINGLIST * should by freed by calling rc_stringlist_free() when done.

Files

/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.

Releases

6 releases since Debian 8 (Jessie); the text changed 2 times.

  1. 8
  2. 9–11
  3. 12–13

Authors

Roy Marples <[email protected]>

From librc-dev 0.56-1 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.