From e743131f1945b137ed6b2e8682ca4077c89ba822 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 24 Apr 2012 11:02:08 +0000 Subject: [PATCH] Added checkpoint/restart script to setup related environment git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12325 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-IBMhpc/share/xcat/IBMhpc/ckpt/ckpt.sh | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 xCAT-IBMhpc/share/xcat/IBMhpc/ckpt/ckpt.sh diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/ckpt/ckpt.sh b/xCAT-IBMhpc/share/xcat/IBMhpc/ckpt/ckpt.sh new file mode 100755 index 000000000..85ea5c062 --- /dev/null +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/ckpt/ckpt.sh @@ -0,0 +1,28 @@ +#! /bin/bash + +# Checkpoint/Restart related environment setup + +# virtualized pts support +rm -f /dev/ptmx +ln -s /dev/pts/ptmx /dev/ptmx +chmod 666 /dev/ptmx + +# unlinked file support +for fs in ext3 ext4 nfs gpfs tmpfs; do + FSROOTS=$(grep " $fs " /proc/mounts | cut -d ' ' -f 2) + if [ "$FSROOTS" ]; then + for rootfs in $FSROOTS; do + if [ -w $rootfs ]; then + CKPTDIR="$rootfs/lost+found" + + [ -e $CKPTDIR ] && [ ! -d $CKPTDIR ] && rm -f $CKPTDIR + + if [ ! -e $CKPTDIR ]; then + mkdir -p $CKPTDIR + [ "$?" -eq "0" ] && echo "made dir $CKPTDIR" + fi + fi + done + fi +done +