From 4174cbdd65636c508d7b237b35552fb4603923cf Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 15 Dec 2011 18:59:47 +0000 Subject: [PATCH] fix defect 3460126 changes permission on /install/postscripts to 0700 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@11254 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/servicenode | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/servicenode b/xCAT/postscripts/servicenode index 9280fa5f5..38ce3a48e 100755 --- a/xCAT/postscripts/servicenode +++ b/xCAT/postscripts/servicenode @@ -33,6 +33,7 @@ if ($^O =~ /^aix/i) { use lib "$::XCATROOT/lib/perl"; use strict; +use xCAT::Utils; # MAIN use IO::Socket; @@ -72,10 +73,13 @@ if ($ENV{UPDATESECURITY} && $ENV{UPDATESECURITY} eq "1") { exit 0; } - # copy the postscripts to /install/postscripts - if (&runcmd("mkdir -p $installdir/postscripts; cp -p -R /xcatpost/* $installdir/postscripts > /dev/null 2>&1") != 0 ) { + # copy the postscripts to /install/postscripts, if not mounted + my $mounted = xCAT::Utils->isMounted($installdir); + if ($mounted == 0) { # not mounted + if (&runcmd("mkdir -p $installdir/postscripts; cp -p -R /xcatpost/* $installdir/postscripts > /dev/null 2>&1") != 0 ) { $msg = "$::sdate servicenode: Could not copy postscripts to $installdir/postscripts.\n"; `logger -t xcat $msg`; + } } # copy the certificates