1CONFIG-EDIT(1) User Contributed Perl Documentation CONFIG-EDIT(1)
2
3
4
6 config-edit - Edit data of configuration managed by Config::Model
7
9 config-edit [options] -model Fstab [ commands ... ]
10
12 Config-model is a general purpose configuration framework.
13
14 The config-edit program will use Config::Model configuration
15 descriptions to provide a user interface so user can easily and
16 securely modify the configuration of their system.
17
18 You can specify commands as arguments that will be run on the
19 configuration root before launching the UI. These command follow the
20 syntax defined in Config::Model::Loader.
21
23 -model
24 Mandatory option that specifies the configuration data to be
25 edited. The model must be available in "/etc/config-model.d/"
26 directory in a ".pl" file. E.g. this command:
27
28 config-edit -model Fstab
29
30 will look for "/etc/config-model.d/Fstab.pl" model file. See
31 Config::Model for more details.
32
33 -ui Specify the user interface type.
34
35 · "tk": provides a Tk graphical interface (If Config::Model::TkUI
36 is installed).
37
38 · "curses": provides a curses user interface (If
39 Config::Model::CursesUI is installed).
40
41 · "shell": provides a shell like interface. See
42 Config::Model::TermUI for details.
43
44 · "none": No UI provided. Only command line arguments are
45 handled.
46
47 -dev
48 Use this option if you want to test a model under development. This
49 option will add "lib" in @INC and use "lib/Config/Model/models" as
50 model directory. This option is ignored when run as root.
51
52 -model_dir
53 Specify an alternate directory to find model files. Mostly useful
54 for tests.
55
56 -instance_name
57 Specify an instance_name. By default the instance name is copied
58 from model name.
59
60 -root_dir
61 Specify a pseudo root directory to read and write the configuration
62 files. (Actual default directory and file names depends on the
63 model (See "-model" option). For instance, if you specify
64 "~/mytest", the "/etc/ssh/sshd_config" files will be written in
65 "~/mytest/etc/ssh/" directory.
66
67 -verbose
68 Be (very) verbose
69
70 -debug
71 Provide debug infos.
72
73 -trace
74 Provides a full stack trace when exiting on error.
75
76 -force-load
77 Load file even if error are found in data. Bad data are discarded
78
79 -backend
80 Specify a read/write backend. The actual backend name depends on
81 the model passed to "-model" option. See Config::Model::AutoRead
82 for details.
83
84 -dump [ file ]
85 Dump configuration content on STDOUT or in the specified with
86 Config::Model syntax.
87
88 By default, dump only custom values, i.e. different from
89 application built-in values or model default values. See -dumptype
90 option for other types of dump
91
92 -dumptype [ full | preset | custom ]
93 Choose to dump every values (full), only preset values or only
94 customized values (default)
95
96 -load <cds_file_to_load>
97 Load configuration data in model from cds file (using Config::Model
98 serialisation format, typically done with -dump option). When this
99 option is used, the usual configuration files will not be read.
100
101 If used with "-ui none", this option will load configuration data,
102 validate it and save it in configuration file (if no error was
103 found).
104
105 -save
106 Force re-writing the configuration. (useful for configuration
107 upgrade)
108
110 You can use config-edit from another program by using "-ui simple"
111 option. This way you will be able to send command on the standard input
112 of "config-edit" and get the results from the standard output.
113
115 Configuration data are saved only when :
116
117 · Requested through the user interface
118
119 · When commands are specified with arguments
120
121 · When "-load" option is used
122
123 · When "-save" option is used
124
125 You can run safely "config-edit -ui none" to test a configuration,
126 configuration files will not be modified in this case.
127
129 All Config::Model logging is (slowly) moved from klunky debug and
130 verbose prints to Log::Log4perl. Logging can be configured in the
131 following files:
132
133 ·
134
135
136 ~/.log4config-model
137
138 ·
139
140
141 /etc/log4config-model.conf
142
143 Without these files, the following Log4perl config is used:
144
145 log4perl.logger=WARN, Screen
146 log4perl.appender.Screen = Log::Log4perl::Appender::Screen
147 log4perl.appender.Screen.stderr = 0
148 log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout
149 log4perl.appender.Screen.layout.ConversionPattern = %d %m %n
150
151 Log4perl uses the following categories:
152
153 Model
154 Model::Load
155 Data::Read
156 Data::Write
157 Model::Searcher
158 Instance
159 Tree::Element::Value
160 Tree::Element::Hash
161 Tree::Element::Warper
162 Tree::Element::Warped
163 Tree::Element::CheckList
164 Tree::Node
165 Loader
166 Backend::Yaml
167 Wizard::Helper
168
169 More categories will come.
170
172 For support, please check the following ressources:
173
174 · The config-model wiki: http://config-model.wiki.sourceforge.net/
175 <http://config-model.wiki.sourceforge.net/>
176
177 · The config-model users mailing list:
178 http://lists.sourceforge.net/mailman/listinfo/config-model-users
179 <http://lists.sourceforge.net/mailman/listinfo/config-model-users>
180
182 Dominique Dumont, ddumont at cpan dot org
183
185 Config::Model::Model, Config::Model::Instance, Config::Model::Node,
186 Config::Model::HashId, Config::Model::ListId,
187 Config::Model::WarpedNode, Config::Model::Value
188
189
190
191perl v5.12.1 2010-08-18 CONFIG-EDIT(1)