Editing Enterprise Configurator
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | Epconf helps to configure software components that are commonly used in an enterprise environment (e.g. at companies). | + | Epconf helps to configure software components that are commonly used in |
+ | an enterprise environment (e.g. at companies). | ||
Supported devices: | Supported devices: | ||
- | * | + | * N900 (Fremantle) |
It supports the installation and modification of: | It supports the installation and modification of: | ||
- | * Browser bookmark thumbnail images: | + | * Browser bookmark thumbnail images: thumbnail_* files. |
* Wifi root certificates: <code>*.crt</code> files are used when authenticating via WLAN. | * Wifi root certificates: <code>*.crt</code> files are used when authenticating via WLAN. | ||
* GConf schemas: <code>*.schemas</code> files are registered with GConf. | * GConf schemas: <code>*.schemas</code> files are registered with GConf. | ||
Line 11: | Line 12: | ||
* Custom actions: Custom configuration can be done with epconftool in-files (<code>*.epin</code>). | * Custom actions: Custom configuration can be done with epconftool in-files (<code>*.epin</code>). | ||
- | The above mentioned input files are taken from the <code>/usr/share/epconf-sets/SET</code> directory. | + | The above mentioned input files are taken from the |
+ | <code>/usr/share/epconf-sets/SET</code> directory. | ||
With epconf in-files you can configure: | With epconf in-files you can configure: | ||
Line 20: | Line 22: | ||
If an epconf in-file file matches <code>*.do-as-user.epin</code> then the | If an epconf in-file file matches <code>*.do-as-user.epin</code> then the | ||
operations described by it will be executed as the user <code>'user'</code>. | operations described by it will be executed as the user <code>'user'</code>. | ||
- | For more information about in-files, please refer to epconftool. See [[#epconftool| | + | For more information about in-files, please refer to epconftool. |
+ | See [[Enterprise_Configurator#epconftool|here]] for more details about epconftool in-files. | ||
== Command line syntax == | == Command line syntax == | ||
- | + | usage: epconf [debug] macro file_name ACTION SET[:GROUP[:ELEMENT]]... | |
- | usage: epconf [debug] macro file_name ACTION SET[:GROUP[:ELEMENT]]... | + | debug Enables debug output. |
- | + | macro Uses the specified macro file instead of the default one. | |
- | + | ACTION May be either install or uninstall. | |
- | + | SET Name of the configuration set to process. | |
- | + | It may be "all" which means "Process all the available set". | |
- | + | "all" cannot be mixed with other sets! | |
- | + | GROUP Can be one of | |
- | + | thumbnail: Process thumbnail_* thumbnails | |
- | + | crt: Process *.crt certificates | |
- | + | vcard: Process *.vcard vCards. | |
- | + | schemas: Process *.schemas GConf schemas | |
- | + | epin: Process *.epin epconftool in-files | |
- | + | If it is not given then all the groups are processed. | |
- | + | ELEMENT This can be used only with epin group. | |
- | + | Only the infile with the given name willbe processed. | |
- | + | ||
- | + | ||
The following example pulls the input files from <code>/usr/share/enterprise_pilot/my_set</code>: | The following example pulls the input files from <code>/usr/share/enterprise_pilot/my_set</code>: | ||
Line 54: | Line 56: | ||
epconf install my_set:epin:best_in your_set:vcard their_set | epconf install my_set:epin:best_in your_set:vcard their_set | ||
- | + | = epconftool = | |
Epconftool processes in-files that can be used for the creation of sophisticated configuration | Epconftool processes in-files that can be used for the creation of sophisticated configuration | ||
scripts. | scripts. | ||
- | + | == Command line syntax == | |
- | + | ||
- | + | ||
- | + | ||
- | + | usage: epconftool [-f] [-s] [-d] { -x | -l } macro-file { -i | -u } in-files... | |
- | + | ||
- | + | -i Install using the given input files. | |
- | + | -u Uninstall using the given input files. | |
- | + | -x Macro file in XML format | |
- | + | -l Macro file in plain key-value format | |
- | + | -f Force. If the process fails at one input file it goes on to the next one. | |
- | + | Without this option (default), a bad input file stops the entire process | |
- | + | and the subsequent input files are not processed. | |
- | + | -s Do simple macro substitution (a macro in a macro is not processed). | |
- | + | -d Print debug output to stderr. | |
+ | Either -i or -u can be used. They cannot be mixed. | ||
Built-in macros: | Built-in macros: | ||
Line 81: | Line 81: | ||
* <code>MARKER</code>: This may be used e.g. in XML in-files. If a node_path node contains this as a text field anywhere in its subtree, then that node is removed during un-installation. Otherwise it is not removed! | * <code>MARKER</code>: This may be used e.g. in XML in-files. If a node_path node contains this as a text field anywhere in its subtree, then that node is removed during un-installation. Otherwise it is not removed! | ||
- | + | == Macro file == | |
- | The MACRO file contains usernames, passwords, etc. Each value in this file has a key associated with it. E.g., the WLAN_username key may have the value Jack. The keys of the MACRO file can be used in in-files as <code>%key_name%</code>. E.g., <code>%WLAN_username%</code>. | + | The MACRO file contains usernames, passwords, etc. |
+ | Each value in this file has a key associated with it. | ||
+ | E.g., the WLAN_username key may have the value Jack. | ||
+ | The keys of the MACRO file can be used in in-files | ||
+ | as <code>%key_name%</code>. E.g., <code>%WLAN_username%</code>. | ||
Two kinds of macro files are supported: | Two kinds of macro files are supported: | ||
Line 89: | Line 93: | ||
* Key-value list | * Key-value list | ||
- | + | === XML === | |
Let's take the following as an example: | Let's take the following as an example: | ||
- | + | <?xml version="1.0" encoding="UTF-8" ?> | |
- | <?xml version="1.0" encoding="UTF-8" ?> | + | <CONF> |
- | <CONF> | + | <NAME>Joe Buck</NAME> |
- | + | <REMOTE_ACCESS> | |
- | + | <LOGIN>joebuck</LOGIN> | |
- | + | </REMOTE_ACCESS> | |
- | + | <SIP> | |
- | + | <NAME>ext-joe.4.buck</NAME> | |
- | + | <PASS>98765876</PASS> | |
- | + | </SIP> | |
- | + | <WLAN> | |
- | + | <RESTAURANT> | |
- | + | <LOGIN>joejoe</LOGIN> | |
- | + | <PASS>buckybuck</PASS> | |
- | + | </RESTAURANT> | |
- | + | </WLAN> | |
- | + | <EMAIL> | |
- | + | <ADDRESS>ext-joe.4.buck@company.org</ADDRESS> | |
- | + | </EMAIL> | |
- | + | </CONF> | |
- | </CONF | + | |
- | + | ||
- | |||
- | + | When using the above example macro file, the macro values are the text nodes | |
+ | and the macro names are formed formed the tag names. For example, the | ||
+ | <code>%CONF_REMOTE_ACCESS_LOGIN%</code> macro refers to the value <code>"joebuck"</code>. | ||
+ | |||
+ | === Key-value list === | ||
Let's take the following as an example: | Let's take the following as an example: | ||
- | + | "CONF_NAME" "Joe Buck" | |
- | "CONF_NAME" "Joe Buck" | + | "CONF_REMOTE_ACCESS_LOGIN" "joebuck" |
- | "CONF_REMOTE_ACCESS_LOGIN" "joebuck" | + | "CONF_SIP_NAME" "ext-joe.4.buck" |
- | "CONF_SIP_NAME" "ext-joe.4.buck" | + | "CONF_SIP_PASS" "98765876" |
- | "CONF_SIP_PASS" "98765876" | + | "CONF_WLAN_RESTAURANT_LOGIN" "joejoe" |
- | "CONF_WLAN_RESTAURANT_LOGIN" "joejoe" | + | "CONF_WLAN_RESTAURANT_PASS" "buckybuck" |
- | "CONF_WLAN_RESTAURANT_PASS" "buckybuck" | + | "CONF_EMAIL_ADDRESS" "ext-joe.4.buck@company.org" |
- | "CONF_EMAIL_ADDRESS" "ext-joe.4.buck@company.org" | + | |
- | + | ||
- | When using the above example macro file, the <code>%CONF_REMOTE_ACCESS_LOGIN%</code> macro refers to the value "joebuck". | + | When using the above example macro file, the |
+ | <code>%CONF_REMOTE_ACCESS_LOGIN%</code> macro refers to the value "joebuck". | ||
If the " (double quote) character appears in a key or a value, then it must be escaped. For example, "Norton said \"Howdy!\" and then he left.". Same for the \ (backslash) character. For example, "\\" represents a single backslash character. | If the " (double quote) character appears in a key or a value, then it must be escaped. For example, "Norton said \"Howdy!\" and then he left.". Same for the \ (backslash) character. For example, "\\" represents a single backslash character. | ||
- | + | == Input Template file (in-file) == | |
In-files have the following general format: | In-files have the following general format: | ||
- | + | [CONTROL] | |
- | [CONTROL] | + | # Comment |
- | # Comment | + | type:gconf|xml|shell |
- | type:gconf|xml|shell | + | ... |
- | ... | + | |
- | + | [DATA] | |
- | [DATA] | + | ... |
- | ... | + | ...%MACRO%... |
- | ...%MACRO%... | + | ... |
- | ... | + | |
- | + | ||
The following lines are ignored: | The following lines are ignored: | ||
Line 156: | Line 158: | ||
The tag (e.g., "type") and its value (e.g., "xml") in the <code>CONTROL</code> section are | The tag (e.g., "type") and its value (e.g., "xml") in the <code>CONTROL</code> section are | ||
- | separated by a single colon character. The "type" tag is mandatory, and it must be the first non-ignored line in the <code>CONTROL</code> section. | + | separated by a single colon character. |
+ | The "type" tag is mandatory, and it must be the first non-ignored line in the | ||
+ | <code>CONTROL</code> section. | ||
- | Every <code>%MACRO%</code> macro is replaced with the matching value from the <code>MACRO</code> file during the installation/un-installation process. Macro substitution | + | Every <code>%MACRO%</code> macro is replaced with the matching value from the <code>MACRO</code> |
- | is applied to the entire in-file (e.g. if the value of <code>MARKER</code> is "Hello Hippo" then <code>[CON%MARKER%TROL]</code> is replaced with <code>[CONHello HippoTROL]</code>). | + | file during the installation/un-installation process. Macro substitution |
+ | is applied to the entire in-file (e.g. if the value of <code>MARKER</code> is "Hello Hippo" then <code>[CON%MARKER%TROL]</code> is replaced with | ||
+ | <code>[CONHello HippoTROL]</code>). | ||
- | No recursive macro substitution is done. For example, if macro <code>%APPLE%</code> has the value <code>"Hello %WORLD%"</code> then the <code>%WORLD"</code> is not considered as a macro for substitution. | + | No recursive macro substitution is done. For example, if macro <code>%APPLE%</code> has |
+ | the value <code>"Hello %WORLD%"</code> then the <code>%WORLD"</code> is not considered as a macro | ||
+ | for substitution. | ||
- | === | + | === gconf === |
- | This in-file is used to add/remove | + | This in-file is used to add/remove gconf values. |
+ | See [2] for an example! | ||
Syntax: | Syntax: | ||
- | + | [CONTROL] | |
- | [CONTROL] | + | type:gconf |
- | type:gconf | + | |
+ | [DATA] | ||
+ | dir:/path/to/gconf/directory | ||
+ | behavior:type:key_name:value | ||
+ | behavior:type-list:key_name:[value,value,...] | ||
+ | ... | ||
- | + | The <code>"type"</code> tag tells that it's a gconf in-file. | |
- | + | The first line in the DATA section is the gconf directory that we want to configure. | |
- | + | Subsequent lines describe key/value pairs for gconf keys, whitespaces are | |
- | + | not allowed. | |
- | + | Value lists are also supported. In this case, the type name is suffixed | |
- | + | with the <code>"-list"</code> word and the value is a comma separated list enclosed in brackets. | |
- | The <code>"type"</code> tag tells that it's a gconf in-file. The first line in the DATA section is the gconf directory that we want to configure. Subsequent lines describe key/value pairs for | + | The behavior can be one of the following: |
* <code>replace</code>: If the key already exists, it is replaced. | * <code>replace</code>: If the key already exists, it is replaced. | ||
* <code>merge</code>: Only for value lists. If the key already exists, it is merged with the specified one. | * <code>merge</code>: Only for value lists. If the key already exists, it is merged with the specified one. | ||
Line 195: | Line 209: | ||
* If after removing the keys, the entire <code>/path/to/gconf/directory</code> directory is deleted from gconf if it has become empty. | * If after removing the keys, the entire <code>/path/to/gconf/directory</code> directory is deleted from gconf if it has become empty. | ||
- | === | + | === xml === |
- | This in-file is used to add/remove nodes in | + | This in-file is used to add/remove xml nodes in xml files, such as bookmarks |
+ | and Pidgin accounts. | ||
Syntax: | Syntax: | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | [DATA] | + | [CONTROL] |
- | A complete XML document... | + | type:xml |
- | + | target:/path/to/the/xml/file/that/we/want/to/modify/or/create.xml | |
- | * <code>type</code>: Tells that it's an | + | node_path:/xml/path/to/a/node |
+ | node_id_path:/xml/path/to/the/id/node /xml/path/to/another/id/node | ||
+ | remove_by:id|marker | ||
+ | if_exists:replace|keepold | ||
+ | |||
+ | [DATA] | ||
+ | A complete XML document... | ||
+ | |||
+ | * <code>type</code>: Tells that it's an xml in-file. | ||
* <code>target</code>: The file system path of the final output. If the file exists, it is also used as input. | * <code>target</code>: The file system path of the final output. If the file exists, it is also used as input. | ||
* <code>node_path</code>: It is an XML-path that defines the nodes in the in-file <code>DATA</code> section that will be added to the target file. | * <code>node_path</code>: It is an XML-path that defines the nodes in the in-file <code>DATA</code> section that will be added to the target file. | ||
Line 233: | Line 248: | ||
* If <code>remove_by</code> is <code>"id"</code>: Delete every node (based on <code>node_path</code>), from the target file that has the same id value (based on <code>node_id_path</code>) as the XML in the <code>DATA</code> section. | * If <code>remove_by</code> is <code>"id"</code>: Delete every node (based on <code>node_path</code>), from the target file that has the same id value (based on <code>node_id_path</code>) as the XML in the <code>DATA</code> section. | ||
- | + | === shell === | |
Shell in-files are a flexible way to create custom configurator scripts. | Shell in-files are a flexible way to create custom configurator scripts. | ||
Syntax: | Syntax: | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | + | [CONTROL] | |
- | commands | + | type:shell |
- | commands | + | |
- | commands | + | [DATA] |
- | ... | + | install: |
- | + | commands | |
+ | commands | ||
+ | commands | ||
+ | ... | ||
+ | |||
+ | uninstall: | ||
+ | commands | ||
+ | commands | ||
+ | commands | ||
+ | ... | ||
- | |||
- | + | The <code>DATA</code> section consists of and <code>"install"</code> and an <code>"uninstall"</code> subsection. The command | |
+ | lines below the subsections constitute the content of the script. A script file | ||
+ | is created with that content and is executed. So basically, you can write, e.g., shell | ||
+ | scripts, perl and python scripts, etc.. | ||
+ | Command lines cannot start with <code>"install:"</code> or <code>"uninstall:"</code>! |
Learn more about Contributing to the wiki.