GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SHTK_CONFIG_LOAD(3) FreeBSD Library Functions Manual SHTK_CONFIG_LOAD(3)

shtk_config_load
Loads a configuration file

shtk_import config

shtk_config_load config_file

The shtk_config_load function parses and loads the configuration file given by config_file.

Only the configuration variables previously registered as valid with a call to shtk_config_init(3) will be recognized as valid variables during load. Any variables defined by the configuration file but not registered in the shtk_config_load module will be ignored during load.

Consider the following configuration file:
prefix=/usr
OBJDIR="${prefix}/obj"
SRCDIR="${prefix}/src"

The following piece of code illustrates how to load and display the settings of the file above:

shtk_config_init OBJDIR SRCDIR
shtk_config_load ".../path/to/the/file/above.conf"

echo "prefix was defined but is not available:" \
    "$(shtk_config_get_default prefix default-value)"
echo "OBJDIR is $(shtk_config_get OBJDIR)"
echo "SRCDIR is $(shtk_config_get SRCDIR)"

Errors during the processing of config_file result in the termination of the caller script.

shtk(3), shtk_config(3)

shtk_config_load first appeared in shtk 1.0.
November 6, 2014 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.