config-edit - Edit data of configuration managed by Config::Model
config-edit [options] -model Fstab [ commands ... ]
Config-model is a general purpose configuration framework.
The config-edit program will use Config::Model configuration descriptions to provide a user interface so user can easily and securely modify the configuration of their system.
You can specify commands as arguments that will be run on the configuration root before launching the UI. These command follow the syntax defined in Config::Model::Loader.
Mandatory option that specifies the configuration data to be edited. The model must be available in /etc/config-model.d/ directory in a .pl file. E.g. this command:
/etc/config-model.d/
.pl
config-edit -model Fstab
will look for /etc/config-model.d/Fstab.pl model file. See Config::Model for more details.
/etc/config-model.d/Fstab.pl
Specify the user interface type.
tk: provides a Tk graphical interface (If Config::Model::TkUI is installed).
tk
curses: provides a curses user interface (If Config::Model::CursesUI is installed).
curses
shell: provides a shell like interface. See Config::Model::TermUI for details.
shell
none: No UI provided. Only command line arguments are handled.
none
Use this option if you want to test a model under development. This option will add lib in @INC and use lib/Config/Model/models as model directory. This option is ignored when run as root.
lib
@INC
lib/Config/Model/models
Specify an alternate directory to find model files. Mostly useful for tests.
Specify an instance_name. By default the instance name is copied from model name.
Specify a pseudo root directory to read and write the configuration files. (Actual default directory and file names depends on the model (See -model option). For instance, if you specify ~/mytest, the /etc/ssh/sshd_config files will be written in ~/mytest/etc/ssh/ directory.
-model
~/mytest
/etc/ssh/sshd_config
~/mytest/etc/ssh/
Be (very) verbose
Provide debug infos.
Provides a full stack trace when exiting on error.
Load file even if error are found in data. Bad data are discarded
Specify a read/write backend. The actual backend name depends on the model passed to -model option. See Config::Model::AutoRead for details.
Dump configuration content on STDOUT or in the specified with Config::Model syntax.
By default, dump only custom values, i.e. different from application built-in values or model default values. See -dumptype option for other types of dump
Choose to dump every values (full), only preset values or only customized values (default)
Load configuration data in model from cds file (using Config::Model serialisation format, typically done with -dump option). When this option is used, the usual configuration files will not be read.
If used with -ui none, this option will load configuration data, validate it and save it in configuration file (if no error was found).
-ui none
Force re-writing the configuration. (useful for configuration upgrade)
You can use config-edit from another program by using -ui simple option. This way you will be able to send command on the standard input of config-edit and get the results from the standard output.
-ui simple
config-edit
Configuration data are saved only when :
Requested through the user interface
When commands are specified with arguments
When -load option is used
-load
When -save option is used
-save
You can run safely config-edit -ui none to test a configuration, configuration files will not be modified in this case.
config-edit -ui none
All Config::Model logging is (slowly) moved from klunky debug and verbose prints to Log::Log4perl. Use can configure logging in the following files:
/etc/log4config-model.conf
~/.log4config-model
Without these files, the following Log4perl config is used:
log4perl.logger=WARN, Screen log4perl.appender.Screen = Log::Log4perl::Appender::Screen log4perl.appender.Screen.stderr = 0 log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Screen.layout.ConversionPattern = %d %m %n
Log4perl uses the following categories:
More categories will come.
For support, please check the following ressources:
The config-model wiki: http://config-model.wiki.sourceforge.net/
The config-model users mailing list: http://lists.sourceforge.net/mailman/listinfo/config-model-users
Dominique Dumont, ddumont at cpan dot org
Config::Model::Model, Config::Model::Instance, Config::Model::Node, Config::Model::HashId, Config::Model::ListId, Config::Model::WarpedNode, Config::Model::Value
To install Config::Model, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Model
CPAN shell
perl -MCPAN -e shell install Config::Model
For more information on module installation, please visit the detailed CPAN module installation guide.