From 57a1bd5b9df69ee3c8ad43673463257a183cf500 Mon Sep 17 00:00:00 2001 From: nott Date: Fri, 3 Apr 2009 16:08:31 +0000 Subject: [PATCH] export /install/postscrpts git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3081 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xCAT-server/sbin/xcatconfig b/xCAT-server/sbin/xcatconfig index 70931ee17..e16af244f 100644 --- a/xCAT-server/sbin/xcatconfig +++ b/xCAT-server/sbin/xcatconfig @@ -1106,11 +1106,25 @@ if ($::RUNCMD_RC != 0) } # for AIX systems add xcatd to the /etc/inittab file +# and add /install/postscripts to /etc/exports if ($::osname eq 'AIX') { my $mkitab_cmd = 'mkitab "xcatd:2:once:/opt/xcat/sbin/xcatd > /dev/console 2>&1" > /dev/null 2>&1'; my $rc = system($mkitab_cmd); + + # check if /install/postscripts is in /etc/exports + my $catcmd = "/bin/cat /etc/exports | grep '/install/postscripts '"; + my $outref = xCAT::Utils->runcmd("$catcmd", -1); + if ($::RUNCMD_RC != 0) + { + # if not add it and make sure it is exported + my $ecmd = "echo '/install/postscripts -ro' >> /etc/exports; exportfs -a"; + my $outref2 = xCAT::Utils->runcmd("$ecmd", -1); + if ($::RUNCMD_RC != 0) { + xCAT::MsgUtils->message('E', "Could not update the /etc/exports file.\n"); + } + } } # more - Linux-only config