From 4c4802680158c1a291a089ad00fbc957e1fe71a0 Mon Sep 17 00:00:00 2001 From: lissav Date: Tue, 25 Mar 2014 08:09:50 -0400 Subject: [PATCH] defect 3941 --- xCAT-server/lib/xcat/plugins/destiny.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index d4c290b9d..64958a9c6 100755 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -285,6 +285,23 @@ 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