Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54492 - in /trunk/live-installer: package/yast2-live-installer.changes src/live-installer.ycp src/live_runme_at_boot_finish.ycp
  • From: jsrain@xxxxxxxxxxxxxxxx
  • Date: Fri, 09 Jan 2009 10:43:49 -0000
  • Message-id: <E1LLEqD-0007b2-Ld@xxxxxxxxxxxxxxxx>
Author: jsrain
Date: Fri Jan 9 11:43:49 2009
New Revision: 54492

URL: http://svn.opensuse.org/viewcvs/yast?rev=54492&view=rev
Log:
optionally eject CD and reboot after the end of live installation (bnc #455760)


Modified:
trunk/live-installer/package/yast2-live-installer.changes
trunk/live-installer/src/live-installer.ycp
trunk/live-installer/src/live_runme_at_boot_finish.ycp

Modified: trunk/live-installer/package/yast2-live-installer.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/package/yast2-live-installer.changes?rev=54492&r1=54491&r2=54492&view=diff
==============================================================================
--- trunk/live-installer/package/yast2-live-installer.changes (original)
+++ trunk/live-installer/package/yast2-live-installer.changes Fri Jan 9
11:43:49 2009
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Fri Jan 9 11:42:33 CET 2009 - jsrain@xxxxxxx
+
+- optionally eject CD and reboot after the end of live installation
+ (bnc #455760)
+
+-------------------------------------------------------------------
Tue Jan 6 14:41:29 CET 2009 - jsrain@xxxxxxx

- disable all repos before installation, reenable afterwards

Modified: trunk/live-installer/src/live-installer.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/live-installer.ycp?rev=54492&r1=54491&r2=54492&view=diff
==============================================================================
--- trunk/live-installer/src/live-installer.ycp (original)
+++ trunk/live-installer/src/live-installer.ycp Fri Jan 9 11:43:49 2009
@@ -147,6 +147,37 @@
Pkg::TargetFinish();

Storage::SwitchUiAutomounter(true);
+ // handle reboot (bnc #455760)
+ if (ret == `next) {
+ // popup dialog, text followed by 'Reboot Now' and 'Reboot Later'
buttons
+ string msg = _("The computer needs to be rebooted without the Live CD
in the
+drive to finish the installation. Either YaST can reboot
+now or you can reboot any time later.
+
+Note that if the Live CD is not ejected, you can either eject
+it after the Live system shuts down or select \"Hard Disk\"
+in the boot menu of the Live CD.");
+ // push button
+ if (Popup::AnyQuestion(Popup::NoHeadline(), msg, _("Reboot &Now"),
_("Reboot &Later"), `focus_no))
+ {
+ string device = "/dev/sr0";
+ map out = (map)WFM::Execute (.local.bash_output, "cat /proc/mounts
|grep '\/media\/livecd ' | cut -d ' ' -f 1");
+ if (out["exit"]:-1 != 0)
+ y2error ("Failed to detect the device");
+ else
+ device = out["stdout"]:"";
+ y2milestone ("Ejecting device %1", device);
+ string cmd = sformat ("echo s >/proc/sysrq-trigger ; sleep 1 ; echo
u >/proc/sysrq-trigger ; eject %1; sleep 10s; echo b >/proc/sysrq-trigger",
device);
+ UI::OpenDialog (`Label ("Rebooting the system..."));
+ WFM::Execute (.local.bash, cmd);
+ // this should never be reached
+ UI::CloseDialog ();
+ // error report
+ Report::Error (_("Failed to restart the computer.
+Reboot it manually. You may even need to push the
+'Reset' button to restart it."));
+ }
+ }
UI::CloseDialog();

return ret;

Modified: trunk/live-installer/src/live_runme_at_boot_finish.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/live-installer/src/live_runme_at_boot_finish.ycp?rev=54492&r1=54491&r2=54492&view=diff
==============================================================================
--- trunk/live-installer/src/live_runme_at_boot_finish.ycp (original)
+++ trunk/live-installer/src/live_runme_at_boot_finish.ycp Fri Jan 9 11:43:49
2009
@@ -63,12 +63,12 @@
y2error ("Couldn't create target %1",
Installation::file_live_install_mode );
}
// FIXME doesn't belong here
- Misc::boot_msg = _("Reboot the computer without the Live CD in the drive
+ Misc::boot_msg = "";/*_("Reboot the computer without the Live CD in the
drive
to continue the installation.

Note that the CD cannot be ejected now. You can eject
it after the Live system shuts down or by selecting
-\"Hard Disk\" in the boot menu of the Live CD.");
+\"Hard Disk\" in the boot menu of the Live CD.");*/
}
else
{

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages