rc_config(3)

rc_config3

Functions to query openrc service configurations

Usage

#include <rc.h>

RC_STRINGLIST * Fn rc_config_list const char *file

RC_STRINGLIST * Fn rc_config_load const char *file

char * Fn rc_config_value const char *const *list const char *entry

bool Fn rc_yesno const char *value

Library

Run Command library (librc, -lrc)

Overview

These functions provide an easy means of querying OpenRC configuration files.

rc_config_list() returns a list of non comment lines in file. rc_config_load() does the same, but attempts to parse the line as if it was a shell assignment. rc_config_value() returns the value of entry found in list.

Each list should be freed using rc_stringlist_free() when done.

rc_yesno() returns if value is true, yes, on or 1 regardless of case, otherwise false. If value is also not false, no, off or 0 regardless of case then errno is set to EINVAL.

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.