OS Manuals

rc_config_value(3)

rc_config_list, rc_config_load, rc_config_value, rc_yesno — functions to query OpenRC service configurations

RC_CONFIG(3) Library Functions Manual (smm) RC_CONFIG(3)

rc_config_list, rc_config_load, rc_config_value, rc_yesno — functions to query OpenRC service configurations

Run Command library (librc, -lrc)

#include <rc.h>

RC_STRINGLIST *
rc_config_list(const char *file);

RC_STRINGLIST *
rc_config_load(const char *file);

char *
rc_config_value(const char *const *list, const char *entry);

bool
rc_yesno(const char *value);

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

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

Each list should be freed using () when done.

() returns true if value is "true", "yes", "y" or "1" regardless of case. Otherwise if value is "false", "no", "n" or "0" (regardless of case) returns false. If value does not match either, then returns false and sets errno to EINVAL.

malloc(3), rc_stringlist_free(3), sh(1)

Roy Marples <roy@marples.name>

March 17, 2008 OpenRC

openrc 0.64.1-r4 · os · ingested 2026-10-31