From 86acca4d8a6974f894711ae4197c24ee094e20ad Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 4 Jun 2012 18:39:41 +0000 Subject: [PATCH] fix defect 3531962 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13006 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/updatenode.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 4c103a6c3..c6407795b 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -703,6 +703,22 @@ sub updatenode # XXX: Suppose that compute nodes has the same Install dir location. my $installdir = xCAT::Utils->getInstallDir(); + #if the postscripts directory exists then make sure it is + # world readable and executable by root + my $postscripts = "$installdir/postscripts"; + if (-e $postscripts) { + my $cmd="chmod -R u+x,a+r $postscripts"; + xCAT::Utils->runcmd($cmd, 0); + my $rsp = {}; + if ($::RUNCMD_RC != 0) + { + $rsp->{data}->[0] = "$cmd failed.\n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + + } + } + + # convert the hashes back to the way they were passed in my $flatreq = xCAT::InstUtils->restore_request($request, $callback); my $imgdefs;