From 745cd03e7b9e66ea1dfc0bdc7bf9266e9a7c96da Mon Sep 17 00:00:00 2001 From: nott Date: Thu, 7 Oct 2010 16:38:20 +0000 Subject: [PATCH] use rw as litefile default on AIX git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7778 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/litetree.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/litetree.pm b/xCAT-server/lib/xcat/plugins/litetree.pm index 2b6b8c1b7..14e2808c0 100644 --- a/xCAT-server/lib/xcat/plugins/litetree.pm +++ b/xCAT-server/lib/xcat/plugins/litetree.pm @@ -1,4 +1,11 @@ package xCAT_plugin::litetree; + +BEGIN +{ + $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; +} +use lib "$::XCATROOT/lib/perl"; + use xCAT::NodeRange; use Data::Dumper; use xCAT::Utils; @@ -369,7 +376,14 @@ sub mergeArrays { foreach(@$arr){ next if($_->{file} eq ''); my $o = $_->{options}; - $o = "tempfs" unless ($o); + unless ($o) { + if (xCAT::Utils->isAIX()) { + $o = "rw"; # default option if not provided + } else { + $o = "tempfs"; + } + } + # TODO: put some logic in here to make sure that ro is alone. # if type is ro and con, then this is wrong silly! #if($p eq "ro" and $t eq "con"){