2009-06-05 13:53:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# IBM(c) 2009 EPL license http://www.eclipse.org/legal/epl-v10.html
|
2009-06-04 15:33:44 +00:00
|
|
|
#####################################################
|
|
|
|
#
|
2009-06-05 13:53:52 +00:00
|
|
|
# Initiate the xdcp from Mangement node to sync
|
|
|
|
# files to this node
|
2009-06-04 15:33:44 +00:00
|
|
|
#
|
|
|
|
#####################################################
|
|
|
|
|
2009-07-29 21:25:59 +00:00
|
|
|
# do nothing when UPDATENODE=1 because it is done from the top down
|
|
|
|
if [[ $UPDATENODE -eq 1 ]]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
#do nothing id there is no sync file template for the node
|
|
|
|
if [[ $NOSYNCFILES -eq 1 ]]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# do nothing for diskless deployment case because it is done in the image already
|
2009-10-06 16:50:40 +00:00
|
|
|
if [ "$NODESETSTATE" = "netboot" -o \
|
|
|
|
"$NODESETSTATE" = "diskless" -o \
|
|
|
|
"$NODESETSTATE" = "dataless" ]
|
2009-06-05 13:53:52 +00:00
|
|
|
then
|
|
|
|
exit 0
|
|
|
|
fi
|
2009-06-04 15:33:44 +00:00
|
|
|
|
2009-07-29 21:25:59 +00:00
|
|
|
|
2009-06-05 13:53:52 +00:00
|
|
|
logger -t xCAT "Performing syncfiles postscript"
|
2009-06-04 15:33:44 +00:00
|
|
|
|
2009-06-05 13:53:52 +00:00
|
|
|
osname=`uname`
|
2009-06-04 15:33:44 +00:00
|
|
|
# run the xdcp on the MN/SN
|
2009-06-05 13:53:52 +00:00
|
|
|
xcatpostdir="/xcatpost"
|
2009-06-04 15:33:44 +00:00
|
|
|
|
2009-07-15 13:08:51 +00:00
|
|
|
if [ $osname = "Linux" ]
|
2009-06-05 13:53:52 +00:00
|
|
|
then
|
2009-07-15 13:08:51 +00:00
|
|
|
`$xcatpostdir/startsyncfiles.awk`
|
|
|
|
returncode=$?
|
|
|
|
elif [ $osname = "AIX" ]
|
2009-06-05 13:53:52 +00:00
|
|
|
then
|
2009-07-15 13:08:51 +00:00
|
|
|
`$xcatpostdir/startsyncfiles.aix`
|
|
|
|
returncode=$?
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $returncode -eq 1 ]
|
|
|
|
then
|
|
|
|
logger -t xCAT "Perform Syncing File action successfully"
|
|
|
|
else
|
|
|
|
logger -t xCAT "Perform Syncing File action encountered error"
|
2009-06-05 13:53:52 +00:00
|
|
|
fi
|
2009-06-04 15:33:44 +00:00
|
|
|
|
2009-06-05 13:53:52 +00:00
|
|
|
exit 0
|