[yast-commit] r52805 - in /trunk/installation: VERSION package/yast2-installation.changes src/include/inst_inc_first.ycp
Author: locilka Date: Fri Oct 31 16:33:57 2008 New Revision: 52805 URL: http://svn.opensuse.org/viewcvs/yast?rev=52805&view=rev Log: - Fixed checking whether running the second stage is required. - Added writing 'SecondStageRequired' 0/1 to /etc/install.inf (both bnc #439572) - 2.17.24 Modified: trunk/installation/VERSION trunk/installation/package/yast2-installation.changes trunk/installation/src/include/inst_inc_first.ycp Modified: trunk/installation/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/VERSION?rev=52805&r1=52804&r2=52805&view=diff ============================================================================== --- trunk/installation/VERSION (original) +++ trunk/installation/VERSION Fri Oct 31 16:33:57 2008 @@ -1 +1 @@ -2.17.23 +2.17.24 Modified: trunk/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=52805&r1=52804&r2=52805&view=diff ============================================================================== --- trunk/installation/package/yast2-installation.changes (original) +++ trunk/installation/package/yast2-installation.changes Fri Oct 31 16:33:57 2008 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Fri Oct 31 16:28:23 CET 2008 - locilka@suse.cz + +- Fixed checking whether running the second stage is required. +- Added writing 'SecondStageRequired' 0/1 to /etc/install.inf + (both bnc #439572) +- 2.17.24 + +------------------------------------------------------------------- Thu Oct 30 14:42:15 CET 2008 - locilka@suse.cz - Saving sources at the end of inst_extrasources if some were Modified: trunk/installation/src/include/inst_inc_first.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/include/inst_inc_first.ycp?rev=52805&r1=52804&r2=52805&view=diff ============================================================================== --- trunk/installation/src/include/inst_inc_first.ycp (original) +++ trunk/installation/src/include/inst_inc_first.ycp Fri Oct 31 16:33:57 2008 @@ -147,21 +147,33 @@ } } + /** + * Writes to /etc/install.inf whether running the second stage is required + * This is written to inst-sys and not copied to the installed system + * (which is already umounted in that time). + * + * @see BNC #439572 + */ + void WriteSecondStageRequired (boolean scst_required) { + // writes 'SecondStageRequired' '1' or '0' + // if such tag exists, it is removed before + WFM::Execute (.local.bash, sformat ( + "sed --in-place 's/^%1: .*//' %3; echo '%1: %2' >> %3", + "SecondStageRequired", + (scst_required == false ? "0":"1"), + "/etc/install.inf" + )); + Linuxrc::ResetInstallInf(); + } + void HandleSecondStageRequired () { if (Stage::initial()) { // the current one is 'initial' + // after reboot/kexec it would be 'continue' string stage_to_check = "continue"; - // matching the control file - string mode_to_check = "unknown"; - - if (Mode::live_installation()) { - mode_to_check = "live_installation"; - } else if (Mode::installation()) { - mode_to_check = "installation"; - } else if (Mode::autoinst()) { - mode_to_check = "autoinstallation"; - } + // for matching the control file + string mode_to_check = Mode::mode(); // file name string run_yast_at_boot = sformat ("%1/%2", Installation::destdir, Installation::run_yast_at_boot); @@ -171,9 +183,11 @@ if (ProductControl::RunRequired (stage_to_check, mode_to_check)) { y2milestone ("Running the second stage is required"); WFM::Write (.local.string, run_yast_at_boot, ""); + WriteSecondStageRequired (true); } else { y2milestone ("It is not required to run the second stage"); WFM::Execute (.local.remove, run_yast_at_boot); + WriteSecondStageRequired (false); } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org