Skip to content

Commit

Permalink
Merge pull request #27 from yast/bug_930950
Browse files Browse the repository at this point in the history
Bug 930950
  • Loading branch information
schubi2 committed May 21, 2015
2 parents ab8c6f7 + 3ea25dd commit 85f534a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.17.26
2.17.27
7 changes: 7 additions & 0 deletions package/yast2-kdump.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed May 20 16:38:09 CEST 2015 - schubi@suse.de

- Autoyast: "add_crashkernel_param" will be set by using autoinst.xml
and will not be overwritten by proposal. (bnc#930950)
- 2.17.27

-------------------------------------------------------------------
Wed May 8 15:50:29 CEST 2013 - snwint@suse.de

Expand Down
31 changes: 21 additions & 10 deletions src/Kdump.ycp
Expand Up @@ -1177,6 +1177,18 @@ define void AddPackages()
}
}


define boolean ProposeCrashkernelParam()
{
ReadAvailableMemory();
# propose disable kdump if PC has less than 1024MB RAM
if (total_memory < 1024)
return false;
else
return true;
}


/**
* Propose global variables once...
* after that remember user settings
Expand All @@ -1186,15 +1198,14 @@ define void ProposeGlobalVars()
{
if (!propose_called)
{
// propose disable kdump if PC has less than 1024MB RAM
if (total_memory < 1024)
add_crashkernel_param = false;
else
add_crashkernel_param = true;

crashkernel_param = false;
// added defualt settings
KDUMP_SETTINGS = DEFAULT_CONFIG;
# Autoyast: "add_crashkernel_param" will be set by using autoinst.xml
# (bnc#930950)
if (!Mode::autoinst())
add_crashkernel_param = ProposeCrashkernelParam();

crashkernel_param = false;
// added defualt settings
KDUMP_SETTINGS = DEFAULT_CONFIG;
}
propose_called = true;
}
Expand Down Expand Up @@ -1301,7 +1312,7 @@ global define boolean Import (map settings)
{
y2milestone("Importing settings for kdump");
crashkernel_param_value = settings["crash_kernel"]:"";
add_crashkernel_param = settings["add_crash_kernel"]:false;
add_crashkernel_param = settings["add_crash_kernel"]:ProposeCrashkernelParam();
boolean result = true;
map <string, string > my_import_map = settings["general"]:$[];
foreach (any key, Map::Keys(DEFAULT_CONFIG),
Expand Down

0 comments on commit 85f534a

Please sign in to comment.