Skip to content

Commit

Permalink
suppress memory warning if live installer is running directly from bo…
Browse files Browse the repository at this point in the history
…ot scripts (bnc#547743)

svn path=/trunk/live-installer/; revision=62867
  • Loading branch information
jsrain committed Nov 18, 2010
1 parent 3fdce13 commit eaadae2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions package/yast2-live-installer.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Nov 18 13:12:37 UTC 2010 - jsrain@suse.cz

- suppress memory warning if live installer is running directly
from boot scripts (bnc#547743)

-------------------------------------------------------------------
Tue Oct 12 13:32:37 UTC 2010 - lslezak@suse.cz

Expand Down
8 changes: 6 additions & 2 deletions src/live-installer.ycp
Expand Up @@ -35,7 +35,11 @@
integer memsize = memories[0,"resource","phys_mem",0,"range"]:0;
integer oneGB = 1073741824;
y2milestone ("Physical memory %1", memsize);
if (memsize < oneGB) {

string cmd = "cat /proc/cmdline | grep -q liveinstall";
boolean live_only = (0 == (integer)SCR::Execute (.target.bash, cmd));

if (memsize < oneGB && ! live_only) {
// pop-up, %1 is memory size, currently hardcoded "1 GB"
if (! Popup::ContinueCancel (sformat (_("Your computer has less than %1 of memory. This may not be
sufficient for the live installation, especially when installing
Expand Down Expand Up @@ -72,7 +76,7 @@ Before continuing, finish all running applications."), "1 GB")))
// detect removable media, if they are mounted, they cannot be used for installation (bnc #437235)
// this is a hack, since partitioner cannot provide information which partitions will be resized,
// removed or formatted and thus mustn't be mounted during installation
string cmd = "cat /proc/mounts |grep '\/media\/'";
cmd = "cat /proc/mounts |grep '\/media\/'";
if (0 == (integer)SCR::Execute (.target.bash, cmd))
{
// continue/cancel pop-up
Expand Down

0 comments on commit eaadae2

Please sign in to comment.