Commit 3d51e0ac authored by wanghuaz's avatar wanghuaz
Browse files

Fixing bug 3568357: Overwrite the swapnfs tmp file instead of append it.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@13844 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
parent 37d53860
......@@ -6719,7 +6719,7 @@ sub update_dd_boot
if (!$dontupdt4)
{
print DDBOOT "#Write tmp file to create remote paging device\n";
print DDBOOT "echo \"CuDv:\" >> /swapnfs\n";
print DDBOOT "echo \"CuDv:\" > /swapnfs\n";
print DDBOOT "echo \"name = \$SWAPDEV\" >> /swapnfs\n";
print DDBOOT "echo \"status = 0\" >> /swapnfs\n";
print DDBOOT "echo \"chgstatus = 1\" >> /swapnfs\n";
......@@ -6732,6 +6732,10 @@ sub update_dd_boot
$l =~ s/tmp\/swapnfs/swapnfs/g;
print DDBOOT $l;
print DDBOOT "\n rm -f /swapnfs\n";
}
elsif ($l =~ /echo "CuDv:" >> \/swapnfs/ )
{
print DDBOOT "echo \"CuDv:\" > /swapnfs\n";
} else {
if ($l =~ /tmp\/swapnfs/)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment