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:
-
* [[Nokia N900|N900]] ([[Open development/Maemo roadmap/Fremantle|Fremantle]])
+
* N900 (Fremantle)
It supports the installation and modification of:
It supports the installation and modification of:
-
* Browser bookmark thumbnail images: <code>thumbnail_*</code> files.
+
* 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|the epconftool section]] for more details about epconftool in-files.
+
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 ==
-
<pre>
+
usage: epconf [debug] macro file_name ACTION SET[:GROUP[:ELEMENT]]...
-
usage: epconf [debug] macro file_name ACTION SET[:GROUP[:ELEMENT]]...
+
    debug            Enables debug output.
-
    debug            Enables debug output.
+
    macro            Uses the specified macro file instead of the default one.
-
    macro            Uses the specified macro file instead of the default one.
+
    ACTION          May be either install or uninstall.
-
    ACTION          May be either install or uninstall.
+
    SET              Name of the configuration set to process.
-
    SET              Name of the configuration set to process.
+
                      It may be "all" which means "Process all the available set".
-
                    It may be "all" which means "Process all the available set".
+
                      "all" cannot be mixed with other sets!
-
                    "all" cannot be mixed with other sets!
+
    GROUP            Can be one of
-
    GROUP            Can be one of
+
                          thumbnail: Process thumbnail_* thumbnails
-
                        thumbnail: Process thumbnail_* thumbnails
+
                          crt: Process *.crt certificates
-
                        crt: Process *.crt certificates
+
                          vcard: Process *.vcard vCards.
-
                        vcard: Process *.vcard vCards.
+
                          schemas: Process *.schemas GConf schemas
-
                        schemas: Process *.schemas GConf schemas
+
                          epin: Process *.epin epconftool in-files
-
                        epin: Process *.epin epconftool in-files
+
                      If it is not given then all the groups are processed.
-
                    If it is not given then all the groups are processed.
+
    ELEMENT          This can be used only with epin group.
-
    ELEMENT          This can be used only with epin group.
+
                      Only the infile with the given name willbe processed.
-
                    Only the infile with the given name willbe processed.
+
 
-
</pre>
+
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 =
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 ===
+
== Command line syntax ==
-
 
+
-
<pre>
+
-
usage: epconftool [-f] [-s] [-d] { -x | -l } macro-file { -i | -u } in-files...
+
-
  -i    Install using the given input files.
+
usage: epconftool [-f] [-s] [-d] { -x | -l } macro-file { -i | -u } in-files...
-
  -u    Uninstall using the given input files.
+
-
  -x    Macro file in XML format
+
  -i    Install using the given input files.
-
  -l    Macro file in plain key-value format
+
  -u    Uninstall using the given input files.
-
  -f    Force. If the process fails at one input file it goes on to the next one.
+
  -x    Macro file in XML format
-
        Without this option (default), a bad input file stops the entire process
+
  -l    Macro file in plain key-value format
-
        and the subsequent input files are not processed.
+
  -f    Force. If the process fails at one input file it goes on to the next one.
-
  -s    Do simple macro substitution (a macro in a macro is not processed).
+
        Without this option (default), a bad input file stops the entire process
-
  -d    Print debug output to stderr.
+
        and the subsequent input files are not processed.
-
        Either -i or -u can be used. They cannot be mixed.
+
  -s    Do simple macro substitution (a macro in a macro is not processed).
-
</pre>
+
  -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 ===
+
== 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 ====
+
=== XML ===
Let's take the following as an example:
Let's take the following as an example:
-
<source lang="xml">
+
<?xml version="1.0" encoding="UTF-8" ?>
-
<?xml version="1.0" encoding="UTF-8" ?>
+
<CONF>
-
<CONF>
+
  <NAME>Joe Buck</NAME>
-
  <NAME>Joe Buck</NAME>
+
  <REMOTE_ACCESS>
-
  <REMOTE_ACCESS>
+
    <LOGIN>joebuck</LOGIN>
