CLI utilities to process the CLI parameters at boot-time.
More...
|
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.
◆ agt_conf_write_fn_t
typedef status_t(* agt_conf_write_fn_t) (FILE *conf_file, void *cookie) |
conf file writer function callback
- Parameters
-
conf_file | open file to write |
cookie | caller parameter cookie |
- Returns
- status:
- NO_ERR file will be closed
- else file will be removed
◆ agt_cli_cleanup()
void agt_cli_cleanup |
( |
void |
| ) |
|
Cleanup the module static data.
Called by the server during shutdown.
◆ agt_cli_get_confspec()
const xmlChar* agt_cli_get_confspec |
( |
void |
| ) |
|
Retrieve the config file used or NULL if none.
- Returns
- pointer to config filespec
◆ agt_cli_get_valset()
Retrieve the command line parameter set from boot time.
- Returns
- pointer to parmset or NULL if none
◆ agt_cli_process_input()
Process the param line parameters against the hardwired parmset for the netconfd program.
- Parameters
-
argc | argument count |
argv | array of command line argument strings |
agt_profile | server profile struct to fill in |
showver | address of version return quick-exit status |
showhelpmode | address of help return quick-exit status |
no_watcher | watcher param to fill in |
- Return values
-
*agt_profile | is filled in, with parms gathered or defaults |
*showver | TRUE if user requsted version quick-exit mode |
*showhelpmode | requested help mode (none, breief, normal, full) |
*no_watcher | TRUE if user specified no-watcher param |
- Returns
- NO_ERR if all goes well
◆ agt_conf_create_file()
Create a module or bundle config in the confdir.
- Parameters
-
confname | module or bundle name |
revision | revision date string |
conf_write_fn | callback function to create the file |
cookie | cookie to pass to callback |
- Returns
- NO_ERR if file created
◆ agt_conf_delete_file()
status_t agt_conf_delete_file |
( |
const xmlChar * |
confname, |
|
|
const xmlChar * |
revision |
|
) |
| |
Delete a module or bundle config in the confdir.
- Parameters
-
confname | module or bundle name |
revision | revision date string |
- Returns
- NO_ERR if file found and deleted
◆ agt_conf_load_files()
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/
- Parameters
-
conf_filespec | main netconfd-pro.conf (may be NULL) |
valset | value to add any found parameters |
conf_dirspec | directory to check for more foo.conf files
(may be NULL) |
skip_def_confdir | address of return flag |
- Return values
-
valset | filled in with any found parameters |
*skip_def_confdir | TRUE if no default conf-dir found |
- Returns
- NO_ERR if all goes well
◆ agt_conf_test_write_file()
status_t agt_conf_test_write_file |
( |
const xmlChar * |
confname, |
|
|
const xmlChar * |
revision |
|
) |
| |
Test Append a conf dir.
- Parameters
-
confname | module or bundle name |
revision | revision date string (may be NULL) |
- Returns
- NO_ERR if file created
◆ agt_profile_clean_server_profile()
void agt_profile_clean_server_profile |
( |
agt_profile_t * |
agt_profile | ) |
|
Clean the server profile variables.
- Parameters
-
agt_profile | profile struct to clean |
◆ agt_profile_init_server_profile()
void agt_profile_init_server_profile |
( |
agt_profile_t * |
agt_profile | ) |
|
Hardwire the initial server profile variables.
- Parameters
-
agt_profile | profile to initialize |
- Returns
- *agt_profile is filled in with params of defaults