Author: jreidinger
Date: Thu Apr 9 09:02:21 2009
New Revision: 56709
URL: http://svn.opensuse.org/viewcvs/yast?rev=56709&view=rev
Log:
clean code, remove obsolete things (sometime very old and broken)
Removed:
trunk/bootloader/scripts/doaboot
trunk/bootloader/scripts/domilo
trunk/bootloader/scripts/update_zipl_conf
Modified:
trunk/bootloader/scripts/Makefile.am
trunk/bootloader/src/clients/bootloader.ycp
trunk/bootloader/src/modules/BootArch.ycp
trunk/bootloader/src/modules/BootCommon.ycp
trunk/bootloader/src/modules/BootPOWERLILO.ycp
trunk/bootloader/src/modules/BootZIPL.ycp
trunk/bootloader/src/modules/Bootloader.ycp
trunk/bootloader/src/ppc/helps.ycp
trunk/bootloader/src/routines/lilolike.ycp
trunk/bootloader/src/routines/switcher.ycp
Modified: trunk/bootloader/scripts/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/scripts/Makefile.am?rev=56709&r1=56708&r2=56709&view=diff
==============================================================================
--- trunk/bootloader/scripts/Makefile.am (original)
+++ trunk/bootloader/scripts/Makefile.am Thu Apr 9 09:02:21 2009
@@ -2,7 +2,7 @@
# Makefile.am for y2m_inst/ycp/bootloader/milo/agents
#
-ybin_SCRIPTS = domilo doaboot ppc_postinstall.sh update_gfxmenu update_zipl_conf examine_mbr.pl tp_mbr
+ybin_SCRIPTS = ppc_postinstall.sh update_gfxmenu examine_mbr.pl tp_mbr
EXTRA_DIST = $(ybin_SCRIPTS)
Modified: trunk/bootloader/src/clients/bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/clients/bootloader.ycp?rev=56709&r1=56708&r2=56709&view=diff
==============================================================================
--- trunk/bootloader/src/clients/bootloader.ycp (original)
+++ trunk/bootloader/src/clients/bootloader.ycp Thu Apr 9 09:02:21 2009
@@ -259,7 +259,6 @@
if (.noio == WFM::Args (i) || ".noio" == WFM::Args (i))
{
skip_io = true;
- BootCommon::save_on_finish = false;
}
i = i + 1;
}
Modified: trunk/bootloader/src/modules/BootArch.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootArch.ycp?rev=56709&r1=56708&r2=56709&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootArch.ycp (original)
+++ trunk/bootloader/src/modules/BootArch.ycp Thu Apr 9 09:02:21 2009
@@ -32,14 +32,6 @@
import "StorageControllers";
/**
- * Get the file holding the initd imahe
- * @return string the initrd image
- */
-global string InitrdImage () {
- return "/boot/initrd";
-}
-
-/**
* Get parameters for the default kernel
* @param resume string device to resume from (or empty not to set it)
* @return string parameters for default kernel
Modified: trunk/bootloader/src/modules/BootCommon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootCommon.ycp?rev=56709&r1=56708&r2=56709&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootCommon.ycp (original)
+++ trunk/bootloader/src/modules/BootCommon.ycp Thu Apr 9 09:02:21 2009
@@ -52,12 +52,6 @@
global map section_options = $[];
/**
- * map of other exported information for new perl-Bootloader interface
- */
-global map exports = $[];
-
-
-/**
* boolean value indicate if "/" is on logical
* and primary /boot doesn't exist
*/
@@ -140,26 +134,9 @@
* the boot_* keys and the global variables (Boot|Root|Extended)PartitionDevice
* and mbrDisk by calling GetBootloaderDevices().
*/
+ //FIXME: need remove to read only loader location from perl-Bootloader
global string loader_device = nil;
-/**
- * Embed stage 1.5 of the bootloader to dedicated area (if supported)?
- * This is currently only supported by GRUB. A stage 1.5 can be put into the
- * area after the MBR (into the rest of the very first cylinder) or into the
- * "boot loader area" of some filesystems such as FFS and ReiserFS. For more
- * information, see the grub documentation, esp.
- * "info '(grub.info.gz)Bootstrap tricks'"
- * "info '(grub.info.gz)Images'"
- * FIXME: phase this variable out. It is not used any more. GRUB stages are now
- * installed with the "setup" command that handles embed_stage15 internally.
- */
-// This needs to be defined here so that various files can include it.
-// BootCommon.ycp is currently the only central include file, separate include
-// files that are central and specific to each bootloader do not exist (yet?).
-global boolean embed_stage15 = true;
-
-
-
// proposal helping variables
/**
@@ -170,6 +147,7 @@
* will be used to remember the last selected location.
* Currently, valid values are: mbr, boot, root, floppy, mbr_md, none
*/
+ //FIXME: need remove to read only loader location from perl-Bootloader
global string selected_location = nil;
@@ -245,12 +223,6 @@
global boolean backup_mbr = false;
/**
- * true if default section is edited
- * it is important for remember default name...
- */
-global boolean default_changed = false;
-
-/**
* Activate bootloader partition during installation?
*/
global boolean activate = false;
@@ -287,8 +259,7 @@
/**
* type of bootloader to configure/being configured
- * shall be one of "lilo", "grub", "silo", "milo", "aboot",
- * "elilo", "ppc", "zipl", "mips"
+ * shall be one of "lilo", "grub", "elilo", "ppc", "zipl"
*/
string loader_type = nil;
@@ -297,11 +268,6 @@
// installation proposal help variables
/**
- * Last detection proposed to prefer lilo instead of grub
- */
-global boolean prefer_lilo = false;
-
-/**
* List of partitions deleted in primary proposal
*/
global list<string> del_parts = [];
@@ -357,10 +323,6 @@
*/
global boolean was_read = false;
/**
- * were sections settings changes (== true)
- */
-global boolean sections_changed = false;
-/**
* Was bootloader location changed? (== true)
*/
global boolean location_changed = false;
@@ -373,10 +335,6 @@
*/
global boolean files_edited_warned = false;
/**
- * Shall be settings saved when finishing bootloader configuration?
- */
-global boolean save_on_finish = true;
-/**
* time of last change of partitioning
*/
global integer partitioning_last_change = 0;
@@ -384,6 +342,7 @@
* true if memtest was removed by user (manually) during the installation
* proposal
*/
+ //FIXME correct comment
global list<string> removed_sections = [];
/**
@@ -399,15 +358,10 @@
// = [ "linux", "failsafe", "initrd", "floppy" ];
/**
- * Common section types
- */
-global list<string> common_sections_types = ["image", "other"];
-
-/**
* List of all supported bootloaders
*/
-global list<string> bootloaders = ["lilo", "grub", "elilo", "milo", "silo",
- "aboot", "zipl", "ppc", "mips"];
+global list<string> bootloaders = ["lilo", "grub", "elilo",
+ "zipl", "ppc"];
/**
@@ -764,16 +718,6 @@
return exp;
}
-/**
- * Function return common section types
- * @return list string section types
- */
-
-global list<string> Common_sections_types()
-{
- return common_sections_types;
-}
-
/**
* Import settings from a map
@@ -908,7 +852,6 @@
if (clean)
{
BootCommon::RemoveUnexistentSections ("", "");
- // BootCommon::UpdateInitrdLine ();
BootCommon::UpdateAppend ();
BootCommon::UpdateGfxMenu ();
}
@@ -1157,11 +1100,6 @@
loader_type = "elilo";
}
- if (loader_type == "grub")
- {
- prefer_lilo = true;
- }
-
loader_type = SupportedLoader (loader_type);
y2milestone ("Detected bootloader %1", loader_type);
setCurrentLoaderAttribs (loader_type);
Modified: trunk/bootloader/src/modules/BootPOWERLILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootPOWERLILO.ycp?rev=56709&r1=56708&r2=56709&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootPOWERLILO.ycp (original)
+++ trunk/bootloader/src/modules/BootPOWERLILO.ycp Thu Apr 9 09:02:21 2009
@@ -371,11 +371,13 @@
}
else if (Arch::board_mac_new ())
{
- board_type = "mac_new";
+ //board_type = "mac_new";
+ board_type="pmac";
}
else if (Arch::board_mac_old ())
{
- board_type = "mac_old";
+ //board_type = "mac_old";
+ board_type="pmac";
}
else
{
@@ -594,23 +596,26 @@
choosePrepBootPartition ();
}
- string arch = BootCommon::exports["arch"]:"chrp";
- if ( arch == "chrp" ) {
+ switch (getBoardType()) {
+ case ("chrp"):
BootCommon::BootPartitionDevice = prep_boot_partition;
// also set as default value in widget
BootCommon::change_widget_default_value("boot_chrp_custom", prep_boot_partition);
- }
- else if ( arch == "prep" ) {
+ break;
+ case ("prep"):
BootCommon::BootPartitionDevice = prep_boot_partition;
BootCommon::change_widget_default_value("boot_prep_custom", prep_boot_partition);
- }
- else if ( arch == "iseries" ) {
+ break;
+ case ("iseries"):
BootCommon::BootPartitionDevice = prep_boot_partition;
BootCommon::change_widget_default_value("boot_iseries_custom", prep_boot_partition);
- }
- else if ( arch == "pmac" ) {
+ break;
+ case ("pmac") :
BootCommon::BootPartitionDevice = GoodPmacBootPartition();
BootCommon::change_widget_default_value("boot_pmac_custom", BootCommon::BootPartitionDevice);
+ break;
+ default:
+ y2error("Unknown ppc architecture");
}
// These need to be set, for POWERLILO probably only to interface with
@@ -667,27 +672,26 @@
"timeout" : "80",
];
- string arch = BootCommon::exports["arch"]:"chrp";
map boot_map = $[];
y2milestone("RootPartDevice is %1",BootCommon::RootPartitionDevice);
-
- if ( arch == "chrp" ) {
+ switch(getBoardType()){
+ case ("chrp") :
boot_map = $[
"boot_chrp_custom" : BootCommon::BootPartitionDevice,
];
- }
- else if ( arch == "prep" ) {
+ break;
+ case ("prep") :
boot_map = $[
"boot_prep_custom" : BootCommon::BootPartitionDevice,
];
- }
- else if ( arch == "pmac" ) {
+ break;
+ case ("pmac") :
boot_map = $[
"boot_pmac_custom" : BootCommon::BootPartitionDevice,
];
- }
- else if ( arch == "iseries" ) {
+ break;
+ case ("iseries") :
boot_map = $[
"boot_slot" : "B",
// FIXME: what file should be used here?
@@ -702,7 +706,11 @@
BootCommon::BootPartitionDevice != "") {
boot_map["boot_iseries_custom"] = BootCommon::BootPartitionDevice;
}
+ break;
+ default:
+ y2error("Unknown ppc architecture");
}
+
// Finally merge results into "globals": new values replace old ones
BootCommon::globals = (map) union(BootCommon::globals, boot_map);
@@ -769,7 +777,7 @@
case ("prep"):
BootCommon::globals["boot_prep_custom"] = BootCommon::BootPartitionDevice;
break;
-
+
case ("pmac"):
BootCommon::globals["boot_pmac_custom"] = BootCommon::BootPartitionDevice;
break;
@@ -779,7 +787,7 @@
BootCommon::globals["boot_file"] = "/tmp/suse_linux_image";
if (BootCommon::BootPartitionDevice != nil &&
- BootCommon::BootPartitionDevice != "")
+ BootCommon::BootPartitionDevice != "")
{
BootCommon::globals["boot_iseries_custom"] = BootCommon::BootPartitionDevice;
}
@@ -787,7 +795,7 @@
default:
BootCommon::globals["boot_chrp_custom"] = BootCommon::BootPartitionDevice;
break;
- }
+ }
}
@@ -955,8 +963,6 @@
if (clean)
{
BootCommon::RemoveUnexistentSections ("", "");
- // FIXME: this is not needed, unclear code
- // BootCommon::UpdateInitrdLine ();
BootCommon::UpdateAppend ();
}
Modified: trunk/bootloader/src/modules/BootZIPL.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootZIPL.ycp?rev=56709&r1=56708&r2=56709&view=diff
==============================================================================
--- trunk/bootloader/src/modules/BootZIPL.ycp (original)
+++ trunk/bootloader/src/modules/BootZIPL.ycp Thu Apr 9 09:02:21 2009
@@ -61,41 +61,6 @@
// misc. functions
- /**
- * Update /etc/zip.conf before the update (fix kernel path)
- */
-// global define void UpdateZiplConfBeforeUpdate () {
-// // update the partition layout if needed
-// // ?? FIXME any other conditions?
-// if (Mode::update ())
-// {
-// map output = (map)SCR::Execute (.target.bash_output, sformat (
-// "/bin/cp %1/etc/zipl.conf %1/etc/zipl.conf.YaST2save",
-// Installation::destdir));
-// y2milestone ("Result of backup original elilo.conf: %1", output);
-// output = (map)SCR::Execute (.target.bash_output, sformat (
-// "/bin/cp /usr/lib/YaST2/bin/update_zipl_conf %1/usr/lib/YaST2/bin/",
-// Installation::destdir
-// ));
-// y2milestone ("Result of copying from / to %1: %2",
-// Installation::destdir,
-// output
-// );
-// output = (map)SCR::Execute (.target.bash_output, sformat (
-// "chroot %1 /usr/lib/YaST2/bin/update_zipl_conf",
-// Installation::destdir));
-// if (output["exit"]:0 != 0)
-// {
-// y2error ("Update of /etc/zipl.conf failed: %1", output);
-// }
-// else
-// {
-// BootCommon::was_proposed = false;
-// BootCommon::was_read = false;
-// }
-// }
-// }
-
/**
* Update /etc/sysconfig/hardware configuration
* Use data from install.inf file
Modified: trunk/bootloader/src/modules/Bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/Bootloader.ycp?rev=56709&r1=56708&r2=56709&view=diff
==============================================================================
--- trunk/bootloader/src/modules/Bootloader.ycp (original)
+++ trunk/bootloader/src/modules/Bootloader.ycp Thu Apr 9 09:02:21 2009
@@ -32,11 +32,8 @@
import "Storage";
import "Directory";
-// import "BootABOOT";
import "BootELILO";
import "BootLILO";
-// import "BootMILO";
-// import "BootS390";
import "BootGRUB";
import "BootPOWERLILO"; // The ppc-LILO File
//fate 303395
@@ -57,8 +54,6 @@
global define void ReadOrProposeIfNeeded ();
global define string getDefaultSection ();
global define string getKernelParam (string section, string key);
- global define boolean setKernelParam (string section, string key, string value);
- global define list<string> listKernelParams (string section);
global define string getLoaderType ();
global define string getProposedDefaultSection ();
global define boolean UpdateGfxMenu ();
@@ -93,9 +88,6 @@
// UI helping variables
- global map aliases = $[];
- global map ws_data = $[];
-
include "bootloader/routines/switcher.ycp";
include "bootloader/routines/popups.ycp";
@@ -123,7 +115,6 @@
boolean checkUsedStorage ()
{
if ((!Storage::InitLibstorage(true)) && (Mode::normal()))
- //if ((false) && (Mode::normal()))
return false;
else
return true;
@@ -357,16 +348,6 @@
// first run bootloader-specific update function
blUpdate ();
- // remove ide-scsi emulation
- list<string> parameters = listKernelParams ("LINUX_DEFAULT");
- foreach (string p, parameters, {
- if (regexpmatch (p, "^hd.=ide-scsi$")
- || regexpmatch (p, "^hd.lun=.*$"))
- {
- string param = regexpsub (p, "^(.*)=.*$", "\\1");
- setKernelParam ("LINUX_DEFAULT", param, nil);
- }
- });
// remove no more needed modules from MODULES_LOADED_ON_BOOT
string mlob = (string)
SCR::Read (.sysconfig.kernel.MODULES_LOADED_ON_BOOT);
@@ -527,9 +508,6 @@
string lt = getLoaderType ();
SCR::Write (.sysconfig.bootloader.LOADER_TYPE, lt);
-// SCR::Write (.sysconfig.bootloader.LOADER_LOCATION,
-// BootCommon::location);
-// FIXME
SCR::Write (.sysconfig.bootloader, nil);
params_to_save["additional_failsafe_params"]
@@ -1168,128 +1146,6 @@
}
/**
- * List kernel parameters
- * @param section string section title, use DEFAULT for default section
- * @return a list of kernel parameters (in the form 'hdd=ide-scsi')
- */
- global define list<string> listKernelParams (string section) {
- ReadOrProposeIfNeeded ();
- if (section == "DEFAULT")
- section = getDefaultSection ();
- else if (section == "LINUX_DEFAULT")
- section = getProposedDefaultSection ();
- if (section == nil)
- return [];
- integer sectnum = -1;
- integer index = -1;
- foreach (map s, BootCommon::sections, {
- index = index + 1;
- if (s["name"]:"" == section)
- sectnum = index;
- });
- if (sectnum == -1)
- return [];
- string line = BootCommon::sections[sectnum, "append"]:"";
- list<string> par = splitstring (line, " ");
- par = filter (string p, par, ``(p != ""));
- return par;
- }
-
- /**
- * Get list of bootloader sections
- * @param type symbol what sections to be returned
- * `linux -> linux sections
- * `other -> other sections
- * `all -> all sections
- * @return list of strings representing sections names
- */
- global define list getSectionsList (symbol type) {
- list