xcat-core/xCAT/postscripts/syncfiles
2009-07-15 13:08:51 +00:00

42 lines
861 B
Bash

#!/bin/sh
# IBM(c) 2009 EPL license http://www.eclipse.org/legal/epl-v10.html
#####################################################
#
# Initiate the xdcp from Mangement node to sync
# files to this node
#
#####################################################
# do nothing when UPDATENODE=1
if [ $UPDATENODE = 1 -o \
$NODESETSTATE = "netboot" -o \
$NODESETSTATE = "diskless" ]
then
exit 0
fi
logger -t xCAT "Performing syncfiles postscript"
osname=`uname`
# run the xdcp on the MN/SN
xcatpostdir="/xcatpost"
if [ $osname = "Linux" ]
then
`$xcatpostdir/startsyncfiles.awk`
returncode=$?
elif [ $osname = "AIX" ]
then
`$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"
fi
exit 0