post_thaw script (File System)

#!/bin/sh
#post-thaw-script
date >> '/tmp/post_root.log'
echo -e "\n Attempting to run post-thaw script for File System as root user\n" >> /tmp/post_root.log
if [ "$(id -u)" -eq "0" ]; then
#### Repeate below code for multiple mount points ###
fsfreeze -u <MOUNT POINT>
if [ $? -ne 0 ]
then
  date >> '/tmp/post_root.log'
  echo -e "\n Unable to unquiesce File System\n" >> /tmp/post_root.log
  exit 1
fi
date >> '/tmp/post_root.log'
echo -e "\n File System is unquiesce now\n" >> /tmp/post_root.log
#####################################################
else
date >> '/tmp/post_root.log'
echo -e "not root user\n" >> '/tmp/post_root.log'
fi

Loading...