Author: odabrunz
Date: Fri Jul 13 18:18:09 2007
New Revision: 39407
URL: http://svn.opensuse.org/viewcvs/yast?rev=39407&view=rev
Log:
- added comments with autoyast file example snippets from SLES9 and
10.3a5 and explanation of SLES9 autoyast data import to
autoinstall.ycp
- converting old key "kernel" to new key "image" when converting
autoyast configuration to export map (#285790)
- fixed: if -> else if in autoinstall.ycp (does not change
sematics)
- re-added lost y2milestone() to BootELILO.ycp
- creating "image" section instead of "kernel" section now in
CreateLinuxSection(): testing needed!
Modified:
trunk/bootloader/src/modules/BootCommon.ycp
trunk/bootloader/src/modules/BootELILO.ycp
trunk/bootloader/src/routines/autoinstall.ycp
Modified: trunk/bootloader/src/modules/BootCommon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon.ycp?rev=39407&r1=39406&r2=39407&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootCommon.ycp (original)
+++ trunk/bootloader/src/modules/BootCommon.ycp Fri Jul 13 18:18:09 2007
@@ -523,7 +523,7 @@
y2milestone ("kernel_fn: %1 initrd_fn: %2", kernel_fn, initrd_fn);
ret = (map )union (ret, $[
- "kernel" : kernel_fn,
+ "image" : kernel_fn,
"initrd" : initrd_fn,
"root" : RootPartitionDevice,
"append" : (title == "failsafe")
@@ -544,11 +544,11 @@
ret["xen_append"] = "";
if (UsingXenPae()) {
ret["xen"] = "/boot/xen-pae.gz";
- ret["kernel"] = "/boot/" + Kernel::GetBinary () + "-xenpae";
+ ret["image"] = "/boot/" + Kernel::GetBinary () + "-xenpae";
ret["initrd"] = "/boot/initrd-xenpae";
} else {
ret["xen"] = "/boot/xen.gz";
- ret["kernel"] = "/boot/" + Kernel::GetBinary () + "-xen";
+ ret["image"] = "/boot/" + Kernel::GetBinary () + "-xen";
ret["initrd"] = "/boot/initrd-xen";
}
}
Modified: trunk/bootloader/src/modules/BootELILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootELILO.ycp?rev=39407&r1=39406&r2=39407&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootELILO.ycp (original)
+++ trunk/bootloader/src/modules/BootELILO.ycp Fri Jul 13 18:18:09 2007
@@ -545,6 +545,7 @@
entry2remove
);
+ y2milestone ("Running command %1", command);
map ret_map = (map)SCR::Execute (.target.bash_output, command);
y2milestone ("BootELILO: ret_map = %1", ret_map);
ret = (ret_map["exit"]:1 == 0);
Modified: trunk/bootloader/src/routines/autoinstall.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/autoinstall.ycp?rev=39407&r1=39406&r2=39407&view=diff
==============================================================================
--- trunk/bootloader/src/routines/autoinstall.ycp (original)
+++ trunk/bootloader/src/routines/autoinstall.ycp Fri Jul 13 18:18:09 2007
@@ -16,6 +16,91 @@
*/
{
+// Example autoyast configuration file snippets:
+//
+// -------------------------------------------------
+// SLES9:
+//
+// <bootloader>
+// <activate config:type="boolean">true</activate>
+// chrp
+// <default>linux</default>
+// <global config:type="list">
+//
+// <key>default</key>
+// <value>linux</value>
+//
+//
+// <key>timeout</key>
+// <value config:type="integer">100</value>
+//
+//
+// [...]
+// </global>
+//
+//
+// <module>sym53c8xx</module>
+//
+//
+// <module>loop</module>
+//
+//
+// /dev/sda1
+// ppc
+// <location>boot</location>
+// true
+// /dev/sda1
+// <sections config:type="list">
+// <section config:type="list">
+//
+// <key>image</key>
+// <value>/boot/vmlinux</value>
+//
+//
+// <key>label</key>
+// <value>linux</value>
+//
+// [...]
+// -------------------------------------------------
+// openSUSE 10.3 Alpha5:
+//
+// <bootloader>
+// <global>
+// <activate>true</activate>
+// /dev/sda1
+// <default>linux</default>
+// 1
+// <timeout config:type="integer">80</timeout>
+// </global>
+//
+//
+// <module>ipr</module>
+//
+//
+// <module>pata_pdc2027x</module>
+//
+//
+// <module>dm_mod</module>
+//
+//
+// ppc
+// <sections config:type="list">
+// <section>
+// <append> xmon=on sysrq=1</append>
+// <image>/boot/vmlinux-2.6.22-rc4-git3-2-ppc64</image>
+// <initial>1</initial>
+// <initrd>/boot/initrd-2.6.22-rc4-git3-2-ppc64</initrd>
+// <kernel>/boot/vmlinux</kernel>
+// 0
+// <name>linux</name>
+// linux
+// <root>/dev/system/root2</root>
+// <type>image</type>
+// </section>
+// </sections>
+// </bootloader>
+// -------------------------------------------------
+
import "Bootloader";
import "BootCommon";
import "Initrd";
@@ -37,6 +122,15 @@
s = (map)union (
BootCommon::CreateLinuxSection (orig_name),
s);
+
+ // convert "kernel" to "image", if not already defined in the section
+ if ( haskey(s, "kernel") ) {
+ if ( ! haskey(s, "image") ) {
+ s["image"] = s["kernel"]:"";
+ }
+ s = remove (s, "kernel");
+ }
+
return s;
});
return sect;
@@ -149,7 +243,7 @@
if ( ai["loader_type"]:"" == "grub" && haskey(ai, "location") ) {
if ( ai["location"]:nil == "extended" )
exp["specific", "global", "boot_extended"] = "true";
- if ( ai["location"]:nil == "boot" )
+ else if ( ai["location"]:nil == "boot" )
exp["specific", "global", "boot_boot"] = "true";
else if ( ai["location"]:nil == "root" )
exp["specific", "global", "boot_root"] = "true";
@@ -265,6 +359,14 @@
y2milestone ("SLES9 format detected: %1", old_format);
if (old_format)
{
+ // In SLES9, there were no specific tags defined for the bootloader
+ // configuration items in the <global> and <sections> scopes. All
+ // configuration lines there were put into <key> and <value> pairs,
+ // and each of these pairs were put into <(global|section)_entry>
+ // tags (see example config snippets above).
+ // Converting key/value pairs to file contents first, then setting
+ // as file contents and re-exporting the parsed file contents.
+
list sections = ai["sections"]:[];
list<map> globals = ai["global"]:[];
sections = prepend (sections, globals);
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org