autoinst.xml - creating additional config files (problem + workaround)
Hi List, I had problems creating config-files in this way (either my syntax is wrong, or it's a bug): (Remark: Between <configure> and </configure> is more stuff of course, which *did* work - I snipped that in my examples. The xml itself is correct, says tidy -e -xml .) ----start-extract-from-NON-working-configuration-xml-- <configure> <files config:type="list" > <listentry> <config_file> <file_path>/etc/zzzz-config-file-creation-test</file_path> <file_contents> <![CDATA[ ##### # /etc/zzzz-config-file-creation-test # test config file ##### # test, whether autoyast can add complete config files # xml-tree: configure->files->listentry->config_file->file-contents ]]> </file_contents> </config_file> </listentry> </files> <configure> ----stop-extract-from-NON-working-configuration-xml-- I expected to find a file named "/etc/zzzz-config-file-creation-test" on the new-installed box but found nothing like this in /etc or anywhere else. My workaround (this does work - at least on my box): ----start-extract-from-WORKING-configuration-xml-- <configure> <post-scripts config:type="list" > <script> <filename>create-file-workaround</filename> <interpreter>shell</interpreter> <source><![CDATA[ cat << __END__ > /etc/zzzz-config-file-creation-test-workaround ############ # /etc/zzzz-config-file-creation-test-workaround # this file is complete nonsense and can be deleted ############ 123 456 # file created with shell script and "here document" # xml-tree configure->post-scripts->script->source __END__ ]]> </source> </script> </post-scripts> </configure> ----stop-extract-from-WORKING-configuration-xml-- A file named /etc/zzzz-config-file-creation-test-workaround was created and filled. So, did I do something wrong in the upper example or can somebody verify this problem? Best regards, Hella -- -- -- -- -- hella breitkopf, unix + network administrator varetis AG , munich
* Hella.Breitkopf@varetis.de <Hella.Breitkopf@varetis.de> [May 02. 2002 19:31]:
Hi List,
I had problems creating config-files in this way (either my syntax is wrong, or it's a bug):
(Remark: Between <configure> and </configure> is more stuff of course, which *did* work - I snipped that in my examples. The xml itself is correct, says tidy -e -xml .) ----start-extract-from-NON-working-configuration-xml-- <configure>
<files config:type="list" > <listentry> ^^^^^^^^^^ <config_file> <file_path>/etc/zzzz-config-file-creation-test</file_path> <file_contents> <![CDATA[ ##### # /etc/zzzz-config-file-creation-test # test config file #####
# test, whether autoyast can add complete config files
# xml-tree: configure->files->listentry->config_file->file-contents
]]> </file_contents> </config_file> </listentry> ^^^^^^^^^^^ </files>
<configure> ----stop-extract-from-NON-working-configuration-xml--
There is an extra tag here which you dont need! The documentation actually has the following example: <files config:type="list"> <config_file> <file_path>/etc/httpd/httpd.conf</file_path> <file_contents> <![CDATA[ some content ]]> </file_contents> </config_file> </files> Any reason why there is the <listentry> tag? The listentry tag is a fallback tag name we use to name items in a list due to the fact that an array or list like this: [a,b,c,d] Does not have an identifier and hence a name is needed. If the name is not defined, listentry is used. Anas -- Anas Nashif <nashif@suse.com>, SuSE Linux AG Montreal (Laval), Canada
participants (2)
-
Anas Nashif
-
Hella.Breitkopf@varetis.de