-
    <LOGIN>joebuck</LOGIN>
+
  </REMOTE_ACCESS>
-
  </REMOTE_ACCESS>
+
  <SIP>
-
  <SIP>
+
    <NAME>ext-joe.4.buck</NAME>
-
    <NAME>ext-joe.4.buck</NAME>
+
    <PASS>98765876</PASS>
-
    <PASS>98765876</PASS>
+
  </SIP>
-
  </SIP>
+
  <WLAN>
-
  <WLAN>
+
    <RESTAURANT>
-
    <RESTAURANT>
+
      <LOGIN>joejoe</LOGIN>
-
      <LOGIN>joejoe</LOGIN>
+
      <PASS>buckybuck</PASS>
-
      <PASS>buckybuck</PASS>
+
    </RESTAURANT>
-
    </RESTAURANT>
+
  </WLAN>
-
  </WLAN>
+
  <EMAIL>
-
  <EMAIL>
+
    <ADDRESS>ext-joe.4.buck@company.org</ADDRESS>
-
    <ADDRESS>ext-joe.4.buck@company.org</ADDRESS>
+
  </EMAIL>
-
  </EMAIL>
+
</CONF>
-
</CONF>
+
-
</source>
+
-
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 ====
+
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:
-
<pre>
+
"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"
+
-
</pre>
+
-
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) ===
+
== Input Template file (in-file) ==
In-files have the following general format:
In-files have the following general format:
-
<pre>
+
[CONTROL]
-
[CONTROL]
+
# Comment
-
# Comment
+
type:gconf|xml|shell
-
type:gconf|xml|shell
+
...
-
...
+
-
 
+
[DATA]
-
[DATA]
+
...
-
...
+
...%MACRO%...
-
...%MACRO%...
+
...
-
...
+
-
</pre>
+
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 ====
+
=== gconf ===
-
This in-file is used to add/remove GConf values. See [2] for an example!
+
This in-file is used to add/remove gconf values.
 +
See [2] for an example!
Syntax:
Syntax:
-
<pre>
+
[CONTROL]
-
[CONTROL]
+
type:gconf
-
type:gconf
+
 +
[DATA]
 +
dir:/path/to/gconf/directory
 +
behavior:type:key_name:value
 +
behavior:type-list:key_name:[value,value,...]
 +
...
-
[DATA]
+
The <code>"type"</code> tag tells that it's a gconf in-file.
-
dir:/path/to/gconf/directory
+
The first line in the DATA section is the gconf directory that we want to configure.
-
behavior:type:key_name:value
+
Subsequent lines describe key/value pairs for gconf keys, whitespaces are
-
behavior:type-list:key_name:[value,value,...]
+
not allowed.
-
...
+
Value lists are also supported. In this case, the type name is suffixed
-
</pre>
+
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 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 behavior can be one of the following:
+
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 ====
+
=== xml ===
-
This in-file is used to add/remove nodes in XML files, such as bookmarks and Pidgin accounts.
+
This in-file is used to add/remove xml nodes in xml files, such as bookmarks
 +
and Pidgin accounts.
Syntax:
Syntax:
-
<pre>
 
-
[CONTROL]
 
-
type:xml
 
-
target:/path/to/the/xml/file/that/we/want/to/modify/or/create.xml
 
-
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]
+
[CONTROL]
-
A complete XML document...
+
type:xml
-
</pre>
+
target:/path/to/the/xml/file/that/we/want/to/modify/or/create.xml
-
* <code>type</code>: Tells that it's an XML in-file.
+
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 ===
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:
-
<pre>
 
-
[CONTROL]
 
-
type:shell
 
-
 
-
[DATA]
 
-
install:
 
-
commands
 
-
commands
 
-
commands
 
-
...
 
-
uninstall:
+
[CONTROL]
-
commands
+
type:shell
-
commands
+
-
commands
+
[DATA]
-
...
+
install:
-
</pre>
+
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>!
 
-
[[Category:Enterprise]]
+
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.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)