new logic to get xcataixpost to the node
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14549 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
68d1067b9c
commit
320eea1c75
@ -57,9 +57,16 @@ unless ($useSocketSSL) {
|
||||
# Process the command line...
|
||||
#
|
||||
# the -c means redo the copy of scripts from the server
|
||||
my $idir;
|
||||
my $nfsv4;
|
||||
Getopt::Long::Configure("no_pass_through");
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
if (!GetOptions('copy|c' => \$::opt_c, 'm=s' => \$::opt_m, 'M=s' => \$::opt_M, 'tftp=s'=> \$::opt_tftpdir))
|
||||
if (!GetOptions('copy|c' => \$::opt_c,
|
||||
'm=s' => \$::opt_m,
|
||||
'M=s' => \$::opt_M,
|
||||
'tftp=s'=> \$::opt_tftpdir,
|
||||
'installdir=s'=> \$idir,
|
||||
'nfsv4=s'=> \$nfsv4))
|
||||
{ # Gather options
|
||||
exit 1;
|
||||
}
|
||||
|
@ -122,19 +122,6 @@ pmatch ()
|
||||
|
||||
return 1 # non-zero return code means string not matched by pattern
|
||||
}
|
||||
# check if on AIX node
|
||||
if [ ! `uname` = Linux ]; then
|
||||
# if we don't have xcataixpost on the node, get it
|
||||
#if [ ! -f /xcatpost/xcataixpost ]; then
|
||||
# if [ ! -d /xcatpost ]; then
|
||||
# mkdir -p /xcatpost;
|
||||
# fi
|
||||
#fi
|
||||
logger -t xCAT -p local4.err "Running xcataixpost $*";
|
||||
MYDIR=`dirname $0`
|
||||
exec $MYDIR/xcataixpost $*
|
||||
exit
|
||||
fi
|
||||
# parse the arguments
|
||||
ARGNUM=$#;
|
||||
if [ -z $1 ]; then
|
||||
@ -162,11 +149,38 @@ else
|
||||
TFTPDIR=$6
|
||||
fi
|
||||
fi
|
||||
if [ $ARGNUM -gt 5 ]; then
|
||||
if [ $7 = "--installdir" ]; then
|
||||
INSTALLDIR=$8
|
||||
fi
|
||||
fi
|
||||
if [ $ARGNUM -gt 6 ]; then
|
||||
if [ $9 = "--nfsv4" ]; then
|
||||
NFSV4=$10
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
3|4|6) MODE=$1;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# If on AIX node
|
||||
if [ ! `uname` = Linux ]; then
|
||||
#Get a new copy of xcataixpost on the node
|
||||
mkdir -p /xcatpost;
|
||||
mkdir -p /xcatmnt;
|
||||
if [ "$NFSV4" = "yes" ]; then
|
||||
mount -o vers=4 $P_SIP:$INSTALLDIR/postscripts /xcatmnt
|
||||
else
|
||||
mount $P_SIP:$INSTALLDIR/postscripts /xcatmnt
|
||||
fi
|
||||
cp /xcatmnt/xcataixpost /xcatpost
|
||||
umount /xcatmnt
|
||||
rmdir /xcatmnt
|
||||
logger -t xCAT -p local4.err "Running xcataixpost $*";
|
||||
exec /xcatpost/xcataixpost $*
|
||||
exit
|
||||
fi
|
||||
|
||||
#SLI=$(awk 'BEGIN{srand(); printf("%d\n",rand()*10)}')
|
||||
#sleep $SLI
|
||||
|
Loading…
Reference in New Issue
Block a user