From e6ea6af7e090507d8e531837b45a9509b7f71a95 Mon Sep 17 00:00:00 2001
From: daniceexi <daniceexi@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
Date: Wed, 24 Feb 2010 07:52:17 +0000
Subject: [PATCH] defect 2948360: use subroutine getInstallDir to get the
 install dir

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5269 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
---
 xCAT-server/lib/xcat/plugins/prescripts.pm | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/xCAT-server/lib/xcat/plugins/prescripts.pm b/xCAT-server/lib/xcat/plugins/prescripts.pm
index dbbb930f5..5fd458c86 100644
--- a/xCAT-server/lib/xcat/plugins/prescripts.pm
+++ b/xCAT-server/lib/xcat/plugins/prescripts.pm
@@ -151,12 +151,7 @@ sub runbeginpre
     my $args     = $request->{arg};
     my $action=$args->[0];
     my $localhostname=hostname();
-    my $installdir = "/install";    # default
-    my @installdir1 = xCAT::Utils->get_site_attribute("installdir");
-    if ($installdir1[0])
-    {
-	$installdir = $installdir1[0];    
-    }
+    my $installdir = xCAT::Utils->getInstallDir();
  
     my %script_hash=getprescripts($nodes, $action, "begin");
     foreach my $scripts (keys %script_hash) {
@@ -202,12 +197,7 @@ sub runendpre
     my $args= $request->{arg};
     my $action=$args->[0];
     my $localhostname=hostname();
-    my $installdir = "/install";    # default
-    my @installdir1 = xCAT::Utils->get_site_attribute("installdir");
-    if ($installdir1[0])
-    {
-	$installdir = $installdir1[0];    
-    }
+    my $installdir = xCAT::Utils->getInstallDir();
 
     my %script_hash=getprescripts($nodes, $action, "end");
     foreach my $scripts (keys %script_hash) {