#!/bin/bash # # Copyright (C) 2007-2009 Eric Shubert # # Unmount a sandbox that uses union file-system # ################################################################### # change log # ---------- # 08/14/09 shubes - changed $UNIONROOT to $OVERLAY # 04/20/08 shubes - kill whatever processes are using the sandbox # (possibly freshclam, minilogd) before umounting. # Thanks to Kent Busbee # for this tip. # 03/22/07 shubes - created # thanks to Justice London # for pioneering unionfs usage with qtp-newmodel! ################################################################### ## check and set up the environment # a1_initialization(){ # Make sure we're root if [ "$UID" != "0" ]; then echo "$me: Error: You are not root, please su -" exit 1 fi echo "$me $myver" #Bring in necessarily variables and functions from qtp-config . qtp-config -s } ################################################################### ## unmount the sandbox # a5_unmount_sandbox(){ # kill any processes that are still using the sandbox fuser -s -k $SANDBOX umount $SANDBOX/sys 2>/dev/null umount $SANDBOX/proc 2>/dev/null sort -r