#!/bin/sh
#
# $Id: mr-unmount-me 3542 2016-03-24 16:48:03Z bruno $
#

mountlist=/tmp/mountlist.txt

if [ "$#" -ne "0" ] ;then
    echo "mr-unmount-me <no params>"
    echo "...mountlist is assumed to be at $mountlist"
    exit 1
fi

for i in `mount | grep /mnt/RESTORING | cut -d' ' -f3 | sort -r`; do
    umount $i
done

for i in `cut -d' ' -f1 /proc/swaps | grep /dev`; do
    swapoff $i
done

exit 0

