mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	Set XCATROOT to default to /usr if no evironment variable and /opt/xcat does not exist
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@258 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -3,7 +3,7 @@ | ||||
| package xCAT::Client; | ||||
| BEGIN | ||||
| { | ||||
|   $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; | ||||
|   $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr'; | ||||
| } | ||||
| use lib "$::XCATROOT/lib/perl"; | ||||
| use xCAT::NodeRange; | ||||
|   | ||||
| @@ -3602,8 +3602,10 @@ sub parse_and_run_dsh | ||||
|     if ($ENV{'XCATROOT'}) | ||||
|     { | ||||
|        $::XCATROOT = $ENV{'XCATROOT'};  # setup xcatroot home directory | ||||
|     } else { | ||||
|     } elsif (-d '/opt/xcat') { | ||||
|        $::XCATROOT = "/opt/xcat"; | ||||
|     } else { | ||||
|        $::XCATROOT = "/usr"; | ||||
|     } | ||||
|      | ||||
|     # parse the arguments | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
| package xCAT::NotifHandler; | ||||
| BEGIN | ||||
| { | ||||
|     $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; | ||||
|     $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr'; | ||||
| } | ||||
| use lib "$::XCATROOT/lib/perl"; | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
| package xCAT::Table; | ||||
| BEGIN | ||||
| { | ||||
|     $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; | ||||
|     $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr'; | ||||
| } | ||||
| use lib "$::XCATROOT/lib/perl"; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user