Creating the umountfs script


#!/bin/sh
# Begin /etc/init.d/umountfs

check_status()
{
  if [ $? = 0 ]
  then
    echo "OK"
  else
    echo "FAILED"
  fi
}
 
echo "Deactivating swap..."
/bin/swapoff -a
check_status

echo -n "Unmounting file systems..."
/bin/umount -a -r 
check_status

# End /etc/init.d/umountfs