From 4c88b1b469f29ca0c1754d8f26823be63ec6b6e8 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 25 Mar 2014 08:11:11 -0400 Subject: [PATCH] defect 3941 --- xCAT-server/lib/xcat/plugins/destiny.pm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index 89203982b..857112d8a 100755 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -284,8 +284,22 @@ sub setdestiny { } } } - - + #if the postscripts directory exists then make sure it is + # world readable and executable by root; otherwise wget fails + my $installdir = xCAT::TableUtils->getInstallDir(); + my $postscripts = "$installdir/postscripts"; + if (-e $postscripts) + { + my $cmd = "chmod -R a+r $postscripts"; + xCAT::Utils->runcmd($cmd, 0); + my $rsp = {}; + if ($::RUNCMD_RC != 0) + { + $callback->({info=>"$cmd failed"}); + + } + + } #print Dumper($req); # if precreatemypostscripts=1, create each mypostscript for each node # otherwise, create it during installation /updatenode