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
|
2010-04-08 10:06:55 +00:00
|
|
|
echo " Did not sync any files."
|
2009-07-29 21:25:59 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
#do nothing id there is no sync file template for the node
|
|
|
|
if [[ $NOSYNCFILES -eq 1 ]]; then
|
2010-04-08 10:06:55 +00:00
|
|
|
echo " Did not sync any files."
|
2010-04-06 08:17:04 +00:00
|
|
|
logger -t xCAT "$0: there is no sync file template for the node"
|
2009-07-29 21:25:59 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
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
|
|
|
|
2010-04-06 08:17:04 +00:00
|
|
|
logger -t xCAT "$0: the OS name = $osname"
|
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
|
2010-04-06 08:17:04 +00:00
|
|
|
logger -t xCAT "$0: Perform Syncing File action successfully"
|
2009-07-15 13:08:51 +00:00
|
|
|
else
|
2010-04-06 08:17:04 +00:00
|
|
|
logger -t xCAT "$0: 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
|
2010-03-31 06:35:27 +00:00
|
|
|
|