YaST Commits
Threads by month
- ----- 2025 -----
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2009
- 18 participants
- 322 discussions

[yast-commit] r57076 - /trunk/storage/storage/src/include/ep-lvm.ycp
by kmachalkova@svn.opensuse.org 06 May '09
by kmachalkova@svn.opensuse.org 06 May '09
06 May '09
Author: kmachalkova
Date: Wed May 6 11:41:02 2009
New Revision: 57076
URL: http://svn.opensuse.org/viewcvs/yast?rev=57076&view=rev
Log:
The same in bright pink (context-dependent
HandleLvmButtons)
Modified:
trunk/storage/storage/src/include/ep-lvm.ycp
Modified: trunk/storage/storage/src/include/ep-lvm.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-l…
==============================================================================
--- trunk/storage/storage/src/include/ep-lvm.ycp (original)
+++ trunk/storage/storage/src/include/ep-lvm.ycp Wed May 6 11:41:02 2009
@@ -69,12 +69,22 @@
);
}
- void HandleLvmButtons( string device, map event )
+ void HandleLvmButtons( any user_data, string device, map event )
{
- map dev = Storage::GetDiskPartition( device );
- string vg = (string) dev["disk"]:nil;
- // FIXME: is this necessary & sufficient condition?
- boolean is_vg = (dev["nr"]:"" == "");
+ string vg = "";
+ boolean is_vg = false;
+
+ if (user_data == nil)
+ {
+ map dev = Storage::GetDiskPartition( device );
+ vg = (string) dev["disk"]:nil;
+ // FIXME: is this necessary & sufficient condition?
+ is_vg = (dev["nr"]:"" == "");
+ }
+ else
+ {
+ vg = (string) user_data;
+ }
switch (Event::IsWidgetActivated(event))
{
@@ -166,7 +176,7 @@
{
string device = (string) UI::QueryWidget(`id(`table), `CurrentItem);
- HandleLvmButtons( device, event );
+ HandleLvmButtons( user_data, device, event );
switch (Event::IsWidgetContextMenuActivated(event))
@@ -207,7 +217,7 @@
{
string device = (string) user_data;
- HandleLvmButtons( device, event );
+ HandleLvmButtons( nil, device, event );
UI::SetFocus(`id(`text));
}
@@ -256,7 +266,7 @@
string vg_device = (string) user_data;
string lv_device = (string) UI::QueryWidget(`id(`table), `CurrentItem);
- HandleLvmButtons( lv_device, event );
+ HandleLvmButtons( vg_device, lv_device, event );
switch (Event::IsWidgetContextMenuActivated(event))
{
@@ -374,7 +384,7 @@
{
string device = (string) user_data;
- HandleLvmButtons( device, event );
+ HandleLvmButtons( nil, device, event );
UI::SetFocus (`id(`text));
}
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0

[yast-commit] r57075 - /trunk/storage/storage/src/include/ep-hd.ycp
by kmachalkova@svn.opensuse.org 05 May '09
by kmachalkova@svn.opensuse.org 05 May '09
05 May '09
Author: kmachalkova
Date: Tue May 5 16:57:18 2009
New Revision: 57075
URL: http://svn.opensuse.org/viewcvs/yast?rev=57075&view=rev
Log:
HandleHdButtons based on the context (all disks -
nil user_data, or individual disk - HD name as user
data) ... fixes "Add" button function in individual
disk branch
Modified:
trunk/storage/storage/src/include/ep-hd.ycp
Modified: trunk/storage/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-h…
==============================================================================
--- trunk/storage/storage/src/include/ep-hd.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd.ycp Tue May 5 16:57:18 2009
@@ -69,12 +69,22 @@
);
}
- void HandleHdButtons( string device, map event )
+ void HandleHdButtons( any user_data, string device, map event )
{
- map dev = Storage::GetDiskPartition( device );
- string disk = (string) dev["disk"]:nil;
- // FIXME: is this necessary & sufficient condition?
- boolean is_disk = (dev["nr"]:"" == "");
+ string disk = "";
+ boolean is_disk = false;
+
+ if (user_data == nil)
+ {
+ map dev = Storage::GetDiskPartition( device );
+ disk = (string) dev["disk"]:nil;
+ // FIXME: is this necessary & sufficient condition?
+ is_disk = dev["nr"]:nil == "";
+ }
+ else
+ {
+ disk = (string) user_data;
+ }
switch (Event::IsWidgetActivated(event))
{
@@ -152,7 +162,7 @@
{
string device = (string) UI::QueryWidget(`id(`table), `CurrentItem);
- HandleHdButtons( device, event );
+ HandleHdButtons( user_data, device, event );
switch (Event::IsWidgetContextMenuActivated(event))
{
@@ -323,7 +333,7 @@
string disk_device = (string) user_data;
string part_device = (string) UI::QueryWidget(`id(`table), `CurrentItem);
- HandleHdButtons( part_device, event );
+ HandleHdButtons( disk_device, part_device, event );
switch (Event::IsMenu(event))
{
@@ -461,7 +471,7 @@
{
string part_device = (string) user_data;
- HandleHdButtons( part_device, event);
+ HandleHdButtons( nil, part_device, event);
UI::SetFocus(`id(`text));
}
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0

05 May '09
Author: kkaempf
Date: Tue May 5 16:09:45 2009
New Revision: 57074
URL: http://svn.opensuse.org/viewcvs/yast?rev=57074&view=rev
Log:
follow gcc's advice and put ( ) around & operands
Modified:
trunk/core/liby2/src/Y2CCProgram.cc
Modified: trunk/core/liby2/src/Y2CCProgram.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/liby2/src/Y2CCProgram.cc?re…
==============================================================================
--- trunk/core/liby2/src/Y2CCProgram.cc (original)
+++ trunk/core/liby2/src/Y2CCProgram.cc Tue May 5 16:09:45 2009
@@ -80,7 +80,7 @@
{
// Check at least if it is executable (for others) and
// if it is a regular file.
- if (S_ISREG (buf.st_mode) && (buf.st_mode & S_IXOTH == S_IXOTH)) {
+ if (S_ISREG (buf.st_mode) && ((buf.st_mode & S_IXOTH) == S_IXOTH)) {
if (!root.empty ())
file = file.substr (root.length ());
return new Y2ProgramComponent (root, file.c_str (), name,
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
Author: kkaempf
Date: Tue May 5 16:03:30 2009
New Revision: 57073
URL: http://svn.opensuse.org/viewcvs/yast?rev=57073&view=rev
Log:
ignore more generated files
Modified:
trunk/core/ (props changed)
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0

[yast-commit] r57072 - /trunk/storage/data/sysconfig.storage
by aschnell@svn.opensuse.org 05 May '09
by aschnell@svn.opensuse.org 05 May '09
05 May '09
Author: aschnell
Date: Tue May 5 15:56:36 2009
New Revision: 57072
URL: http://svn.opensuse.org/viewcvs/yast?rev=57072&view=rev
Log:
- make ext4 default filesystem (fate #305691)
Modified:
trunk/storage/data/sysconfig.storage
Modified: trunk/storage/data/sysconfig.storage
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/data/sysconfig.storage?r…
==============================================================================
--- trunk/storage/data/sysconfig.storage (original)
+++ trunk/storage/data/sysconfig.storage Tue May 5 15:56:36 2009
@@ -10,7 +10,7 @@
## Type: string
# Default filesystem type.
-DEFAULT_FS="ext3"
+DEFAULT_FS="ext4"
## Type: integer(0:1)
# Show warning at start of yast2 disk.
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0

[yast-commit] r57071 - /trunk/storage/storage/src/include/ep-hd.ycp
by aschnell@svn.opensuse.org 05 May '09
by aschnell@svn.opensuse.org 05 May '09
05 May '09
Author: aschnell
Date: Tue May 5 15:50:21 2009
New Revision: 57071
URL: http://svn.opensuse.org/viewcvs/yast?rev=57071&view=rev
Log:
- don't show partitions bargraph for disks used by something, e.g. bios raid
and multipath
Modified:
trunk/storage/storage/src/include/ep-hd.ycp
Modified: trunk/storage/storage/src/include/ep-hd.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/include/ep-h…
==============================================================================
--- trunk/storage/storage/src/include/ep-hd.ycp (original)
+++ trunk/storage/storage/src/include/ep-hd.ycp Tue May 5 15:50:21 2009
@@ -265,27 +265,38 @@
);
}
- map ddata = Storage::GetDisk(target_map, device);
- list <integer> bits = [];
- list <string> labels = [];
+ term partitions_bargraph = `Empty();
- foreach (map part, ddata["partitions"]:[], {
- if ( part["type"]:`primary != `extended)
+ if (UI::HasSpecialWidget(`BarGraph))
+ {
+ map ddata = Storage::GetDisk(target_map, device);
+
+ if (ddata["used_by"]:`UB_NONE == `UB_NONE)
{
- list <integer> region = part["region"]:[];
- integer tmp = 100*Region::Length( region )/ddata["cyl_count"]:1; //in %
- string descr = part["device"]:"" + "\n" + Storage::KByteToHumanStringOmitZeroes(part["size_k"]:0);
-
- // Guarantee some minimal share (1%) of total graph width to a segment
- // It prevents small partitions e.g. swaps from disappearing completely
- bits = add( bits, (tmp < 1) ? 1 : tmp );
- labels = add( labels, descr);
+ list <integer> bits = [];
+ list <string> labels = [];
+
+ foreach (map part, ddata["partitions"]:[], {
+ if (part["type"]:`primary != `extended)
+ {
+ list <integer> region = part["region"]:[];
+ integer tmp = 100*Region::Length( region )/ddata["cyl_count"]:1; //in %
+ string descr = part["device"]:"" + "\n" + Storage::KByteToHumanStringOmitZeroes(part["size_k"]:0);
+
+ // Guarantee some minimal share (1%) of total graph width to a segment
+ // It prevents small partitions e.g. swaps from disappearing completely
+ bits = add( bits, (tmp < 1) ? 1 : tmp );
+ labels = add( labels, descr);
+ }
+ });
+
+ partitions_bargraph = `BarGraph(`id(`bgraph), bits, labels);
}
- });
+ }
UI::ReplaceWidget(`tab_panel,
`VBox(
- UI::TextMode() ? `Empty() : `BarGraph(`id(`bgraph), bits, labels),
+ partitions_bargraph,
`Table(`id(`table), `opt(`keepSorting, `notify, `notifyContextMenu),
table_header, table_contents),
`HBox(
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0

[yast-commit] r57070 - in /branches/SuSE-SLE-10-SP3-Branch/bootloader: ./ package/ scripts/ src/clients/ src/config/ src/generic/ src/grub/ src/modules/ src/routines/ src/zipl/
by jreidinger@svn.opensuse.org 05 May '09
by jreidinger@svn.opensuse.org 05 May '09
05 May '09
Author: jreidinger
Date: Tue May 5 15:25:33 2009
New Revision: 57070
URL: http://svn.opensuse.org/viewcvs/yast?rev=57070&view=rev
Log:
huge backport thinks to SP3, more details in changelog
Added:
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/device_map_edit_widget.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootSupportCheck.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader_API.pm
Modified:
branches/SuSE-SLE-10-SP3-Branch/bootloader/ (props changed)
branches/SuSE-SLE-10-SP3-Branch/bootloader/MAINTAINER
branches/SuSE-SLE-10-SP3-Branch/bootloader/Makefile.cvs
branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes
branches/SuSE-SLE-10-SP3-Branch/bootloader/scripts/update_gfxmenu
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/ (props changed)
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/config/bootloader.rnc
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/ (props changed)
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/Makefile.am
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/dialogs.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/global_options_widget.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/section_type_widget.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/sections_widget.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/widget_funcs.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/wizards.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/helps.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootCommon.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootELILO.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootLILO.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootPOWERLILO.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootZIPL.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/GfxMenu.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Makefile.am
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/autoinstall.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/global_widgets.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/helps_i386.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/i386.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lib_iface.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/section_widgets.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/switcher.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/wizards.ycp
branches/SuSE-SLE-10-SP3-Branch/bootloader/src/zipl/ (props changed)
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/MAINTAINER
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/MAINTAINER (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/MAINTAINER Tue May 5 15:25:33 2009
@@ -1 +1 @@
-Olaf Dabrunz <od(a)suse.de>
+Jozef Uhliarik <juhliarik(a)suse.cz>
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/Makefile.cvs
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/Makefile.cvs (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/Makefile.cvs Tue May 5 15:25:33 2009
@@ -4,8 +4,10 @@
LIB = $(shell y2tool get-lib)
+PREFIX = /usr
+
configure: all
- ./configure --libdir=/usr/$(LIB)
+ ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB)
all:
y2tool y2autoconf
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/package/yast2-bootloader.changes Tue May 5 15:25:33 2009
@@ -1,4 +1,23 @@
-------------------------------------------------------------------
+Tue May 5 14:38:32 CEST 2009 - jreidinger(a)suse.cz
+
+- backport UEFI support and backport xen support for ELILO
+ (FATE#306032)
+- Cloning section fix backported (bnc#450190)
+- Backport selecting correct translation (bnc#384768)
+- Backport fix for non-selected boot location in autoyast profile
+ (bnc#439674)
+- Backport fix for correct marking section as modified (bnc#432651)
+- Backport fix for proposal with more kernels (bnc#380781)
+- Backport fix reducinf device map to 8 device (bnc#494630)
+- Backport editing efi label (bnc#450682,bnc##269198,bnc##438215)
+- Backport not translating label for ELILO (bnc##151486)
+- Backport some software raid fixes (bnc#341309,bnc#350992)
+- Backport fix for fail on thinkpad, now only store thinkpad MBR
+ and propose overwrite, as for new types it doesn't work properly
+ (bnc#464485)
+
+-------------------------------------------------------------------
Fri Apr 10 10:54:59 CEST 2009 - juhliarik(a)suse.cz
- added fix for problem with worng handling content of MBR
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/scripts/update_gfxmenu
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/scripts/update_gfxmenu (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/scripts/update_gfxmenu Tue May 5 15:25:33 2009
@@ -30,18 +30,36 @@
|| test -f $SRC_DIR/$LOCALE_SHORT.tr && cp $SRC_DIR/$LOCALE_SHORT.tr .
test -f $SRC_DIR/$LOCALE.hlp && cp I4/$LOCALE.hlp . \
|| test -f $SRC_DIR/$LOCALE_SHORT.hlp && cp $SRC_DIR/$LOCALE_SHORT.hlp .
+
# set languages to choose
-if [ "$LOCALE_SHORT" = "en" ] ; then
- echo -n "en
-" >languages || exit 6
+if [ -f $SRC_DIR/$LOCALE.tr ]; then
+ echo "$LOCALE" > languages || exit 6
+ # always add also en_US
+ if [ "$LOCALE" != "en_US" ]; then
+ echo "en_US" >>languages || exit 6
+ fi
+ # set translations of bootloaer menu entries
+ cp $MENU_ENTRIES ./translations.$LOCALE || exit 7;
else
- echo -n "$LOCALE_SHORT
-en
-" >languages || exit 6
+ if [ -f $SRC_DIR/$LOCALE_SHORT.tr ]; then
+ echo "$LOCALE" > languages || exit 6
+ # always add also en_US
+ if [ "$LOCALE" != "en_US" ]; then
+ echo "en_US" >>languages || exit 6
+ fi
+ else
+
+ if [ "$LOCALE_SHORT" = "en" ]; then
+ echo "en_US" >languages || exit 6
+ else
+ echo "$LOCALE_SHORT" >languages || exit 6
+ fi
+ fi
+
+ # set translations of bootloaer menu entries
+ cp $MENU_ENTRIES ./translations.$LOCALE_SHORT || exit 7;
fi
-# set translations of bootloaer menu entries
-cp $MENU_ENTRIES ./translations.$LOCALE_SHORT || exit 7;
test -f $SRC_DIR/background.jpg && cp $SRC_DIR/background.jpg back.jpg
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/clients/bootloader_proposal.ycp Tue May 5 15:25:33 2009
@@ -17,6 +17,7 @@
import "Bootloader";
import "Storage";
import "Mode";
+ import "BootSupportCheck";
include "bootloader/routines/wizards.ycp";
@@ -51,7 +52,7 @@
// changes relevant to the yast2-bootloader settings are made
// through Storage, so the change time of Storage data should be
// sufficient.
- && Bootloader::cached_settings_base_data_change_time == Storage::GetTargetChangeTime())
+ && BootCommon::cached_settings_base_data_change_time == Storage::GetTargetChangeTime())
// FIXME: has the software selection changed?: esp. has the
@@ -84,8 +85,13 @@
if (Bootloader::getLoaderType () == "grub")
{
import "BootGRUB";
+ // merge_level == `main means: merge only the "default" key(s?) of
+ // a "foreign" grub configuration from a different configuration
+ // into our configuration
BootGRUB::merge_level = `main;
Bootloader::Propose ();
+
+
BootGRUB::merge_level = `none;
}
else
@@ -164,9 +170,21 @@
}
}
+ if (!BootSupportCheck::SystemSupported())
+ {
+ ret = (map<string,any>)
+ union(ret,
+ $[
+ "warning_level" : `error,
+ "warning" : BootSupportCheck::StringProblems(),
+ "raw_proposal" : Bootloader::Summary (),
+ ]);
+
+ }
+
// cache the values
Bootloader::cached_settings = Bootloader::Export();
- Bootloader::cached_settings_base_data_change_time = Storage::GetTargetChangeTime();
+ BootCommon::cached_settings_base_data_change_time = Storage::GetTargetChangeTime();
Bootloader::cached_proposal = ret;
}
// This is a request to start some dialog and interact with the user to set
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/config/bootloader.rnc
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/config/bootloader.rnc (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/config/bootloader.rnc Tue May 5 15:25:33 2009
@@ -85,6 +85,8 @@
element sectors {text}? &
element blockoffset {text}? &
element vgamode {text}? &
+ element xen {text}? &
+ element xen_append {text}? &
element noverifyroot { "true" | "false" }? &
element image {text}?
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/Makefile.am (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/Makefile.am Tue May 5 15:25:33 2009
@@ -14,7 +14,8 @@
section_widgets.ycp \
sections_widget.ycp \
widget_funcs.ycp \
- wizards.ycp
+ wizards.ycp \
+ device_map_edit_widget.ycp
EXTRA_DIST = \
$(ynclude_DATA)
Added: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/device_map_edit_widget.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/device_map_edit_widget.ycp (added)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/device_map_edit_widget.ycp Tue May 5 15:25:33 2009
@@ -0,0 +1,184 @@
+/**
+ * File:
+ * include/bootloader/routines/dialogs.ycp
+ *
+ * Module:
+ * Bootloader installation and configuration
+ *
+ * Summary:
+ * Dialogs for configuraion i386-specific functions
+ *
+ * Authors:
+ * Jiri Srain <jsrain(a)suse.cz>
+ *
+ * $Id: dialogs_i386.ycp 47885 2008-05-26 16:34:24Z juhliarik $
+ *
+ */
+
+
+{
+textdomain "bootloader";
+
+
+import "Label";
+import "Wizard";
+import "CWM";
+import "BootCommon";
+import "Stage";
+
+include "bootloader/routines/helps_i386.ycp";
+
+
+/**
+ * Run dialog to adjust installation on i386 and AMD64
+ * @return symbol for wizard sequencer
+ */
+symbol i386InstallDetailsDialog () {
+ term contents = `HBox (`HStretch (), `VBox (
+ `VStretch (),
+ // frame
+ `Frame (_("Disk Order"),
+ `HBox (`HSpacing (2), `VBox (
+ `VSpacing (1),
+ `SelectionBox (`id (`disks),
+ `opt (`notify, `immediate),
+ // selectionn box label
+ _("D&isks"), []),
+ (Mode::config () || Mode::installation())
+ ? `HBox (
+ `HStretch (),
+ `PushButton (`id (`add), `opt (`key_F3), Label::AddButton ()),
+ `PushButton (`id (`delete), `opt(`key_F5), Label::DeleteButton ()),
+ `HStretch ()
+ )
+ : `HBox (),
+ `VSpacing (1)
+ ),
+ `HSquash (
+ `VBox (
+ `VStretch (),
+ `PushButton (`id (`up), `opt (`hstretch), _("&Up")),
+ `PushButton (`id (`down), `opt (`hstretch), _("&Down")),
+ `VStretch ()
+ )
+ ),
+ `HSpacing (2)
+ )
+ ),
+ `VStretch ()
+
+ ), `HStretch ());
+
+ Wizard::SetContentsButtons (
+ // dialog caption
+ _("Boot Loader Device Map"),
+ contents,
+ i386DeviceMapEditHelp(),
+ Label::BackButton (),
+ Label::OKButton ());
+
+ list<string> disks_order = BootCommon::DisksOrder ();
+
+ UI::ChangeWidget (`id (`disks), `Items, disks_order);
+ UI::ChangeWidget (`id (`disks), `CurrentItem, disks_order[0]:"");
+
+ any ret = nil;
+ while (ret == nil)
+ {
+ string current = (string)UI::QueryWidget (`id (`disks), `CurrentItem);
+ integer pos = 0;
+ while (pos < size (disks_order) && disks_order[pos]:"" != current)
+ pos = pos + 1;
+ UI::ChangeWidget (`id (`up), `Enabled,
+ pos > 0 && pos < size (disks_order));
+ UI::ChangeWidget (`id (`down), `Enabled, pos < size (disks_order) - 1);
+
+ ret = UI::UserInput ();
+ boolean order_changed = false;
+
+ if (ret == `add)
+ {
+ term popup = `VBox (`VSpacing (1),
+ // textentry header
+ `InputField (`id (`devname), `opt (`hstretch), _("&Device")),
+ `VSpacing (1),
+ `HBox (`HStretch (),
+ `PushButton (`id (`ok), `opt (`key_F10, `default),
+ Label::OKButton ()),
+ `HStretch (),
+ `PushButton (`id (`cancel), `opt (`key_F8),
+ Label::CancelButton ()),
+ `HStretch ()
+ ),
+ `VSpacing (1)
+ );
+ UI::OpenDialog (popup);
+ symbol pushed = (symbol)UI::UserInput ();
+ string new_dev = (string)
+ UI::QueryWidget (`id (`devname), `Value);
+ UI::CloseDialog ();
+ if (pushed == `ok)
+ {
+ disks_order = add (disks_order, new_dev);
+ order_changed = true;
+ current = new_dev;
+ }
+ }
+ else if (ret == `delete)
+ {
+ disks_order = filter (string d, disks_order, {
+ return d != current;
+ });
+ order_changed = true;
+ current = disks_order[0]:nil;
+ }
+ else if (ret == `up)
+ {
+ disks_order = (list<string>)
+ BootCommon::swapItems (disks_order, pos, pos - 1);
+ order_changed = true;
+ }
+ else if (ret == `down)
+ {
+ disks_order = (list<string>)
+ BootCommon::swapItems (disks_order, pos, pos + 1);
+ order_changed = true;
+ }
+
+ if (ret == `cancel)
+ ret = `abort;
+ if (ret != `next && ret != `abort && ret != `back)
+ {
+ if (order_changed)
+ {
+ UI::ChangeWidget (`id (`disks), `Items, disks_order);
+ UI::ChangeWidget (`id (`disks), `CurrentItem, current);
+ }
+ ret = nil;
+ }
+ }
+ if (ret == `next)
+ {
+ integer index = 0;
+ BootCommon::device_mapping = filter (string k, string v,
+ BootCommon::device_mapping,
+ {
+ return substring (v, 0, 2) != "hd";
+ });
+ BootCommon::mbrDisk = disks_order[0]:"";
+ BootCommon::device_mapping = (map<string,string>)union (
+ BootCommon::device_mapping,
+ listmap (string d, disks_order, {
+ string hex_index = substring (tohexstring (index), 2);
+ index = index + 1;
+ return $[ d : sformat ("hd%1", hex_index) ];
+ })
+ );
+ BootCommon::location_changed = true;
+ }
+ return (symbol)ret;
+}
+
+
+
+} // EOF
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/dialogs.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/dialogs.ycp Tue May 5 15:25:33 2009
@@ -10,6 +10,7 @@
*
* Authors:
* Joachim Plack <jplack(a)suse.de>
+ * Olaf Dabrunz <od(a)suse.de>
*
* $Id$
*
@@ -49,6 +50,10 @@
global void importMetaData() {
BootCommon::exports = BootCommon::GetMetaData ();
+ // clean option list, otherwise options of different bootloaders
+ // get mixed after bootloader switch
+ BootCommon::global_options = $[];
+ BootCommon::section_options = $[];
// Extract type descriptions from exports
foreach(string key, any value, BootCommon::exports, {
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/global_options_widget.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/global_options_widget.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/global_options_widget.ycp Tue May 5 15:25:33 2009
@@ -68,6 +68,10 @@
symbol GOW_Handle (string key, map event) {
y2milestone("Called for key %1 through event %2", key, event);
// FIXME: is that the right way? "path" widget managed right?
+ // bnc #461613 - Unable to boot after making changes to boot loader
+ // bnc #357290 - module rewrites grub generic code when leaving with no changes, which may corrupt grub
+ if (event["EventReason"]:"" == "ValueChanged")
+ BootCommon::location_changed = true;
return generic_Handle (key, event);
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/section_type_widget.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/section_type_widget.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/section_type_widget.ycp Tue May 5 15:25:33 2009
@@ -66,9 +66,11 @@
else
{
BootCommon::current_section["name"] = "";
- // BootCommon::current_section["original_name"] = "";
+ BootCommon::current_section["original_name"] = "";
BootCommon::current_section["__auto"] = false;
- BootCommon::current_section["lines_cache_id"] = "";
+ if (haskey(BootCommon::current_section,"lines_cache_id"))
+ BootCommon::current_section = remove(BootCommon::current_section, "lines_cache_id");
+
}
return nil;
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/sections_widget.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/sections_widget.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/sections_widget.ycp Tue May 5 15:25:33 2009
@@ -81,13 +81,13 @@
),
", "
);
- // Upcase word 'type'
- type = toupper(substring(type,0,1)) + substring(type,1);
return `item (`id (name),
BootCommon::globals["default"]:"" == name ? UI::Glyph (`CheckMark) : "",
name,
- type,
+ (type == "image")
+ ? _("Image")
+ : _("Other"),
summary
);
});
@@ -173,6 +173,11 @@
BootCommon::current_section_index = op == `add ? -1 : index;
BootCommon::current_section_name = name;
y2internal ("Selected section: %1", BootCommon::current_section);
+
+ if (BootCommon::current_section["name"]:"" == BootCommon::globals["default"]:"")
+ BootCommon::default_changed = true;
+ else
+ BootCommon::default_changed = false;
return (symbol)op;
}
else if (op == `delete && confirmSectionDeletePopup (current))
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/widget_funcs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/widget_funcs.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/widget_funcs.ycp Tue May 5 15:25:33 2009
@@ -204,9 +204,15 @@
if ( type == "radio" || type == "check") {
new = `Left(`HBox (
enable_widget,
- `ComboBox (`id (key), def_opt, "",
- maplist(string v, val, ``( `item(`id(v), v) ) )
- )
+ // BNC #395009 Bootloader: Unable to set "Custom boot partition" -
+ // no partitions offered, combobox too small to edit
+ (size (val) > 0 ?
+ `ComboBox (`id (key), def_opt, "",
+ maplist(string v, val, ``( `item(`id(v), v) ) )
+ )
+ :
+ `MinWidth (15, `ComboBox (`id (key), def_opt, "", []))
+ )
));
}
else {
@@ -299,7 +305,14 @@
}
else if (contains(["string", "path", "select", "selectdevice"],
(string)value)) {
- UI::ChangeWidget (`id (key), `Value, data[key]:"");
+
+ // ComboBox doesn't accept `Value, use `Items instead
+ // See bnc #380781
+ if (UI::QueryWidget (`id (key), `WidgetClass) == "YComboBox") {
+ UI::ChangeWidget (`id (key), `Items, [data[key]:""]);
+ } else {
+ UI::ChangeWidget (`id (key), `Value, data[key]:"");
+ }
}
else if (value == "password") {
UI::ChangeWidget (`id (key + "_pw1"), `Value, "**********");
@@ -432,7 +445,15 @@
(string)UI::QueryWidget(`id(base_id), `Value), "*",
_("Select a file name"));
if (file_name != "" && file_name != nil) {
- UI::ChangeWidget(`id(base_id), `Value, file_name);
+
+// ComboBox doesn't accept `Value, use `Items instead
+ // See bnc #380781
+ if (UI::QueryWidget (`id (base_id), `WidgetClass) == "YComboBox") {
+ UI::ChangeWidget(`id(base_id), `Items, [file_name]);
+ } else {
+ UI::ChangeWidget(`id(base_id), `Value, file_name);
+ }
+
reason = "ValueChanged";
id = base_id;
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/wizards.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/generic/wizards.ycp Tue May 5 15:25:33 2009
@@ -116,6 +116,12 @@
BootCommon::sections[BootCommon::current_section_index]
= BootCommon::current_section;
}
+ // update default name if default section is edited
+ if (BootCommon::default_changed)
+ {
+ BootCommon::globals["default"] = BootCommon::current_section["name"]:"";
+ BootCommon::default_changed = false;
+ }
// write stuff down to perl-bootloader and reimport meta data,
// list of possible values might have changed
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/helps.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/helps.ycp Tue May 5 15:25:33 2009
@@ -54,6 +54,10 @@
partition. Either select <b>Set active Flag in Partition Table for Boot Partition</b> and <b>Write generic Boot Code to MBR</b>
in <b>Boot Loader Options</b> to update the master boot record if that is needed or configure your other boot manager
to start this section.</p>"),
+ "boot_extended" :
+("<p><b>Boot from Extended Partition</b> should be selected if your root partition is on
+local partition and the /boot partition is missing</p>"),
+
"boot_custom" :
_("<p><b>Custom Boot Partition</b> lets you choose a partition to boot from.</p>"),
"serial" :
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/grub/misc.ycp Tue May 5 15:25:33 2009
@@ -23,6 +23,7 @@
import "Mode";
import "BootCommon";
import "PackageSystem";
+ import "Map";
// --------------------------------------------------------------
@@ -140,28 +141,37 @@
// });
// }
// }
- if (num != 0)
+
+ // (bnc # 337742) - Unable to boot the openSUSE (32 and 64 bits) after installation
+ // if loader_device is disk device activate BootCommon::BootPartitionDevice
+ if (num == 0)
{
- if (num > 4)
- {
- y2milestone ("Bootloader partition type is logical");
- map tm = Storage::GetTargetMap ();
- list<map> partitions = tm[mbr_dev, "partitions"]:[];
- foreach (map p, partitions, ``{
- if (p["type"]:nil == `extended)
- {
- num = p["nr"]:num;
- y2milestone ("Using extended partition %1 instead",
- num);
- }
- });
- }
+ y2milestone ("loader_device is disk device");
+ p_dev = Storage::GetDiskPartition (BootCommon::BootPartitionDevice);
+ num = BootCommon::myToInteger( p_dev["nr"]:nil );
+ }
+
+ if (num > 4)
+ {
+ y2milestone ("Bootloader partition type is logical");
+ map tm = Storage::GetTargetMap ();
+ list<map> partitions = tm[mbr_dev, "partitions"]:[];
+ foreach (map p, partitions, ``{
+ if (p["type"]:nil == `extended)
+ {
+ num = p["nr"]:num;
+ y2milestone ("Using extended partition %1 instead",num);
+ }
+ });
}
+
map<string,any> ret = $[
"num" : num,
"mbr" : mbr_dev,
"dev" : Storage::GetDeviceName (mbr_dev, num),
];
+
+ y2milestone("Partition for activating: %1", ret);
return ret;
}
@@ -265,6 +275,8 @@
string device_file = mergestring (splitstring (device, "/"), "_");
string device_file_path = "/var/lib/YaST2/backup_boot_sectors/"
+ device_file;
+ string device_file_path_to_logs = "/var/log/YaST2/"
+ + device_file;
SCR::Execute (.target.bash,
"test -d /var/lib/YaST2/backup_boot_sectors || mkdir /var/lib/YaST2/backup_boot_sectors");
if (SCR::Read (.target.size, device_file_path) > 0)
@@ -289,12 +301,24 @@
SCR::Execute (.target.bash, sformat (
"/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
device, device_file_path));
+ // save MBR to yast2 log directory
+ SCR::Execute (.target.bash, sformat (
+ "/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
+ device, device_file_path_to_logs));
if (device == BootCommon::mbrDisk)
{
SCR::Execute (.target.bash, sformat (
"/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
device, "/boot/backup_mbr"));
+ // save thinkpad MBR
+ if (BootCommon::ThinkPadMBR(device))
+ {
+ string device_file_path_thinkpad = device_file_path + "thinkpadMBR";
+ y2milestone("Backup thinkpad MBR");
+ SCR::Execute(.target.bash, sformat (
+ "cp %1 %2 2>&1", device_file_path, device_file_path_thinkpad));
+ }
}
}
@@ -459,6 +483,40 @@
}
/**
+ * function check all partitions and it tries to find /boot partition
+ * if it is MD Raid and soft-riad return correct device for analyse MBR
+ * @param list<map> list of partitions
+ * @return string device for analyse MBR
+ */
+define string soft_MDraid_boot_disk(list<map> partitions)
+{
+ string result = "";
+ string boot_device = "";
+ if ((BootCommon::BootPartitionDevice != nil) && (BootCommon::BootPartitionDevice != ""))
+ boot_device = BootCommon::BootPartitionDevice;
+ else
+ boot_device = BootCommon::RootPartitionDevice;
+
+ foreach(map p, partitions, {
+ if (p["device"]:"" == boot_device)
+ {
+ if ((p["type"]:nil == `sw_raid) && (p["fstype"]:"" == "MD Raid"))
+ {
+ string device_1 = p["devices",0]:"";
+ y2debug("device_1: %1", device_1);
+ map dp = Storage::GetDiskPartition (device_1);
+ y2debug("dp: %1", dp);
+ result = dp["disk"]:"";
+ }
+ }
+ });
+ y2milestone("Device for analyse MBR from soft-raid (MD-Raid only): %1", result);
+ return result;
+}
+
+
+
+/**
* grub_ConfigureLocation()
* Where to install the bootloader.
* Returns the type of device where to install: one of `boot `root `mbr `extended `mbr_md
@@ -550,7 +608,10 @@
boolean keep_mbr = BootCommon::KeepMBR (BootCommon::mbrDisk);
// if is primary, store bootloader there
- if (boot_partition_is_on_mbr_disk && ! is_logical)
+ // there was check if boot device is on logical partition
+ // IMO it is good idea check MBR also in this case
+ // see bug #279837 comment #53
+ if (boot_partition_is_on_mbr_disk)
{
selected_location = `boot;
BootCommon::globals["activate"] = "true";
@@ -562,6 +623,13 @@
// - 0 for a "Generic MBR" (DOS MBR)
// - 1 for a GRUB or lilo "stage 1"
// - 0 for an unknown MBR
+
+ // check if there is raid and if it soft-raid select correct device for analyse MBR
+ // bnc #398356
+ if (size (underlying_boot_partition_devices) > 1)
+ boot_partition_disk = soft_MDraid_boot_disk(partitions_on_boot_partition_disk);
+ if (boot_partition_disk == "")
+ boot_partition_disk = dp["disk"]:"";
map out = (map)SCR::Execute (.target.bash_output, sformat (
"/usr/lib/YaST2/bin/examine_mbr.pl %1", boot_partition_disk));
y2milestone ("MBR examining script returned %1", out);
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootCommon.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootCommon.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootCommon.ycp Tue May 5 15:25:33 2009
@@ -32,6 +32,10 @@
import "Storage";
import "String";
import "Pkg";
+import "Popup";
+import "Package";
+
+import "Linuxrc";
// General bootloader settings
@@ -51,6 +55,14 @@
*/
global map<string,any> exports = $[];
+
+/**
+ * boolean value indicate if "/" is on logical
+ * and primary /boot doesn't exist
+ */
+
+global boolean boot_device_on_logical = false;
+
/**
* map of global options and values
*/
@@ -62,11 +74,33 @@
global list<map<string,any> > sections = [];
/**
+ * Saved change time from target map - proposal
+ */
+
+global integer cached_settings_base_data_change_time = nil;
+
+/**
+ * Saved change time from target map - only for MapAllPartitions()
+ */
+
+global integer saved_last_change_time_from_storage = nil;
+
+
+
+/**
* device mapping between Linux and firmware
*/
global map<string,string> device_mapping = $[];
/**
+/**
+ * Flag indicates that bios_id_missing in disk
+ * true if missing false if at least one disk has bios_id
+ */
+
+global boolean bois_id_missing = true;
+
+/**
* device to save loader stage 1 to
* NOTE: this variable is being phased out. The boot_* keys in the globals map
* are now used to remember the selected boot location. Thus, we now have a
@@ -178,6 +212,12 @@
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;
@@ -328,6 +368,7 @@
global define list<string> getBootloaders ();
global define list<string> Summary ();
global define boolean UsingXenPae();
+global map<string,any> CreateLinuxSection (string title);
//
@@ -436,7 +477,7 @@
"original_name" : title,
"type" : "image",
"__auto" : true,
- "__changed" : false,
+ "__changed" : true,
];
if (title == "memtest86") {
@@ -473,7 +514,7 @@
// Then, get the file names in the "selected" kernel package,
string kernel_package = Kernel::ComputePackage();
- list<string> files = Pkg::PkgGetFilelist( kernel_package, `any );
+ list<string> files = Pkg::PkgGetFilelist( kernel_package, `installed );
y2milestone ("kernel package %1 has these files: %2", kernel_package, files);
// then find the first file that matches the arch-dependent kernel file
@@ -514,7 +555,48 @@
"/boot/initrd-*" :
files_filtered[0]:""
);
+
+ if ((kernel_fn == "") || (kernel_fn == nil))
+ kernel_fn = "/boot/vmlinuz";
+
+ if ((initrd_fn == "") || (initrd_fn == nil))
+ initrd_fn = "/boot/initrd";
+
+ // read commandline options for kernel
+ list<string> cmd = (list<string>) SCR::Read(.proc.cmdline);
+
+ any vga = nil;
+
+ // trying to find "vga" option
+ foreach ( string key, cmd,
+ {
+ if (find(key, "vga=") != -1)
+ vga = key;
+ y2milestone("key: %1", key);
+ });
+ y2milestone("vga from command line: %1", vga);
+ list <string> mode =[];
+
+ // split vga=value
+ if ((vga != nil) && (vga != ""))
+ mode = splitstring(tostring(vga), "=");
+
+ string vgamode =nil;
+
+ // take value if exist
+ if ((size(mode)>1) && (mode[0]:"" == "vga"))
+ vgamode = mode[1]:nil;
+
+ // add value of vga into proposal (if exist)
+ if ((vgamode != nil) && (vgamode != ""))
+ {
+ ret["vga"] = vgamode;
+ y2milestone("vga mode: %1", vgamode);
+ }
+
} else {
+ // the links are shown in the proposal; at the end of an installation,
+ // in bootloader_finish, they will be resolved to the real filenames
kernel_fn = "/boot/" + Kernel::GetBinary ()
+ (title == "wildcard" ? "-*" : "");
initrd_fn = "/boot/initrd" + (title == "wildcard" ? "-*" : "");
@@ -533,10 +615,15 @@
]);
if (BootArch::VgaAvailable () && Kernel::GetVgaType () != "")
{
- if (title == "failsafe")
- ret["vga"] = "normal";
- else
- ret["vga"] = Kernel::GetVgaType ();
+
+ // B#352020 kokso: - Graphical failsafe mode
+ //if (title == "failsafe")
+ // ret["vga"] = "normal";
+ //else
+ ret["vga"] = Kernel::GetVgaType ();
+
+ // B#352020 end
+
}
if (title == "xen")
{
@@ -602,16 +689,18 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
string bl = getLoaderType (false);
if (bl == "none")
return true;
InitializeLibrary (reread, bl);
if (reread)
{
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
sections = GetSections ();
globals = GetGlobal ();
@@ -626,7 +715,7 @@
});
// convert device names in device map to the kernel device names
- map<string,string> device_mapping =
+ device_mapping =
mapmap (string k , string v, device_mapping, {
return $[BootCommon::MountByDev2Dev(k) : v];
});
@@ -730,10 +819,17 @@
// convert device names in device map to the device names indicated by
// "mountby"
+
+ y2milestone ("device map before mapping %1", device_mapping);
map<string,string> my_device_mapping =
mapmap (string k , string v, device_mapping, {
return $[BootCommon::Dev2MountByDev(k) : v];
});
+ y2milestone ("device map after mapping %1", my_device_mapping);
+
+ // convert XEN section to linux section id running in domU
+ // bnc #436899
+ ConvertXENinDomU ();
ret = ret && SetDeviceMap (my_device_mapping);
ret = ret && SetSections (sects);
@@ -791,11 +887,11 @@
string title = s["name"]:"";
// section name "suffix" for default section
string def = title == globals["default"]:"" ? _(" (default)") : "";
- sects = add (sects, sformat ("%1%2", title, def));
+ sects = add (sects, String::EscapeTags (sformat ("+ %1%2", title, def)));
});
// summary text. %1 is list of bootloader sections
- result = add (result, sformat (_("Sections: %1"),
- String::EscapeTags (mergestring (sects, ", "))));
+ result = add (result, sformat (_("Sections:<br>%1"),
+ mergestring (sects, "<br>")));
if (loader_device == "/dev/null")
// summary text
result = add (result, _("Do not install boot loader; just create
@@ -916,21 +1012,22 @@
if (loader_type == "s390")
loader_type = "zipl";
y2milestone ("Bootloader detection returned %1", loader_type);
+ // lslezak@: Arch::is_xenU() returns true only in PV guest
if (Arch::is_uml () || Arch::is_xenU())
{
- //y2milestone ("Not installing any bootloader for UML/Xen PV");
- //loader_type = "none";
+ // y2milestone ("Not installing any bootloader for UML/Xen PV");
+ // loader_type = "none";
// bnc #380982 - pygrub cannot boot kernel
// added installation of bootloader
y2milestone ("It is XEN domU and the bootloader should be installed");
}
- if (loader_type == "grub" && Storage::UseLilo())
+ if ((Arch::i386() || Arch::x86_64()) && Linuxrc::InstallInf("EFI") == "1")
{
- loader_type = "lilo";
- prefer_lilo = true;
+ loader_type = "elilo";
}
- else
+
+ if (loader_type == "grub")
{
prefer_lilo = false;
}
@@ -1007,6 +1104,8 @@
if (Arch::i386 () || Arch::x86_64 ())
{
ret = (list<string>)merge (ret, ["lilo", "grub"]);
+ if (Arch::x86_64 ())
+ ret = (list<string>)merge (ret, ["elilo"]);
}
// in order not to display it twice when "none" is selected
ret = filter (string l, ret, {
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootELILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootELILO.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootELILO.ycp Tue May 5 15:25:33 2009
@@ -14,6 +14,8 @@
* Joachim Plack <jplack(a)suse.de>
* Jiri Srain <jsrain(a)suse.cz>
* Andreas Schwab <schwab(a)suse.de>
+ * Olaf Dabrunz <od(a)suse.de>
+ * Philipp Thomas <pth(a)suse.de>
*
* $Id$
*
@@ -36,6 +38,7 @@
import "Stage";
import "Storage";
import "String";
+import "Arch";
include "bootloader/elilo/helps.ycp";
include "bootloader/routines/popups.ycp";
@@ -61,6 +64,18 @@
string efi_vendor = "SuSE";
+/**
+ * bnc #450682 - adding boot entry to EFI
+ * true is label was added
+ */
+
+global boolean added_label_to_efi = false;
+
+/**
+ * Is the /sys/firmware/efi directory available?
+ */
+boolean efi_available = true;
+
// misc. functions
/**
@@ -124,6 +139,10 @@
map<string,any> section =
BootCommon::CreateLinuxSection (title);
+ // don't translate label bnc #151486
+ section["description"] = section["name"]:"";
+ section["name"] = title;
+
// replace "kernel" by "image"
if (haskey(section, "kernel")) {
section["image"] = section["kernel"]:"";
@@ -142,13 +161,14 @@
global void CreateSections () {
map<string,any> linux = CreateLinuxSection ("linux");
map<string,any> failsafe = CreateLinuxSection ("failsafe");
+ map<string,any> xen = CreateLinuxSection ("xen");
// append for default section is in global
// FIXME do it later
// if (haskey (linux, "append"))
// linux = remove (linux, "append");
- BootCommon::sections = [ linux, failsafe ];
+ BootCommon::sections = [ linux, failsafe, xen ];
}
@@ -160,7 +180,8 @@
BootCommon::globals = $[
// FIXME do it later
// "append" : BootArch::DefaultKernelParams (""),
- "default" : BootCommon::translateSectionTitle ("linux"),
+ // "default" : BootCommon::translateSectionTitle ("linux"),
+ "default" : "linux",
"timeout" : "80",
"prompt" : "true",
"read-only" : "true",
@@ -201,9 +222,12 @@
/**
* Read settings from disk
+ * @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global define boolean Read (boolean reread) {
+global define boolean Read (boolean reread, boolean avoid_reading_device_map) {
import "Product";
boolean efi_entry_found = false;
elilo_conf_filename = getEliloConfFilename ();
@@ -217,7 +241,7 @@
}
SCR::Execute (.target.bash, "/bin/touch /etc/elilo.conf");
BootCommon::DetectDisks ();
- boolean ret = BootCommon::Read (reread);
+ boolean ret = BootCommon::Read (reread, avoid_reading_device_map);
// check for meaningless EFI entry name in sysconfig
if ( !haskey(BootCommon::globals,"boot_efilabel")
@@ -294,6 +318,9 @@
create_efi_entry = true;
if (Mode::update ())
create_efi_entry = false;
+ efi_available = 0 == (integer)SCR::Execute (.target.bash, "test -d /sys/firmware/efi");
+ if (! efi_available)
+ create_efi_entry = false;
elilo_conf_filename = getEliloConfFilename ();
BootCommon::DetectDisks ();
BootCommon::del_parts = BootCommon::getPartitionList (`deleted);
@@ -370,11 +397,11 @@
string def = title == BootCommon::globals["default"]:"" ?
_(" (default)") :
"";
- sects = add (sects, sformat ("%1%2", title, def));
+ sects = add (sects, String::EscapeTags (sformat ("+ %1%2", title, def)));
});
// summary text. %1 is list of bootloader sections
- result = add (result, sformat (_("Sections: %1"),
- mergestring (sects, ", ")));
+ result = add (result, sformat (_("Sections:<br>%1"),
+ mergestring (sects, "<br>")));
return result;
}
@@ -387,7 +414,8 @@
* Update global options of bootloader
* modifies internal structures
*/
- BootCommon::globals["timeout"] = "8";
+ if (BootCommon::globals["timeout"]:"" == "")
+ BootCommon::globals["timeout"] = "8";
BootCommon::globals["append"] = BootArch::DefaultKernelParams ("");
BootCommon::UpdateSections (true, CreateLinuxSection);
@@ -424,18 +452,184 @@
// error popup - label, %1 is bootloader name
_("Error Occurred while Installing %1"),
BootCommon::getLoaderName (BootCommon::getLoaderType (false), `summary)), log);
+ } else {
+ added_label_to_efi = true;
+ y2milestone("Adding label to EFI finish successful");
}
return ret;
}
+/** bnc #438215 - YaST creates efibootloader entry twice
+ * Function convert number of partition to hexa
+ *
+ * @param any number of boot partition (10 or "10")
+ * @return string number boot partition in hexa ("a") - without "0x"
+ */
+string tomyhexa(any boot_part)
+{
+ string ret = "1000";
+
+ integer int_boot_part = tointeger(boot_part);
+ if (int_boot_part != nil)
+ {
+ string hexa = tohexstring(int_boot_part);
+ if (search(hexa, "x")!= nil)
+ {
+ list <string> hexa_without_0x = splitstring(hexa, "x");
+ if (size(hexa_without_0x)>1)
+ ret = hexa_without_0x[1]:"1000";
+ }
+ }
+ return ret;
+}
+
+
+/** bnc #269198 change efi-label
+ * Function check if there exist same efi-label or different for
+ * same partition if efi-label is different delete it and create new one
+ * if it is same nothing to do it.
+ */
+
+boolean updateEFILabel()
+{
+ boolean ret = true;
+ string cmd = "";
+ map mp = Storage::GetMountPoints();
+ string boot_dev = mp[getEfiMountPoint (), 0]:"/boot/efi";
+ map splited = Storage::GetDiskPartition (boot_dev);
+ any boot_part = splited["nr"]:0;
+ any boot_disk = splited["disk"]:"";
+
+
+ // command for checking same boot entry in efi bnc #438215 (YaST creates efibootloader entry twice)
+ cmd = sformat("/usr/sbin/efibootmgr -v | grep -c \"%1.*HD(%2.*File(.\\efi.\\SuSE.\\elilo.efi)\"",
+ BootCommon::globals["boot_efilabel"]:"", tomyhexa(boot_part));
+
+ // check how many entries with same label and partition is actually in efi
+ y2milestone("run command %1", cmd);
+ map out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone("output of command %1", out);
+
+ // check number of same boot entries in efi
+ // if boot entry is added -> don't add it again
+ if (deletechars(out["stdout"]:"","\n") != "0")
+ {
+ if (out["exit"]:0 == 0)
+ y2milestone("Skip adding new boot entry - EFI Label exist");
+ else
+ y2error("Calling command %1 faild", cmd);
+ return ret;
+
+ } else {
+
+ cmd = sformat("/usr/sbin/efibootmgr -v | grep -c \"HD(%1.*File(.\\efi.\\SuSE.\\elilo.efi)\"", tomyhexa(boot_part));
+ // check how many entries with same label and partition is actually in efi
+ y2milestone("run command %1", cmd);
+ map out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone("output of command %1", out);
+
+ // check how many boot entries have same number of partitions
+ if (deletechars(out["stdout"]:"","\n") != "0")
+ {
+ // delete old boot entry
+
+ cmd = sformat("efibootmgr -v |grep \"HD(%1.*File(.\\efi.\\SuSE.\\elilo.efi)\" | cut -d \" \" -f 1",
+ tomyhexa(boot_part));
+ y2milestone("run command %1", cmd);
+ out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone("output of command %1", out);
+
+ string boot_entries = out["stdout"]:"";
+ y2milestone("EFI boot entries with \"same\" boot partition %1",boot_entries);
+
+ list<string> list_boot_entries = splitstring(boot_entries, "\n");
+
+ y2milestone("list_boot_entries=%1",list_boot_entries);
+
+ foreach(string entry, list_boot_entries,
+ {
+ if ((deletechars(entry, "\n*") != "") && (deletechars(entry, "\n*") != nil))
+ {
+ cmd = sformat("/usr/sbin/efibootmgr --delete-bootnum --bootnum %1 -q;",
+ substring (deletechars(entry, "\n*"),4, 4));
+ y2milestone("run command %1", cmd);
+ out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone("output of command %1", out);
+ }
+ });
+
+ }
+ // add new boot entry
+ string bl_logfile = "/var/log/YaST2/y2log_bootloader";
+ string bl_command = sformat ( "/usr/sbin/efibootmgr -v --create --label \"%1\" " +
+ "--disk %2 --part %3 " +
+ "--loader '\\efi\\SuSE\\elilo.efi' --write-signature >> %4 2>&1",
+ BootCommon::globals["boot_efilabel"]:"", boot_disk, boot_part, bl_logfile
+ );
+ ret = ret && installBootLoader (bl_command, bl_logfile);
+ }
+ return ret;
+}
+
+/** FIXME: efibootmgr doesn't provide info about disk!
+ * bnc #450682 - adding boot entry to EFI
+ * function delete all existing boot entry with same name and partition number
+ * @param string name of label
+ * @param string number of partition
+ */
+
+void deleteSameEFIBootEntry(string name, any part_no)
+{
+
+ boolean still_exist = true;
+
+ string cmd = sformat("efibootmgr -v |grep \"%1.*HD(%2.*File(.\\efi.\\SuSE.\\elilo.efi)\" | cut -d \" \" -f 1",
+ name, tomyhexa(part_no));
+ y2milestone("run command %1", cmd);
+ map out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone("output of command %1", out);
+
+ string boot_entries = out["stdout"]:"";
+ y2milestone("EFI boot entries with \"same\" boot partition %1",boot_entries);
+
+ list<string> list_boot_entries = splitstring(boot_entries, "\n");
+
+ y2milestone("list_boot_entries=%1",list_boot_entries);
+
+ foreach(string entry, list_boot_entries,
+ {
+ if ((deletechars(entry, "\n*") != "") && (deletechars(entry, "\n*") != nil))
+ {
+ cmd = sformat("/usr/sbin/efibootmgr --delete-bootnum --bootnum %1 -q;",
+ substring (deletechars(entry, "\n*"),4, 4));
+ y2milestone("run command %1", cmd);
+ out = (map)SCR::Execute (.target.bash_output, cmd);
+ y2milestone("output of command %1", out);
+ }
+ });
+}
/**
* Write bootloader settings to disk
* @return boolean true on success
*/
global define boolean Write () {
+
+ y2milestone("run Write function from BootELILO");
// SCR::Execute (.target.bash, "/sbin/elilo");
boolean ret = BootCommon::UpdateBootloader ();
+ if (ret == nil)
+ ret = false;
+
+// FIXME find a better way to report status
+ if (ret && ! efi_available) {
+ Popup::TimedMessage(
+_("System was not booted via EFI firmware. To boot your
+computer, you need to load ELILO via the EFI shell."), 10);
+ }
+
+ if (Mode::normal())
+ updateEFILabel();
if (BootCommon::location_changed || create_efi_entry)
{
@@ -458,7 +652,35 @@
"--loader '\\efi\\SuSE\\elilo.efi' --write-signature >> %4 2>&1",
BootCommon::globals["boot_efilabel"]:"", boot_disk, boot_part, bl_logfile
);
- ret = ret && installBootLoader (bl_command, bl_logfile);
+
+ // command for checking same boot entry in efi bnc #438215 (YaST creates efibootloader entry twice)
+ string cmd = sformat("/usr/sbin/efibootmgr -v | grep -c \"%1.*HD(%2.*File(.\\efi.\\SuSE.\\elilo.efi)\"",
+ BootCommon::globals["boot_efilabel"]:"", tomyhexa(boot_part));
+ y2milestone("Command for checking same boot entry: %1", cmd);
+
+ // check how many entries with same label and partition is actually in efi
+ map out = (map)SCR::Execute (.target.bash_output, cmd);
+
+ // check number of same boot entries in efi
+ // if boot entry is added -> don't add it again
+ if (deletechars(out["stdout"]:"","\n") == "0")
+ {
+ ret = ret && installBootLoader (bl_command, bl_logfile);
+ } else {
+
+ if (added_label_to_efi)
+ {
+ y2milestone("Skip adding boot entry: %1 to EFI. There already exist and was added: %2 with
+ same label and partition.", BootCommon::globals["boot_efilabel"]:"",
+ deletechars(out["stdout"]:"","\n"));
+ } else {
+ // delete efi entry with same label name and partition
+ deleteSameEFIBootEntry(BootCommon::globals["boot_efilabel"]:"", boot_part);
+ // add new efi boot entry
+ ret = ret && installBootLoader (bl_command, bl_logfile);
+ }
+
+ }
}
@@ -545,6 +767,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);
@@ -572,6 +795,15 @@
];
}
+/**
+ * Set section to boot on next reboot.
+ * @param section string section to boot
+ * @return boolean true on success
+ */
+global define boolean FlagBootDefaultOnce (string section) {
+ /* For now a dummy */
+ return true;
+}
/**
* Return map of provided functions
@@ -579,23 +811,23 @@
*/
global map<string, any> GetFunctions () {
return $[
- "export" : Export,
- "import" : Import,
- "read" : Read,
- "reset" : Reset,
- "propose" : Propose,
- "save" : Save,
- "summary" : Summary,
- "update" : Update,
- "write" : Write,
- "widgets" : genericWidgets,
- "wizard_sequencer" : WizardSequenzer,
- "dialogs" : Dialogs,
- "section_types" : section_types,
+ "export" : Export,
+ "import" : Import,
+ "read" : Read,
+ "reset" : Reset,
+ "propose" : Propose,
+ "save" : Save,
+ "summary" : Summary,
+ "update" : Update,
+ "write" : Write,
+ "widgets" : genericWidgets,
+ "wizard_sequencer" : WizardSequenzer,
+ "dialogs" : Dialogs,
+ "section_types" : section_types,
+ "flagbootdefaultonce" : FlagBootDefaultOnce,
];
}
-
/**
* Initializer of ELILO bootloader
*/
@@ -633,7 +865,7 @@
*/
global define void BootELILO () {
BootCommon::bootloader_attribs["elilo"] = $[
- "required_packages" : ["elilo"],
+ "required_packages" : ["elilo", "efibootmgr"],
"loader_name" : "ELILO",
"initializer" : BootELILO::Initializer,
];
@@ -650,4 +882,3 @@
* fill-column: 78
* End:
*/
-
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootGRUB.ycp Tue May 5 15:25:33 2009
@@ -12,6 +12,8 @@
* Authors:
* Jiri Srain <jsrain(a)suse.cz>
* Joachim Plack <jplack(a)suse.de>
+ * Olaf Dabrunz <od(a)suse.de>
+ * Philipp Thomas <pth(a)suse.de>
*
* $Id$
*
@@ -59,9 +61,9 @@
include "bootloader/grub/misc.ycp";
include "bootloader/routines/popups.ycp";
include "bootloader/grub/helps.ycp";
+include "bootloader/generic/device_map_edit_widget.ycp";
include "bootloader/generic/dialogs.ycp";
-
// end of mandatory functions
//----------------------------------------------------------------------------
@@ -217,12 +219,12 @@
files["/boot/grub/device.map"] = dm;
BootCommon::InitializeLibrary (false, "grub");
BootCommon::SetFilesContents (files);
- list<map<string,string> > sects
+ list<map<string,any> > sects
= BootCommon::GetSections ();
y2debug ("Found sections %1", sects);
if (merge_level == `main)
{
- sects = filter (map<string,string> s, sects, {
+ sects = filter (map<string,any> s, sects, {
return s["initial"]:nil != nil;
});
}
@@ -304,7 +306,7 @@
"type" : "other",
"original_name" : label,
"chainloader" : dev,
- "__changed" : false,
+ "__changed" : true,
"__auto" : true,
"__devs" : [dev],
];
@@ -313,6 +315,8 @@
}
});
}
+
+
if (grub_InstallingToFloppy ())
{
out = add (out, $[
@@ -320,7 +324,7 @@
"original_name" : "hard_disk",
"type" : "other",
"chainloader" : BootCommon::mbrDisk,
- "__changed" : false,
+ "__changed" : true,
"__auto" : true,
"__devs" : [],
]);
@@ -332,7 +336,7 @@
"original_name" : "floppy",
"type" : "other",
"chainloader" : "/dev/fd0",
- "__changed" : false,
+ "__changed" : true,
"__auto" : true,
"__devs" : [],
]);
@@ -351,6 +355,7 @@
s["image"] = additional["image"]:"";
if (haskey (additional, "initrd"))
s["initrd"] = additional["initrd"]:"";
+ s["original_name"] = "linux";
out = add (out, s);
});
}
@@ -376,15 +381,17 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "grub");
if (reread) {
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
grub_DetectDisks ();
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
// refresh device map if not read
if (BootCommon::device_mapping == nil
|| size (BootCommon::device_mapping) == 0)
@@ -392,96 +399,6 @@
BootCommon::ProposeDeviceMap ();
}
- // FIXME: This code can probably be removed. perl-Bootloader sets boot_*
- // flags in the globals map. That is all the UI and the proposal code deal
- // with. The decision to install the bootloader stage 1 on multiple devices
- // (for softraid, dmraid etc.) can be based on the information in the
- // boot_{root,boot,mbr} flags and the disk, partitioning and md information
- // alone. Thus, perl-Bootloader is able to do this.
-/*
- list<string> loader_devices = splitstring (
- BootCommon::globals["stage1_dev"]:"",
- ",");
-
- if (size (loader_devices) > 1) {
- // check if members of a MD are present
- map<string,map> tm = Storage::GetTargetMap ();
- list<string> md = maplist (map m, tm["/dev/md", "partitions"]:[], {
- return m["device"]:"";
- });
- if (Mode::test ())
- md = ["/dev/md0"];
- boolean md_found = false;
- // try collapse all MD disks
- foreach (string md_disk, md, {
- list<string> md_members = sort (maplist (
- string s,
- integer id,
- BootCommon::Md2Partitions (md_disk),
- {
- return s;
- }));
- if (Mode::test ())
- md_members = ["/dev/hda1", "/dev/hdb1"];
-
- boolean reduce = true;
- foreach (string member, md_members, {
- if (! contains (loader_devices, member))
- reduce = false;
- });
- if (reduce) {
- loader_devices = filter (string d, loader_devices, {
- return ! contains (md_members, d);
- });
- loader_devices = add (loader_devices, md_disk);
- }
- });
- // check MBRs of all disks holding /boot partition
- map<string,integer> boot_md
- = BootCommon::Md2Partitions (
- BootCommon::BootPartitionDevice);
- if (Mode::test ())
- boot_md = $["/dev/hda1" : 128, "/dev/hdb1" : 129];
- list<string> md_disks = maplist (string d, integer b, boot_md,
- {
- map p_dev = Storage::GetDiskPartition (d);
- return p_dev["disk"]:"";
- });
- boolean reduce = true;
- foreach (string d, md_disks, {
- if (! contains (loader_devices, d))
- reduce = false;
- });
- if (reduce)
- {
- loader_devices = filter (string d, loader_devices, {
- return ! contains (md_disks, d);
- });
- loader_devices = add (loader_devices, "mbr_md");
- }
- if (contains (loader_devices, BootCommon::BootPartitionDevice))
- {
- loader_devices = filter (string d, loader_devices, {
- return d != BootCommon::BootPartitionDevice;
- });
- backup_to_bootsector = true;
- if (size (loader_devices) > 0)
- {
- loader_devices = sort (loader_devices);
- BootCommon::loader_device = loader_devices[0]:"";
- }
- else
- {
- BootCommon::loader_device = BootCommon::BootPartitionDevice;
- }
- }
- }
- else if (size (loader_devices) == 1)
- {
- BootCommon::loader_device = loader_devices[0]:"";
- }
-*/
-
importMetaData();
return ret;
@@ -693,11 +610,11 @@
string title = s["name"]:"";
// section name "suffix" for default section
string def = title == BootCommon::globals["default"]:"" ? _(" (default)") : "";
- sects = add (sects, sformat ("%1%2", title, def));
+ sects = add (sects, String::EscapeTags (sformat ("+ %1%2", title, def)));
});
- ret = add (ret, sformat (_("Sections: %1"),
- String::EscapeTags (mergestring (sects, ", "))));
+ ret = add (ret, sformat (_("Sections:<br>%1"),
+ mergestring (sects, "<br>")));
if (size(locations) == 0) {
// summary text
@@ -716,6 +633,18 @@
*/
global define void Update () {
BootCommon::UpdateDeviceMap ();
+
+ // During update, for libata device name migration ("/dev/hda1" ->
+ // "/dev/sda1") and somesuch, we need to re-read and parse the rest of the
+ // configuration file contents after internally updating the device map in
+ // perl-Bootloader. This way, the device names are consistent with the
+ // partitioning information we have set up in perl-Bootloader with
+ // SetDiskInfo(), and device names in other config files can be translated
+ // to Unix device names (#328448, this hits sections that are not
+ // (re-)created by yast-Bootloader or later by perl-Bootloader anyway).
+ BootCommon::SetDeviceMap (BootCommon::device_mapping);
+ Read (true, true);
+
BootCommon::UpdateSections (true, CreateLinuxSection);
BootCommon::UpdateGlobals ();
}
@@ -726,9 +655,12 @@
* @return boolean true on success
*/
global define boolean Write () ``{
- grub_updateMBR ();
+
boolean ret = BootCommon::UpdateBootloader ();
if (BootCommon::location_changed || BootCommon::InstallingToFloppy ()) {
+ // bnc #461613 - Unable to boot after making changes to boot loader
+ // bnc #357290 - module rewrites grub generic code when leaving with no changes, which may corrupt grub
+ grub_updateMBR ();
if (BootCommon::InstallingToFloppy ()) {
if (! saveToFLoppyPopup ()) {
y2error ("Preparing floppy disk failed.");
@@ -737,6 +669,9 @@
}
boolean grub_ret = BootCommon::InitializeBootloader ();
+ if (grub_ret == nil)
+ grub_ret = false;
+
y2milestone ("GRUB return value: %1", grub_ret);
if (BootCommon::InstallingToFloppy ()) {
BootCommon::updateTimeoutPopupForFloppy
@@ -757,30 +692,61 @@
global map<string,symbol()> Dialogs () {
return $[
+ "installation" : i386InstallDetailsDialog,
"loader" : genericBootLoaderOptionsDialog,
];
}
/**
+ * Boot passed section once on next reboot.
+ * @param section string section to boot
+ * @return boolean true on success
+ */
+global define boolean FlagOnetimeBoot (string section)
+{
+ integer Section2Index (string section_name)
+ {
+ integer index = -1;
+ integer sectnum = -1;
+
+ foreach (map<string,any> s, BootCommon::sections, {
+ index = index + 1;
+ if (s["name"]:"" == section_name)
+ sectnum = index;
+ });
+
+ y2milestone ("ret: %1", sectnum);
+ return sectnum;
+ }
+
+ map result = (map)SCR::Execute (.target.bash_output, sformat (
+ "/usr/sbin/grubonce \"%1\"", Section2Index(section)));
+ y2milestone ("grubonce returned %1", result);
+ return (result["exit"]:-1 == 0);
+}
+
+
+/**
* Return map of provided functions
* @return a map of functions (eg. $["write"::Write])
*/
global map<string, any> GetFunctions () {
return $[
- //"export" : Export,
- //"import" : Import,
- "read" : Read,
- "reset" : Reset,
- "propose" : Propose,
- "save" : Save,
- "summary" : Summary,
- "update" : Update,
- "write" : Write,
- "widgets" : genericWidgets,
- "wizard_sequencer" : WizardSequenzer,
- "dialogs" : Dialogs,
- "section_types" : section_types,
+ //"export" : Export,
+ //"import" : Import,
+ "read" : Read,
+ "reset" : Reset,
+ "propose" : Propose,
+ "save" : Save,
+ "summary" : Summary,
+ "update" : Update,
+ "write" : Write,
+ "widgets" : genericWidgets,
+ "wizard_sequencer" : WizardSequenzer,
+ "dialogs" : Dialogs,
+ "section_types" : section_types,
+ "flagonetimeboot" : FlagOnetimeBoot,
];
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootLILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootLILO.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootLILO.ycp Tue May 5 15:25:33 2009
@@ -11,6 +11,8 @@
*
* Authors:
* Jiri Srain <jsrain(a)suse.cz>
+ * Olaf Dabrunz <od(a)suse.de>
+ * Philipp Thomas <pth(a)suse.de>
*
* $Id$
*
@@ -28,8 +30,10 @@
import "Pkg";
import "Storage";
+
include "bootloader/routines/popups.ycp";
include "bootloader/routines/dialogs_i386.ycp";
+include "bootloader/generic/dialogs.ycp";
/**
@@ -88,7 +92,7 @@
"type" : "chainloader",
"chainloader" : dev,
"__auto" : true,
- "__changed" : false,
+ "__changed" : true,
"__devs" : [dev],
];
out = add (out, m);
@@ -162,16 +166,18 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "lilo");
if (reread)
{
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
BootCommon::DetectDisks ();
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
BootCommon::loader_device = BootCommon::globals["stage1_dev"]:"";
return ret;
}
@@ -271,6 +277,8 @@
}
ret = ret && BootCommon::InitializeBootloader ();
+ if (ret == nil)
+ ret = false;
ret = ret && BootCommon::PostUpdateMBR ();
return ret;
}
@@ -282,6 +290,18 @@
];
}
+/**
+ * Set section to boot on next reboot
+ * @param section string section to boot
+ * @return boolean true on success
+ */
+global define boolean FlagOnetimeBoot (string section)
+{
+ map result = (map)SCR::Execute (.target.bash_output,
+ sformat ("/sbin/lilo -R \"%1\"", section));
+ y2milestone ("lilo returned %1", result);
+ return (result["exit"]:-1 == 0);
+}
/**
* Return map of provided functions
@@ -289,13 +309,16 @@
*/
global map<string, any> GetFunctions () {
return $[
- "dialogs" : Dialogs,
- "read" : Read,
- "propose" : Propose,
- "save" : Save,
- "summary" : BootCommon::i386Summary,
- "update" : Update,
- "write" : Write,
+ "dialogs" : Dialogs,
+ "read" : Read,
+ "propose" : Propose,
+ "save" : Save,
+ "summary" : BootCommon::i386Summary,
+ "update" : Update,
+ "write" : Write,
+ "flagonetimeboot" : FlagOnetimeBoot,
+ "widgets" : genericWidgets,
+ "section_types" : section_types,
];
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootPOWERLILO.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootPOWERLILO.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootPOWERLILO.ycp Tue May 5 15:25:33 2009
@@ -1,4 +1,3 @@
-
/**
* File:
* modules/BootPOWERLILO.ycp
@@ -14,6 +13,7 @@
* Jiri Srain <jsrain(a)suse.cz>
* Joachim Plack <jplack(a)suse.de>
* Olaf Dabrunz <od(a)suse.de>
+ * Philipp Thomas <pth(a)suse.de>
*
* $Id$
*
@@ -461,11 +461,12 @@
"original_name" : title,
"image" : image_fn,
"initrd" : initrd_fn,
+ "optional" : "true", // bnc #217443
"root" : BootCommon::RootPartitionDevice,
// "": do not include resume parameter on ppc
"append" : BootArch::DefaultKernelParams (""),
"__auto" : true,
- "__changed" : false,
+ "__changed" : true,
"__devs" : [BootCommon::BootPartitionDevice, BootCommon::RootPartitionDevice],
];
return ret;
@@ -708,6 +709,56 @@
y2milestone ("Base source: %1", base_source);
}
+/** bnc #439674 Autoyast install of Cell blades fails to install bootloader
+ * The function update global settings for bootloader
+ * if there is used autoyast The basic problem is that there is missing
+ * boot_* , timeout etc.
+ * If there missing necessary information they will be added
+ *
+ */
+void UpdateGlobalsInAutoInst()
+{
+ if (!haskey(BootCommon::globals, "timeout"))
+ BootCommon::globals["timeout"] = "80";
+
+ if (!haskey(BootCommon::globals, "activate"))
+ BootCommon::globals["activate"] = "true";
+
+ // if there missing boot_* -> then propose it
+ if ((!haskey(BootCommon::globals, "boot_chrp_custom")) &&
+ (!haskey(BootCommon::globals, "boot_prep_custom")) &&
+ (!haskey(BootCommon::globals, "boot_pmac_custom")) &&
+ (!haskey(BootCommon::globals, "boot_iseries_custom")))
+ {
+ string arch = getBoardType ();
+ switch(arch) {
+ case ("prep"):
+ BootCommon::globals["boot_prep_custom"] = BootCommon::BootPartitionDevice;
+ break;
+
+ case ("pmac"):
+ BootCommon::globals["boot_pmac_custom"] = BootCommon::BootPartitionDevice;
+ break;
+
+ case ("iseries"):
+ BootCommon::globals["boot_slot"] = "B";
+ BootCommon::globals["boot_file"] = "/tmp/suse_linux_image";
+
+ if (BootCommon::BootPartitionDevice != nil &&
+ BootCommon::BootPartitionDevice != "")
+ {
+ BootCommon::globals["boot_iseries_custom"] = BootCommon::BootPartitionDevice;
+ }
+ break;
+ default:
+ BootCommon::globals["boot_chrp_custom"] = BootCommon::BootPartitionDevice;
+ break;
+ }
+
+ }
+
+}
+
// general functions
/**
@@ -762,6 +813,8 @@
if (Mode::autoinst ())
{
y2debug ("Nothing to do in AI mode if sections exist");
+ // bnc #439674 Autoyast install of Cell blades fails to install bootloader
+ UpdateGlobalsInAutoInst();
}
else
BootCommon::FixSections (BootPOWERLILO::CreateSections);
@@ -820,15 +873,18 @@
/**
* Read settings from disk
+ * @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "ppc");
if (reread) {
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
y2milestone (":: Read globals: %1", BootCommon::globals);
importMetaData();
@@ -870,22 +926,25 @@
BootCommon::UpdateAppend ();
}
+ // check if there is selected "none" bootloader
+ string bl = BootCommon::getLoaderType (false);
+
+ if (bl == "none")
+ {
+ BootCommon::InitializeLibrary (init, bl);
+ return true;
+ }
+
if (! BootCommon::InitializeLibrary (init, "ppc"))
// send current disk/partition information to perl-Bootloader
BootCommon::SetDiskInfo ();
- // Sanity check the sections list: we can only pass strings
- // through the perl interface
- list<map<string,string> > sects = maplist (map<string,any> s, BootCommon::sections, {
- return (map<string,string>)
- filter (string k, any v, s, { return is (v, string); });
- });
-
- // convert root device names in sections to the device names indicated by
- // "mountby"
- sects = maplist (map<string,string> s, sects, {
- s["root"] = BootCommon::Dev2MountByDev(s["root"]:"");
- return s;
+ // convert
+ map<string,string> my_globals = mapmap (string k , string v, BootCommon::globals, {
+ if ((k == "stage1_dev") || (regexpmatch(k, "^boot_.*custom$" )))
+ return $[k : BootCommon::Dev2MountByDev(v)];
+ else
+ return $[k : v];
});
// FIXME: remove all mountpoints of type 'boot/boot' through some Storage::<func>
@@ -894,8 +953,8 @@
// partitions in 'boot_<arch>_custom' and 'clone' (chrp)
// ret = ret && BootCommon::SetDeviceMap (device_mapping);
- ret = ret && BootCommon::SetSections (sects);
- ret = ret && BootCommon::SetGlobal (BootCommon::globals);
+ ret = ret && BootCommon::SetSections (BootCommon::sections);
+ ret = ret && BootCommon::SetGlobal (my_globals);
if (flush)
ret = ret && BootCommon::CommitSettings ();
Added: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootSupportCheck.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootSupportCheck.ycp (added)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootSupportCheck.ycp Tue May 5 15:25:33 2009
@@ -0,0 +1,316 @@
+/**
+ * File:
+ * modules/BootSupportCheck.ycp
+ *
+ * Module:
+ * Bootloader installation and configuration
+ *
+ * Summary:
+ * Check whether the current system setup is a supported configuration
+ *
+ * Authors:
+ * Jiri Srain <jsrain(a)suse.cz>
+ *
+ * $Id: BootCommon.ycp 49686 2008-08-05 10:04:46Z juhliarik $
+ *
+ */
+
+{
+module "BootSupportCheck";
+
+textdomain "bootloader";
+
+import "Bootloader";
+import "Arch";
+import "Storage";
+import "BootCommon";
+
+/**
+ * List of problems found during last check
+ */
+list<string> detected_problems = [];
+
+/**
+ * Add a new problem description to the list of found problems
+ */
+void AddNewProblem (string description) {
+ detected_problems = add (detected_problems, description);
+}
+
+/**
+ * List detected problems
+ * Always run SystemSupported before calling this function
+ * @return boolean a list of problems, empty if no was found
+ */
+global list<string> DetectedProblems () {
+ return detected_problems;
+}
+
+
+/**
+ * Formated string of detected problems
+ * Always run SystemSupported before calling this function
+ * @return boolean a list of problems, empty if no was found
+ */
+global string StringProblems () {
+
+ string ret = "";
+ if (size(detected_problems) > 0)
+ {
+ foreach(string s, detected_problems,
+ {
+ ret = ret + s + "\n";
+ });
+ }
+
+ return ret;
+}
+
+
+/**
+ * Check that bootloader is known and supported
+ */
+boolean KnownLoader () {
+ if (! contains (["grub", "elilo", "ppc", "zipl", "lilo", "none"], Bootloader::getLoaderType ()))
+ {
+
+ y2error ("Unknown bootloader: %1", Bootloader::getLoaderType ());
+ AddNewProblem (sformat (_("Unknown bootloader: %1"), Bootloader::getLoaderType ()));
+ return false;
+ }
+ return true;
+}
+
+/**
+ * Check if elilo is supported
+ */
+boolean checkElilo()
+{
+ string cmd = "modprobe efivars 2>/dev/null";
+ map ret = (map)SCR::Execute (.target.bash_output, cmd);
+ if (ret["exit"]:1 == 0)
+ return true;
+ else
+ return false;
+}
+
+
+
+/**
+ * Check that bootloader matches current hardware
+ */
+boolean CorrectLoaderType () {
+ string lt = Bootloader::getLoaderType ();
+ if (lt == "none")
+ return true;
+
+ if (Arch::s390() && lt == "zipl")
+ return true;
+ if (Arch::ppc() && lt == "ppc")
+ return true;
+ if (Arch::ia64() && lt == "elilo")
+ return true;
+ if (Arch::i386() || Arch::x86_64()) {
+ if (checkElilo()) {
+ if (lt == "elilo")
+ return true;
+ } else {
+ if ((lt == "grub") || (lt == "lilo"))
+ return true;
+ }
+ }
+ y2error ("Unsupported combination of hardware platform %1 and bootloader %2", Arch::architecture(), lt);
+ AddNewProblem (sformat (_("Unsupported combination of hardware platform %1 and bootloader %2"), Arch::architecture(), lt));
+ return false;
+}
+
+/**
+ * Checks for GPT partition table
+ // FIXME adapt for ELILO if needed
+ */
+boolean GptPartitionTable () {
+ boolean ret = true;
+ map tm = Storage::GetTargetMap ();
+ list<string> devices = [ BootCommon::BootPartitionDevice ];
+ // TODO add more devices
+ foreach (string dev, devices, {
+ map p_dev = Storage::GetDiskPartition (dev);
+ integer num = BootCommon::myToInteger( p_dev["nr"]:nil );
+ string mbr_dev = p_dev["disk"]:"";
+ string label = tm[mbr_dev,"label"]:"";
+ y2milestone ("Label: %1", label);
+ y2internal ("Num: %1", num);
+ if (label == "gpt")
+ {
+ if (num > 3)
+ {
+ y2error ("Partition number > 3 is being used for booting with GPT partition table");
+ AddNewProblem (_("Partition number > 3 is being used for booting with GPT partition table"));
+ ret = false;
+ }
+ }
+ });
+ return ret;
+}
+
+
+/**
+ * Check if boot partition exist
+ * check if not on raid0
+ *
+ * @return boolean true on success
+ */
+
+
+global boolean check_BootDevice()
+{
+ boolean result = true;
+ string boot_device = "";
+
+ map<string,map> devices = (map<string,map>)Storage::GetTargetMap();
+
+
+ boot_device = BootCommon::getBootPartition();
+
+ // if (BootCommon::BootPartitionDevice == BootCommon::RootPartitionDevice)
+ // AddNewProblem (_("Doesn't exist separete /boot partition"));
+
+ boolean found_boot = false;
+ // check if boot device is on raid0
+ if (boot_device != "")
+ {
+ foreach (string k, map v, devices,
+ {
+ foreach (map p, (list<map>)(v["partitions"]:[]),
+ {
+ if (p["device"]:"" == boot_device)
+ {
+ if ((p["raid_type"]:"" != "raid1") && (p["type"]:nil ==`sw_raid))
+ {
+ AddNewProblem (sformat(_("The boot device is on raid type: %1. System will not boot."), p["raid_type"]:""));
+ y2error("The boot device: %1 is on raid type: %2", boot_device, p["raid_type"]:"");
+ result = false;
+ break;
+ } else {
+ found_boot = true;
+ y2milestone("The boot device: %1 is on raid: %2", boot_device, p["raid_type"]:"");
+ //break;
+ }
+
+ // check if /boot directory is on supported filesystem
+ if (p["used_fs"]:nil == `xfs) {
+ AddNewProblem (_("The /boot directory is on an XFS filesystem. System will not boot."));
+ y2error ("The /boot directory is on an XFS filesystem");
+ result = false;
+ break;
+ } else {
+ found_boot = true;
+ y2milestone ("/boot filesystem is OK");
+ break;
+ }
+
+ }
+ });
+ if ((!result) || (found_boot))
+ break;
+ });
+ }
+ return result;
+}
+
+/**
+ * Check if there is bios_id
+ * if not show warning
+ *
+ * @return boolean true on success
+ */
+
+boolean CheckBios_ID()
+{
+ boolean ret = true;
+ if (BootCommon::bois_id_missing)
+ {
+ AddNewProblem (_("It was not possible to determine the exact order of disks for device map. The order of disks can be changed in \"Boot Loader Installation Details\""));
+ ret = false;
+ }
+ return ret;
+}
+
+
+/**
+ * Check that the root partition is reachable
+ */
+boolean RootPartition () {
+ return true;
+}
+
+/**
+ * GRUB-related check
+ */
+global boolean GRUB () {
+ boolean ret = GptPartitionTable ();
+ if (ret)
+ ret = check_BootDevice();
+ if (ret)
+ ret = CheckBios_ID();
+ return ret;
+}
+
+/**
+ * ELILO related check
+ */
+boolean ELILO () {
+ return true;
+}
+
+/**
+ * ZIPL related check
+ */
+boolean ZIPL () {
+ return true;
+}
+
+/**
+ * PPC related check
+ */
+boolean PPC () {
+ return true;
+}
+
+/**
+ * Check if the system configuraiton is supported
+ * Also sets the founds problems into internal variable
+ * Always run this function before calling DetectedProblems()
+ * @return boolean true if supported
+ */
+global boolean SystemSupported () {
+ detected_problems = [];
+
+ // check if the bootloader is known and supported
+ boolean supported = KnownLoader ();
+
+ string lt = Bootloader::getLoaderType ();
+ if (lt == "none")
+ return true;
+
+ // detect correct bootloader type
+ supported = CorrectLoaderType () && supported;
+
+ // check whether root partition can be reached
+ supported = RootPartition () && supported;
+
+ // check specifics for individual loaders
+ if (lt == "grub")
+ supported = GRUB () && supported;
+ else if (lt == "elilo")
+ supported = ELILO () && supported;
+ else if (lt == "ppc")
+ supported = PPC () && supported;
+ else if (lt == "zipl")
+ supported = ZIPL () && supported;
+
+ y2milestone ("Configuration supported: %1", supported);
+ return supported;
+}
+
+} // EOF
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootZIPL.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootZIPL.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/BootZIPL.ycp Tue May 5 15:25:33 2009
@@ -12,6 +12,7 @@
* Authors:
* Joachim Plack <jplack(a)suse.de>
* Jiri Srain <jsrain(a)suse.cz>
+ * Philipp Thomas <pth(a)suse.de>
*
* $Id$
*
@@ -162,15 +163,17 @@
/**
* Read settings from disk
* @param reread boolean true to force reread settings from system
+ * @param avoid_reading_device_map do not read new device map from file, use
+ * internal data
* @return boolean true on success
*/
-global boolean Read (boolean reread) {
+global boolean Read (boolean reread, boolean avoid_reading_device_map) {
BootCommon::InitializeLibrary (reread, "zipl");
if (reread) {
- BootCommon::ReadFiles ();
+ BootCommon::ReadFiles (avoid_reading_device_map);
}
BootCommon::DetectDisks ();
- boolean ret = BootCommon::Read (false);
+ boolean ret = BootCommon::Read (false, avoid_reading_device_map);
return ret;
}
@@ -267,6 +270,8 @@
global define boolean Write () {
boolean ret = BootCommon::UpdateBootloader ();
ret = ret && BootCommon::InitializeBootloader ();
+ if (ret == nil)
+ ret = false;
return ret;
}
@@ -285,6 +290,16 @@
];
}
+/**
+ * Set section to boot on next reboot.
+ * @param section string section to boot
+ * @return boolean true on success
+ */
+global define boolean FlagOnetimeBoot (string section)
+{
+ /* For now a dummy */
+ return true;
+}
/**
* Return map of provided functions
@@ -292,19 +307,20 @@
*/
global map<string, any> GetFunctions () {
return $[
- //"export" : Export,
- //"import" : Import,
- "read" : Read,
- //"reset" : Reset,
- "propose" : Propose,
- "save" : Save,
- "summary" : Summary,
- "update" : Update,
- "write" : Write,
- "widgets" : genericWidgets,
- "wizard_sequencer" : WizardSequenzer,
- "dialogs" : Dialogs,
- "section_types" : section_types,
+ //"export" : Export,
+ //"import" : Import,
+ "read" : Read,
+ //"reset" : Reset,
+ "propose" : Propose,
+ "save" : Save,
+ "summary" : Summary,
+ "update" : Update,
+ "write" : Write,
+ "widgets" : genericWidgets,
+ "wizard_sequencer" : WizardSequenzer,
+ "dialogs" : Dialogs,
+ "section_types" : section_types,
+ "flagonetimeboot" : FlagOnetimeBoot,
];
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader.ycp Tue May 5 15:25:33 2009
@@ -10,6 +10,7 @@
*
* Authors:
* Jiri Srain <jsrain(a)suse.cz>
+ * Olaf Dabrunz <od(a)suse.de>
*
* $Id$
*
@@ -29,6 +30,7 @@
import "Progress";
import "Stage";
import "Storage";
+ import "Directory";
// import "BootABOOT";
import "BootELILO";
@@ -37,7 +39,11 @@
// import "BootS390";
import "BootGRUB";
import "BootPOWERLILO"; // The ppc-LILO File
+ //fate 303395
+ import "ProductFeatures";
+ import "Arch";
+ // interface for clients
global define map Export ();
global define boolean Import (map settings);
global define void Propose ();
@@ -45,6 +51,9 @@
global define void Reset ();
global define boolean Write ();
+ global define boolean FlagOnetimeBoot (string section);
+
+ // additional interfaces, mostly for other modules
global define void ReadOrProposeIfNeeded ();
global define string getDefaultSection ();
global define string getKernelParam (string section, string key);
@@ -53,7 +62,8 @@
global define string getLoaderType ();
global define string getProposedDefaultSection ();
global define boolean UpdateGfxMenu ();
-
+ global define void DelDuplicatedSections();
+ global define void ResolveSymlinksInSections();
/**
* Write is repeating again
@@ -73,7 +83,6 @@
*/
global map cached_proposal = nil;
global map cached_settings = $[];
- global integer cached_settings_base_data_change_time = nil;
// old vga value handling function
@@ -219,7 +228,7 @@
if (testAbort ())
return false;
- boolean ret = blRead (true);
+ boolean ret = blRead (true, false);
BootCommon::was_read = true;
old_vga = getKernelParam (getDefaultSection (), "vga");
@@ -272,6 +281,8 @@
BootCommon::backup_mbr = true;
y2milestone ("Proposed settings: %1", Export ());
}
+
+
/**
* Display bootloader summary
* @return a list of summary lines
@@ -929,6 +940,8 @@
if (value != "false")
{
BootCommon::sections[sectnum, key] = value;
+ // added flag that section was modified bnc #432651
+ BootCommon::sections[sectnum, "__changed"] = true;
}
else
{
@@ -941,6 +954,8 @@
string line = BootCommon::sections [sectnum, "append"]:"";
line = BootCommon::setKernelParamToLine (line, key, value);
BootCommon::sections [sectnum, "append"] = line;
+ // added flag that section was modified bnc #432651
+ BootCommon::sections[sectnum, "__changed"] = true;
}
BootCommon::changed = true;
boolean ret = true;
@@ -1001,6 +1016,16 @@
}
/**
+ * Set section to boot on next reboot
+ * @param section string section to boot
+ * @return boolean true on success
+ */
+ global define boolean FlagOnetimeBoot(string section)
+ {
+ return blFlagOnetimeBoot (section);
+ }
+
+ /**
* Check whether settings were read or proposed, if not, decide
* what to do and read or propose settings
*/
Added: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader_API.pm
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader_API.pm (added)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Bootloader_API.pm Tue May 5 15:25:33 2009
@@ -0,0 +1,294 @@
+#!/usr/bin/perl -w
+
+#
+# Interface to perl-Bootloader library
+#
+
+package Bootloader_API;
+
+use strict;
+
+use Bootloader::Library;
+use LIMAL::LogHelper;
+
+our %TYPEINFO;
+
+BEGIN { $TYPEINFO{ALL_METHODS} = 0; }
+
+# create a new bootloader object
+my $lib_ref = Bootloader::Library->new();
+
+my @lines_cache = ();
+my $lines_cache_index = 0;
+
+# Log collected log messages
+sub DumpLog {
+ foreach my $rec (@{$lib_ref->GetLogRecords() || []})
+ {
+ if ($rec->{"level"} eq "debug")
+ {
+ LIMAL::LogHelper::logDebug ($rec->{"message"});
+ }
+ elsif ($rec->{"level"} eq "milestone")
+ {
+ LIMAL::LogHelper::logInfo ($rec->{"message"});
+ }
+ elsif ($rec->{"level"} eq "warning")
+ {
+ LIMAL::LogHelper::logError ("WARNING: " . $rec->{"message"});
+ }
+ elsif ($rec->{"level"} eq "error")
+ {
+ LIMAL::LogHelper::logError ($rec->{"message"});
+ }
+ else
+ {
+ LIMAL::LogHelper::logError ("Incomplete log record");
+ LIMAL::LogHelper::logError ($rec->{"message"});
+ }
+ }
+}
+
+
+BEGIN { $TYPEINFO{setLoaderType} = ["function", "void", "string"]; }
+# do library initialization for a specific bootloader type
+sub setLoaderType($) {
+ my ($lt) = @_;
+ my $ret = $lib_ref->SetLoaderType($lt);
+
+ @lines_cache = ();
+ $lines_cache_index = 0;
+ DumpLog();
+ return $ret;
+}
+
+BEGIN { $TYPEINFO{updateBootloader} = ["function", "boolean", "boolean"]; }
+sub updateBootloader() {
+ my ($avoid_init) = @_;
+ my $ret = $lib_ref->UpdateBootloader($avoid_init);
+
+ DumpLog();
+ return $ret;
+}
+
+BEGIN { $TYPEINFO{updateSerialConsole} = ["function", "string", "string", "string"]; }
+sub updateSerialConsole() {
+ my ($my_append, $my_console) = @_;
+ my $ret = $lib_ref->UpdateSerialConsole($my_append, $my_console);
+
+ DumpLog();
+ return $ret;
+}
+
+BEGIN { $TYPEINFO{initializeBootloader} = ["function", "boolean"]; }
+# first time initialization of firmware/bios specific code
+sub initializeBootloader() {
+ my $ret = $lib_ref->InitializeBootloader();
+
+ DumpLog();
+ return $ret;
+}
+
+BEGIN { $TYPEINFO{readSettings} = ["function", "boolean", "boolean"]; }
+# read configuration
+sub readSettings() {
+ my ($avoid_reading_device_map) = @_;
+ my $ret = $lib_ref->ReadSettings($avoid_reading_device_map);
+
+ DumpLog();
+ return $ret ? "true" : "false";
+}
+
+BEGIN { $TYPEINFO{writeSettings} = ["function", "boolean"]; }
+# write settings to the files
+sub writeSettings() {
+ my $ret = $lib_ref->WriteSettings();
+ DumpLog();
+
+ return $ret;
+}
+
+
+BEGIN { $TYPEINFO{getMetaData} = ["function", ["map", "string", "string"]]; }
+# get data format and type description as far as available for
+# specific bootloader
+sub getMetaData() {
+ my $mdat_ref = $lib_ref->GetMetaData() || {};
+
+ # copy the hash and encode meta tags
+ my %metadata=();
+ while ((my $key, my $value) = each ( %{$mdat_ref} )) {
+ if (ref($value)) {
+ if (ref($value) eq "HASH") {
+ foreach my $k (keys %$value) {
+ $metadata{"%" . $key . "%" . $k} = $value->{$k};
+ }
+ }
+ elsif (ref($value) eq "ARRAY") {
+ foreach my $i (0 .. $#$value) {
+ $metadata{"#" . $key . "#" . $i} = $value->[$i];
+ }
+ }
+ }
+ else {
+ $metadata{$key} = $value;
+ }
+ }
+
+ DumpLog();
+ return \%metadata;
+}
+
+
+BEGIN { $TYPEINFO{getDeviceMapping} = ["function", ["map", "string", "string"]]; }
+sub getDeviceMapping() {
+ my $devmap = $lib_ref->GetDeviceMapping () || {};
+ DumpLog();
+ return $devmap;
+}
+
+BEGIN { $TYPEINFO{setDeviceMapping} = ["function", "boolean", ["map", "string", "string"]]; }
+sub setDeviceMapping($) {
+ my ($dm) = @_;
+
+ my $ret = $lib_ref->SetDeviceMapping ($dm);
+ DumpLog();
+ return $ret;
+}
+
+BEGIN { $TYPEINFO{getGlobalSettings} = ["function", ["map", "string", "string"]]; }
+sub getGlobalSettings() {
+ my %globalsettings = %{$lib_ref->GetGlobalSettings () || {}};
+
+ # remove "__lines" key - it's internal
+ my $idx = $lines_cache_index++;
+ $globalsettings{"lines_cache_id"} = $idx;
+ $lines_cache[$idx] = delete( $globalsettings{'__lines'} );
+
+ # if there is "stage1_dev" key then convert the values to single string
+ if (defined $globalsettings{'stage1_dev'})
+ {
+ my $string = join(",",@{$globalsettings{'stage1_dev'}}) ;
+ $globalsettings{'stage1_dev'} = $string;
+ }
+
+ my %ret;
+ # convert data to string type
+ while ((my $key, my $value) = each %globalsettings) {
+ $ret{"$key"} = "$value";
+ }
+
+ return \%ret;
+}
+
+BEGIN { $TYPEINFO{setGlobalSettings} = ["function", "boolean", ["map", "string", "string"]]; }
+sub setGlobalSettings($) {
+ my ($globals) = @_;
+ my %globalsettings = %{$globals};
+
+ # if there is "stage1_dev" key then convert the value from single
+ # string back to an array
+ if (defined $globalsettings{'stage1_dev'}) {
+ # split device string into a list
+ my @devices = split(',', $globalsettings{'stage1_dev'});
+ $globalsettings{'stage1_dev'} = \@devices;
+ }
+
+
+ my $index = exists($globalsettings{"lines_cache_id"}) ?
+ $globalsettings{"lines_cache_id"} : undef;
+ if ((defined($index)) && ($index ne "")) {
+ $globalsettings{"__lines"} = $lines_cache[$index];
+ }
+
+ my $ret = $lib_ref->SetGlobalSettings (\%globalsettings);
+ DumpLog();
+ return $ret;
+}
+
+BEGIN { $TYPEINFO{getSections} = ["function", ["list", ["map", "string", "any"]]]; }
+sub getSections() {
+ my @sections = @{$lib_ref->GetSections () || []};
+
+ # remove "__lines" key - it's internal
+ # FIXME: this should be done in Bootloader::Core which can do
+ # house holding of its internals by itself!!
+ foreach my $section (@sections) {
+ my $index = $lines_cache_index++;
+ $lines_cache[$index] = $section->{'__lines'};
+ delete $section->{'__lines'};
+ $section->{"lines_cache_id"} = $index;
+ }
+ DumpLog();
+ return \@sections;
+}
+
+BEGIN { $TYPEINFO{setSections} = ["function", "boolean", ["list", ["map", "string", "any"]]]; }
+sub setSections($) {
+ my ($sections) = @_;
+
+ my @sections = @{$sections || []};
+ foreach my $section (@sections) {
+ my $index = exists($section->{"lines_cache_id"}) ?
+ $section->{"lines_cache_id"} : undef;
+ if (defined($index))
+ {
+ $section->{"__lines"} = $lines_cache[$index];
+ }
+ }
+ my $ret = $lib_ref->SetSections($sections);
+ DumpLog();
+ return $ret;
+}
+
+# handle native config file text
+#
+BEGIN { $TYPEINFO{setFilesContents} = ["function", "boolean", ["map", "string", "string"]]; }
+sub setFilesContents($) {
+ my ($contents) = @_;
+
+ my $ret = $lib_ref->SetFilesContents($contents);
+
+ DumpLog();
+ return $ret;
+}
+
+BEGIN { $TYPEINFO{getFilesContents} = ["function", ["map", "string", "string"]]; }
+sub getFilesContents() {
+ my $ret = $lib_ref->GetFilesContents();
+
+ DumpLog();
+ return $ret;
+}
+
+
+BEGIN { $TYPEINFO{setMountPoints} = ["function", "boolean", ["map", "string", "string"]]; }
+sub setMountPoints($) {
+ my ($dm) = @_;
+ my $ret = $lib_ref->DefineMountPoints ($dm);
+
+ DumpLog();
+ return $ret;
+}
+
+BEGIN { $TYPEINFO{setPartitions} = ["function", "boolean", ["list", ["list", "string"]]]; }
+sub setPartitions($) {
+ my ($dm) = @_;
+ my $ret = $lib_ref->DefinePartitions($dm);
+
+ DumpLog();
+ return $ret;
+}
+
+BEGIN { $TYPEINFO{setMDArrays} = ["function", "boolean", ["map", "string", ["list", "string"]]]; }
+sub setMDArrays($) {
+ my ($dm) = @_;
+ my $ret = $lib_ref->DefineMDArrays($dm);
+
+ DumpLog();
+ return $ret;
+}
+
+
+# import fails if we cannot create the object
+$lib_ref;
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/GfxMenu.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/GfxMenu.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/GfxMenu.ycp Tue May 5 15:25:33 2009
@@ -184,7 +184,7 @@
import "Product";
string product = Product::name;
string prod_filtered = filterchars (product, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 _.");
- if (product == prod_filtered && product != " ")
+ if (product != nil && product == prod_filtered && product != " " && product != "")
{
if (orig == "linux")
{
@@ -284,6 +284,7 @@
return ret;
}
+
/**
* Update graphical bootloader to contain translations for section labels in
* the currently selected installation language (set in
@@ -294,6 +295,7 @@
*/
global define boolean UpdateGfxMenuContents (string loader) {
y2milestone ("Updating GFX boot menu");
+
// if the boot menu does not exist, return without updating it
if (SCR::Read (.target.size, "/boot/message") == -1)
return true;
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Makefile.am (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/modules/Makefile.am Tue May 5 15:25:33 2009
@@ -13,14 +13,16 @@
BootGRUB.ycp \
BootLILO.ycp \
BootPOWERLILO.ycp \
- BootZIPL.ycp
+ BootZIPL.ycp \
+ Bootloader_API.pm \
+ BootSupportCheck.ycp
# BootS390.ycp \
# BootMILO.ycp \
# BootABOOT.ycp
Bootloader_API.pm:
- test -f Bootloader_API.pm || ln -sf `find /usr/lib/perl5 -name Bootloader_API.pm | tail -1`
+ test -f Bootloader_API.pm || exit 1
EXTRA_DIST = \
@@ -35,10 +37,6 @@
BootCommon.ybc: Bootloader_API.pm
-install: install_Bootloader_API install-am
-
-install_Bootloader_API:
- test -d ${RPM_BUILD_ROOT}/@moduledir@ || mkdir -p ${RPM_BUILD_ROOT}/@moduledir@
- /bin/cp -f -d Bootloader_API.pm ${RPM_BUILD_ROOT}/@moduledir@
+install: install-am
include $(top_srcdir)/Makefile.am.common
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/autoinstall.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/autoinstall.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/autoinstall.ycp Tue May 5 15:25:33 2009
@@ -149,7 +149,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";
@@ -178,7 +178,9 @@
map<string,string> device_map = listmap (
map<string,string> entry, dm,
{
- return $[ entry["linux"]:"" : entry["firmware"]:"" ];
+ string firmware = deletechars(entry["firmware"]:"", "()");
+
+ return $[ entry["linux"]:"" : firmware ];
});
exp["specific", "device_map"] = device_map;
}
@@ -265,6 +267,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<list<map> > sections = ai["sections"]:[];
list<map> globals = ai["global"]:[];
sections = prepend (sections, globals);
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/dialogs.ycp Tue May 5 15:25:33 2009
@@ -379,7 +379,7 @@
{
files[filename] = (string)UI::QueryWidget (`id (`file), `Value);
BootCommon::SetFilesContents (files);
- Bootloader::blRead (false);
+ Bootloader::blRead (false, false);
BootCommon::changed = true;
BootCommon::location_changed = true;
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/global_widgets.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/global_widgets.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/global_widgets.ycp Tue May 5 15:25:33 2009
@@ -28,6 +28,11 @@
import "StorageDevices";
import "Bootloader";
import "Progress";
+import "PackageSystem";
+import "Package";
+import "Message";
+
+
include "bootloader/routines/helps.ycp";
@@ -332,6 +337,25 @@
return `redraw;
}
+ if (Arch::x86_64 ()) {
+ if (new_bl == "elilo") {
+// continue/cancel pop-up
+ if (! Popup::ContinueCancel (_("
+ELILO supports only the EFI boot architecture. If yor
+firmware does not support it, your computer will not
+boot.")))
+ return nil;
+ }
+ else if (old_bl == "elilo") {
+// continue/cancel pop-up
+ if (! Popup::ContinueCancel (_("
+Bootloader you selected does not support the EFI boot
+architecture. If your firmware does not support legacy
+booting, your computer will not boot.")))
+ return nil;
+ }
+ }
+
// warning - popup, followed by radio buttons
string label = _("
You chose to change your boot loader. When converting
@@ -807,7 +831,13 @@
else if (op == `init)
{
// Bootloader::blSave (false, false, false);
- BootCommon::InitializeBootloader ();
+ boolean ret = BootCommon::InitializeBootloader ();
+ if (ret == nil)
+ ret = false;
+
+ if (!ret)
+ Popup::Warning(_("Writing bootloader settings failed."));
+
}
else if (op == `propose_deep)
{
@@ -843,6 +873,38 @@
}
+
+/**
+ * Function for disable back button
+ * @param string key
+ */
+
+void BackButton (string key) {
+ if (Mode::installation())
+ UI::ChangeWidget(`id(`back), `Enabled, false);
+}
+
+
+/**
+ * Init function where are added UI hadle functions
+ * special hack widget where is handlig disable back button
+ *
+ * @return map<string,any> map for start-stop widget
+ */
+
+map<string,any> DisBackButton () {
+ map<string,any> result = $[];
+
+ result["widget"] = `custom;
+ result["custom_widget"] =`Empty();
+ result["init"] = BackButton;
+ result["help"] = " ";
+
+ return result;
+}
+
+
+
/**
* Get the main dialog tabs description
* @return a map the description of the tabs
@@ -859,7 +921,8 @@
"sections",
`VSpacing (1)
), `HSpacing (3)),
- "widget_names": ["sections"]
+ "widget_names": ["DisBackButton", "sections"]
+
],
"installation": $[
// tab header
@@ -891,9 +954,9 @@
`VStretch ()
), `HStretch ()),
"widget_names": (lt == "none" || lt == "default")
- ? [ "loader_type", "loader_options" ]
+ ? [ "loader_type", "loader_options", "DisBackButton"]
: [ "loader_type", "loader_options", "loader_location",
- "inst_details" ]
+ "inst_details", "DisBackButton" ]
],
];
};
@@ -949,7 +1012,12 @@
"handle" : InstDetailsButtonHandle,
"help" : InstDetailsHelp (),
],
+
+ "DisBackButton" : DisBackButton(),
];
+
+
+
return _common_global_widgets;
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/helps_i386.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/helps_i386.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/helps_i386.ycp Tue May 5 15:25:33 2009
@@ -56,6 +56,20 @@
: "");
}
+string i386DeviceMapEditHelp ()
+{
+ // help text 1/5
+ return _("<p><big><b>Disks Order</b></big><br>
+To specify the order of the disks according to the order in BIOS, use
+the <b>Up</b> and <b>Down</b> buttons to reorder the disks.</p>")
+ + (Mode::config ()
+ // help text 2/5, optional (only for autoinstallation)
+ ? _("<p>To add a disk, push <b>Add</b>.
+ To remove a disk, push <b>Remove</b>.</p>")
+ : "");
+}
+
+
/**
* Get help
* @return string help text
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/i386.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/i386.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/i386.ycp Tue May 5 15:25:33 2009
@@ -90,11 +90,18 @@
* @return boolean true if it is MBR
*/
global boolean ThinkPadMBR (string disk) {
+
if (_thinkpad_mbr == nil || disk != _old_thinkpad_disk)
{
_old_thinkpad_disk = disk;
string mbr = GetMBRContents (disk);
- _thinkpad_mbr = issubstring (mbr, thinkpad_seq);
+ integer x02 = tointeger ("0x" + substring (mbr, 4, 2));
+ integer x03 = tointeger ("0x" + substring (mbr, 6, 2));
+ string x0e = substring (mbr, 28, 2);
+ string x0f = substring (mbr, 30, 2);
+ y2internal ("Data: %1 %2 %3 %4", x02, x03, x0e, x0f);
+ _thinkpad_mbr = (2 <= x02 && x02 <= tointeger ("0x63") && 2 <= x03 && x03 <= tointeger ("0x63") &&
+ tolower (x0e) == "4e" && tolower (x0f) == "50");
}
y2milestone ("MBR of %1 contains ThinkPad sequence: %2",
disk, _thinkpad_mbr);
@@ -109,8 +116,15 @@
* @return boolean true to keep the contents
*/
global boolean KeepMBR (string disk) {
- if (ThinkPadMBR (disk))
- return true;
+ //if (ThinkPadMBR (disk))
+ // return true;
+ // FIXME: see bug #464485 there is problem with detection of
+ // MBR the 3rd byte is 0 after recovery thinkpad notebook with
+ // recovery CD, next missing cooperate with Lenovo there also
+ // missing any specification about Lenovo's changes in MBR
+
+ y2milestone("Skip checking of MBR for thinkpad sequence");
+
return false;
}
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lib_iface.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lib_iface.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lib_iface.ycp Tue May 5 15:25:33 2009
@@ -151,11 +151,11 @@
* @param sections a list of all loader sections (as maps)
* @return boolean true on success
*/
-global boolean SetSections (list<map<string,string> > sections) {
+global boolean SetSections (list<map<string,any> > sections) {
y2milestone ("Storing bootloader sections %1", sections);
- sections = maplist (map<string,string> s, sections, {
+ sections = maplist (map<string,any> s, sections, {
s["__modified"] = "1";
- s = filter (string key, string value, s, {
+ s = filter (string key, any value, s, {
return (! is (value, string)) || (value != "");
});
@@ -171,9 +171,9 @@
* Get boot loader sections
* @return a list of all loader sections (as maps)
*/
-global list<map<string,string> > GetSections () {
+global list<map<string,any> > GetSections () {
y2milestone ("Reading bootloader sections");
- list<map<string,string> > sects = System::Bootloader_API::getSections ();
+ list<map<string,any> > sects = System::Bootloader_API::getSections ();
if (sects == nil)
{
y2error ("Reading sections failed");
@@ -284,11 +284,13 @@
/**
* Read the files from the system to internal cache of the library
+ * @param avoid_reading_device_map do not read the device map, but use internal
+ * data
* @return boolean true on success
*/
-global boolean ReadFiles () {
+global boolean ReadFiles (boolean avoid_reading_device_map) {
y2milestone ("Reading Files");
- boolean ret = System::Bootloader_API::readSettings ();
+ boolean ret = System::Bootloader_API::readSettings (avoid_reading_device_map);
if (! ret)
y2error ("Reading files failed");
return ret;
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/lilolike.ycp Tue May 5 15:25:33 2009
@@ -10,6 +10,7 @@
*
* Authors:
* Jiri Srain <jsrain(a)suse.cz>
+ * Olaf Dabrunz <od(a)suse.de>
*
* $Id$
*
@@ -23,6 +24,7 @@
import "Storage";
import "StorageDevices";
import "BootArch";
+import "Map";
global string DiskOrderSummary ();
global list<string> DisksOrder ();
@@ -124,6 +126,42 @@
return boot_disk;
}
+
+
+/**
+ * function check all partitions and it tries to find /boot partition
+ * if it is MD Raid and soft-riad return correct device for analyse MBR
+ * @param list<map> list of partitions
+ * @return string device for analyse MBR
+ */
+define string soft_MDraid_boot_disk(list<map> partitions)
+{
+ string result = "";
+ string boot_device = "";
+ if ((BootCommon::BootPartitionDevice != nil) && (BootCommon::BootPartitionDevice != ""))
+ boot_device = BootCommon::BootPartitionDevice;
+ else
+ boot_device = BootCommon::RootPartitionDevice;
+
+ foreach(map p, partitions, {
+ if (p["device"]:"" == boot_device)
+ {
+ if ((p["type"]:nil == `sw_raid) && (p["fstype"]:"" == "MD Raid"))
+ {
+ string device_1 = p["devices",0]:"";
+ y2debug("device_1: %1", device_1);
+ map dp = Storage::GetDiskPartition (device_1);
+ y2debug("dp: %1", dp);
+ result = dp["disk"]:"";
+ }
+ }
+ });
+ y2milestone("Device for analyse MBR from soft-raid (MD-Raid only): %1", result);
+ return result;
+}
+
+
+
/**
* ConfigureLocation()
* Where to install the bootloader.
@@ -524,9 +562,12 @@
&& ! haskey (getSwapPartitions (), resume))
// points to unexistent swap partition
{
- append = setKernelParamToLine (append,
- "resume", getLargestSwapPartition ());
- s["append"] = append;
+ // bnc# 335526 - Installing memtest with lilo screws up installation
+ if (search(s["original_name"]:"", "memtest") == nil)
+ {
+ append = setKernelParamToLine (append, "resume", getLargestSwapPartition ());
+ s["append"] = append;
+ }
}
return s;
});
@@ -694,7 +735,8 @@
value = regexpsub (value,
"^(.*)\.suse(.*)$", "\\1\\2");
}
- s["key"] = value;
+ // This was broken (was: s["key"] = value;)
+ s[key] = value;
});
// If we did not replace the sections anyway, adjust the section titles:
// Does this section
@@ -722,18 +764,28 @@
y2milestone ("... to %1", s["name"]:"");
}
+ // Update device names in sections for certain section types, if the
+ // section has not been recreated anyway
+ // FIXME: never update device names twice!
foreach (string key, ["root", "chainloader"], {
+ // FIXME: for some reason, this used to update "linux" and
+ // "failsafe" even if they have been recreated; but "other"
+ // sections were never updated -- since there are no calls to
+ // UpdateSections() with replace == false, ATM we disable updating
+ // "linux" and "failsafe", and add "other", seed
+ // BootCommon::update_section_types
if ((contains (update_section_types, type)
&& ! contains (recreated, label))
|| key == "chainloader")
{
- string device = s["key"]:"";
+ string device = (string) s[key]:nil;
+ y2milestone ("Checking for update: device %1 of key %2, section %3", device, key, label);
if (device != nil)
{
y2milestone ("Updating root/other device of section %1",
label);
device = BootCommon::UpdateDevice (device);
- s["key"] = device;
+ s[key] = device;
}
}
});
@@ -779,7 +831,8 @@
* modifies internal sreuctures
*/
global void UpdateGlobals () {
- BootCommon::globals["timeout"] = "8";
+ if (BootCommon::globals["timeout"]:"" == "")
+ BootCommon::globals["timeout"] = "8";
list<string> s1_devs
= splitstring (BootCommon::globals["stage1_dev"]:"", ",");
s1_devs = maplist (string d, s1_devs, {
@@ -982,7 +1035,7 @@
*/
global void UpdateGfxMenu () {
string message = globals["gfxmenu"]:"";
- if (message != "")
+ if ((message != "") && (search(message, "(") == nil))
{
if (-1 == SCR::Read (.target.size, message))
{
@@ -1293,6 +1346,57 @@
return ret;
}
+/**
+ * Convert XEN boot section to normal linux section
+ * if intalling in domU (bnc #436899)
+ *
+ * @return boolean true if XEN section is converted to linux section
+ */
+
+boolean ConvertXENinDomU ()
+{
+
+ boolean ret = false;
+ if (!Arch::is_xenU())
+ {
+ y2milestone("Don't convert XEN section - it is not running in domU");
+ return ret;
+ }
+
+ // tmp sections
+ list<map<string,any> > tmp_sections = [];
+
+ foreach(map<string,any> sec, BootCommon::sections,
+ {
+ if (sec["type"]:"" != "xen")
+ {
+ tmp_sections = add(tmp_sections, sec);
+
+ } else {
+ // convert XEN section to linux section
+ y2milestone("Converting XEN section in domU: %1", sec);
+ sec["type"] = "image";
+ sec["original_name"] = "linux";
+ if (haskey(sec,"xen"))
+ sec = remove(sec, "xen");
+ if (haskey(sec,"xen_append"))
+ sec = remove(sec, "xen_append");
+ if (haskey(sec,"lines_cache_id"))
+ sec = remove(sec, "lines_cache_id");
+
+ y2milestone("Converted XEN section in domU: %1", sec);
+
+ tmp_sections = add(tmp_sections, sec);
+
+ ret = true;
+ }
+ });
+
+ BootCommon::sections = tmp_sections;
+ return ret;
+}
+
+
} // EOF
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/misc.ycp Tue May 5 15:25:33 2009
@@ -35,11 +35,22 @@
import "Misc";
import "ProductFeatures";
import "Directory";
+ import "Installation";
+ import "FileUtils";
// bootloader attributes handling functions
global map<string, integer> Md2Partitions (string md_device);
global void DetectDisks ();
+ global string getBootPartition();
+ global string DiskOrderSummary ();
+ global list<string> DisksOrder ();
+ global void ProposeDeviceMap ();
+ global boolean DisksChanged ();
+ global define list<string> getPartitionList(symbol type);
+
+ include "bootloader/routines/i386.ycp";
+
/**
* return printable name of bootloader
@@ -697,6 +708,9 @@
boolean ret = false;
if (loader_device == nil)
ret = false;
+ // bnc #180784 don't install to bootloader to floppy if ppc
+ if (getLoaderType (false) == "ppc")
+ ret = false;
else if (loader_device == StorageDevices::FloppyDevice)
ret = true;
else if (contains (getFloppyDevices (), loader_device))
@@ -1013,6 +1027,8 @@
string device_file = mergestring (splitstring (device, "/"), "_");
string device_file_path = "/var/lib/YaST2/backup_boot_sectors/"
+ device_file;
+ string device_file_path_to_logs = "/var/log/YaST2/"
+ + device_file;
SCR::Execute (.target.bash,
"test -d /var/lib/YaST2/backup_boot_sectors || mkdir /var/lib/YaST2/backup_boot_sectors");
if (SCR::Read (.target.size, device_file_path) > 0)
@@ -1037,12 +1053,25 @@
SCR::Execute (.target.bash, sformat (
"/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
device, device_file_path));
+ // save MBR to yast2 log directory
+ SCR::Execute (.target.bash, sformat (
+ "/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
+ device, device_file_path_to_logs));
+
if (device == mbrDisk)
{
SCR::Execute (.target.bash, sformat (
"/bin/dd if=%1 of=%2 bs=512 count=1 2>&1",
device, "/boot/backup_mbr"));
+ // save thinkpad MBR
+ if (ThinkPadMBR(device))
+ {
+ string device_file_path_thinkpad = device_file_path + "thinkpadMBR";
+ y2milestone("Backup thinkpad MBR");
+ SCR::Execute(.target.bash, sformat (
+ "cp %1 %2 2>&1", device_file_path, device_file_path_thinkpad));
+ }
}
}
@@ -1468,6 +1497,17 @@
y2milestone ("Cannot install bootloader on RAID (not mirror)");
return false;
}
+
+ // (bnc 357897) - lilo reports inconsistent raid version when trying to install on raid1
+ if (getLoaderType (false) == "lilo")
+ {
+ string raid_ver = info["sb_ver"]:""; //"00.90.03"
+ if (substring(raid_ver,0,2) == "01")
+ {
+ y2milestone ("Cannot install bootloader on RAID (lilo doesn't support raid version %1)", info["sb_ver"]:"");
+ return false;
+ }
+ }
}
// EVMS
// FIXME: type detection by name deprecated
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/section_widgets.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/section_widgets.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/section_widgets.ycp Tue May 5 15:25:33 2009
@@ -10,6 +10,7 @@
*
* Authors:
* Jiri Srain <jsrain(a)suse.cz>
+ * Olaf Dabrunz <od(a)suse.de>
*
* $Id$
*
@@ -27,6 +28,7 @@
import "Storage";
import "StorageDevices";
import "TablePopup";
+import "Popup";
include "bootloader/routines/helps.ycp";
@@ -316,14 +318,20 @@
else
{
BootCommon::current_section["name"] = "";
- BootCommon::current_section["original_name"] = "";
+ // FIXME: the problem with missing YaST commnet in menu.lst
+ // it seems be correct if original_name stay same...
+ // BootCommon::current_section["original_name"] = "";
BootCommon::current_section["__auto"] = false;
- BootCommon::current_section["lines_cache_id"] = "";
+ // fix for problem with cloning section
+ if (haskey(BootCommon::current_section,"lines_cache_id"))
+ BootCommon::current_section = remove(BootCommon::current_section, "lines_cache_id");
}
y2milestone ("Added section template: %1", BootCommon::current_section);
return nil;
}
+
+
/**
* Cache for CommonSectionWidgets
*/
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/switcher.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/switcher.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/switcher.ycp Tue May 5 15:25:33 2009
@@ -10,6 +10,7 @@
*
* Authors:
* Jiri Srain <jsrain(a)suse.cz>
+ * Olaf Dabrunz <od(a)suse.de>
*
* $Id$
*
@@ -79,10 +80,10 @@
* @param reread boolean true to force rereading the settings from the disk
* @return boolean true on success
*/
-global define boolean blRead (boolean reread) ``{
+global define boolean blRead (boolean reread, boolean avoid_reading_device_map) ``{
map functions = getFunctions (BootCommon::getLoaderType (false));
- boolean(boolean) toEval = functions["read"]:BootCommon::Read;
- return toEval (reread);
+ boolean(boolean, boolean) toEval = functions["read"]:BootCommon::Read;
+ return toEval (reread, avoid_reading_device_map);
}
/**
@@ -190,5 +191,19 @@
return $[];
}
+/**
+ * Set section to boot on next reboot for this type of bootloader
+ * @param section string section to boot
+ * @return boolean true on success
+ */
+global boolean blFlagOnetimeBoot (string section) {
+ map functions = getFunctions (BootCommon::getLoaderType (false));
+ boolean(string) toEval = (boolean(string)) functions["flagonetimeboot"]:nil;
+ if (toEval != nil)
+ return toEval (section);
+ else
+ return false;
+}
+
} // EOF
Modified: branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/bootlo…
==============================================================================
--- branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/wizards.ycp (original)
+++ branches/SuSE-SLE-10-SP3-Branch/bootloader/src/routines/wizards.ycp Tue May 5 15:25:33 2009
@@ -22,6 +22,7 @@
import "Sequencer";
import "Wizard";
import "Report";
+import "Popup";
include "bootloader/routines/dialogs.ycp";
include "bootloader/generic/wizards.ycp";
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0

[yast-commit] r57069 - /trunk/storage/libstorage/src/DmraidCo.cc
by aschnell@svn.opensuse.org 05 May '09
by aschnell@svn.opensuse.org 05 May '09
05 May '09
Author: aschnell
Date: Tue May 5 14:59:09 2009
New Revision: 57069
URL: http://svn.opensuse.org/viewcvs/yast?rev=57069&view=rev
Log:
- added comment
Modified:
trunk/storage/libstorage/src/DmraidCo.cc
Modified: trunk/storage/libstorage/src/DmraidCo.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmraidCo.…
==============================================================================
--- trunk/storage/libstorage/src/DmraidCo.cc (original)
+++ trunk/storage/libstorage/src/DmraidCo.cc Tue May 5 14:59:09 2009
@@ -119,6 +119,7 @@
if( val )
{
Dm::activate(true);
+ // option '-p' since udev creates the partition nodes
c.execute(DMRAIDBIN " -ay -p");
}
else
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0

[yast-commit] r57068 - in /trunk/yast2: package/yast2.changes scripts/save_y2logs
by jsrain@svn.opensuse.org 05 May '09
by jsrain@svn.opensuse.org 05 May '09
05 May '09
Author: jsrain
Date: Tue May 5 14:22:54 2009
New Revision: 57068
URL: http://svn.opensuse.org/viewcvs/yast?rev=57068&view=rev
Log:
remove all passwords from install.inf in save_y2log (bnc#500130)
Modified:
trunk/yast2/package/yast2.changes
trunk/yast2/scripts/save_y2logs
Modified: trunk/yast2/package/yast2.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/package/yast2.changes?rev=…
==============================================================================
--- trunk/yast2/package/yast2.changes (original)
+++ trunk/yast2/package/yast2.changes Tue May 5 14:22:54 2009
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Tue May 5 14:18:28 CEST 2009 - jsrain(a)suse.cz
+
+- remove all passwords from install.inf in save_y2log (bnc#500130)
+
+-------------------------------------------------------------------
Wed Apr 29 09:15:49 CEST 2009 - lslezak(a)suse.cz
- media change popup - display also the URL in the short summary
Modified: trunk/yast2/scripts/save_y2logs
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/scripts/save_y2logs?rev=57…
==============================================================================
--- trunk/yast2/scripts/save_y2logs (original)
+++ trunk/yast2/scripts/save_y2logs Tue May 5 14:22:54 2009
@@ -42,7 +42,7 @@
exit 4
esac
-
+TMPDIR=`mktemp -d` || ( echo "FATAL: Failed to create a temporary directory"; exit 5 );
LIST=YaST2
if [ -f /var/log/evms-engine.log ]; then
@@ -54,7 +54,8 @@
fi
if [ -f /etc/install.inf ]; then
- LIST="$LIST /etc/install.inf"
+ sed 's/\(^WlanESSID: \|^WlanKey: \|^RootPassword: \|^VNCPassword: \|^Password: \).*$/\1XXXXXX/' </etc/install.inf >$TMPDIR/install.inf
+ LIST="$LIST $TMPDIR/install.inf"
fi
if [ -f /etc/X11/xorg.conf ]; then
@@ -84,7 +85,7 @@
echo "Saving y2logs to $TARGET"
-tar cf "$TARGET" $COMPRESSION --directory=/var/log $LIST && exit 0
+tar cf "$TARGET" $COMPRESSION --directory=/var/log $LIST && rm -rf $TMPDIR && exit 0
echo "FATAL: Error creating archive $TARGET" >&2
exit 2
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0

05 May '09
Author: ug
Date: Tue May 5 12:51:18 2009
New Revision: 57067
URL: http://svn.opensuse.org/viewcvs/yast?rev=57067&view=rev
Log:
Created tag stable-2_18_3 for autoinstallation
Added:
tags/stable-2_18_3/autoinstallation/
- copied from r57066, trunk/autoinstallation/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0