yumapro
24.10-3
YumaPro SDK
|
CLI utilities to process the CLI parameters at boot-time. More...
Typedefs | |
typedef status_t(* | agt_conf_write_fn_t) (FILE *conf_file, void *cookie) |
conf file writer function callback More... | |
Functions | |
status_t | agt_cli_process_input (int argc, char *argv[], agt_profile_t *agt_profile, boolean *showver, help_mode_t *showhelpmode, boolean *no_watcher) |
Process the param line parameters against the hardwired parmset for the netconfd program. More... | |
val_value_t * | agt_cli_get_valset (void) |
Retrieve the command line parameter set from boot time. More... | |
const xmlChar * | agt_cli_get_confspec (void) |
Retrieve the config file used or NULL if none. More... | |
void | agt_cli_cleanup (void) |
Cleanup the module static data. More... | |
status_t | agt_conf_load_files (const xmlChar *conf_filespec, val_value_t *valset, const xmlChar *conf_dirspec, boolean *skip_def_confdir) |
Default main loaded first: /etc/yumapro/netconfd-pro.conf. More... | |
status_t | agt_conf_create_file (const xmlChar *confname, const xmlChar *revision, agt_conf_write_fn_t conf_write_fn, void *cookie) |
Create a module or bundle config in the confdir. More... | |
status_t | agt_conf_delete_file (const xmlChar *confname, const xmlChar *revision) |
Delete a module or bundle config in the confdir. More... | |
status_t | agt_conf_test_write_file (const xmlChar *confname, const xmlChar *revision) |
Test Append a conf dir. More... | |
void | agt_profile_init_server_profile (agt_profile_t *agt_profile) |
Hardwire the initial server profile variables. More... | |
void | agt_profile_clean_server_profile (agt_profile_t *agt_profile) |
Clean the server profile variables. More... | |
CLI utilities to process the CLI parameters at boot-time.
Default conf file is stored in /etc/yumapro/netconfd-pro.conf.
Gathers all parameters and keeps them in an accessible val_value_t tree while the program is running. The parameters are applied to the system at boot-time.
Parameters entered at the command line will over-ride any value set in the .conf file. The 'config' parameter is not allowed in a .conf file.
typedef status_t(* agt_conf_write_fn_t) (FILE *conf_file, void *cookie) |
conf file writer function callback
conf_file | open file to write |
cookie | caller parameter cookie |
void agt_cli_cleanup | ( | void | ) |
Cleanup the module static data.
Called by the server during shutdown.
const xmlChar * agt_cli_get_confspec | ( | void | ) |
Retrieve the config file used or NULL if none.
val_value_t * agt_cli_get_valset | ( | void | ) |
Retrieve the command line parameter set from boot time.
status_t agt_cli_process_input | ( | int | argc, |
char * | argv[], | ||
agt_profile_t * | agt_profile, | ||
boolean * | showver, | ||
help_mode_t * | showhelpmode, | ||
boolean * | no_watcher | ||
) |
Process the param line parameters against the hardwired parmset for the netconfd program.
argc | argument count | |
argv | array of command line argument strings | |
[out] | agt_profile | server profile struct to fill in *agt_profile is filled in, with parms gathered or defaults |
[out] | showver | address of version return quick-exit status *showver TRUE if user requsted version quick-exit mode |
[out] | showhelpmode | address of help return quick-exit status *showhelpmode requested help mode (none, breief, normal, full) |
[out] | no_watcher | watcher param to fill in *no_watcher TRUE if user specified no-watcher param |
status_t agt_conf_create_file | ( | const xmlChar * | confname, |
const xmlChar * | revision, | ||
agt_conf_write_fn_t | conf_write_fn, | ||
void * | cookie | ||
) |
Create a module or bundle config in the confdir.
confname | module or bundle name |
revision | revision date string |
conf_write_fn | callback function to create the file |
cookie | cookie to pass to callback |
status_t agt_conf_delete_file | ( | const xmlChar * | confname, |
const xmlChar * | revision | ||
) |
Delete a module or bundle config in the confdir.
confname | module or bundle name |
revision | revision date string |
status_t agt_conf_load_files | ( | const xmlChar * | conf_filespec, |
val_value_t * | valset, | ||
const xmlChar * | conf_dirspec, | ||
boolean * | skip_def_confdir | ||
) |
Default main loaded first: /etc/yumapro/netconfd-pro.conf.
Set with –config/path/to/myconf.conf
Also check for extra config files: Default conf-dir: /etc/yumapro/netconfd-pro.d/
conf_filespec | main netconfd-pro.conf (may be NULL) | |
[in,out] | valset | value to add any found parameters valset filled in with any found parameters |
conf_dirspec | directory to check for more foo.conf files (may be NULL) | |
[out] | skip_def_confdir | address of return flag *skip_def_confdir TRUE if no default conf-dir found |
status_t agt_conf_test_write_file | ( | const xmlChar * | confname, |
const xmlChar * | revision | ||
) |
Test Append a conf dir.
confname | module or bundle name |
revision | revision date string (may be NULL) |
void agt_profile_clean_server_profile | ( | agt_profile_t * | agt_profile | ) |
Clean the server profile variables.
[in,out] | agt_profile | profile struct to clean |
void agt_profile_init_server_profile | ( | agt_profile_t * | agt_profile | ) |
Hardwire the initial server profile variables.
[in,out] | agt_profile | profile to initialize *agt_profile is filled in with params of defaults |