rc_runlevel_get(3) rc_runlevel_set


Run Command library (librc, -lrc)


In rc.h Ft char * Fn rc_runlevel_get void Ft bool Fn rc_runlevel_exists Ft RC_STRINGLIST * 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


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


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 Fn rc_stringlist_free when done.


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


An Roy Marples <[email protected]>