initial version of scripts, config and debian package
[moebian] / install / umountroot
1 #!/bin/sh
2 # (c) copyright 2010 by Thomas Tanner <tanner@gmx.de>
3
4 test "$#" -eq 0 && echo "$0 destination" && exit 1
5 later=
6 for d in `cat /proc/mounts | grep " $1/" | awk '{ print $2}'`; do
7     case $d in
8     $1/dev/pts|$1/dev/shm|$1/home/user/MyDocs)
9         #echo unmounting $d
10         umount $d
11         ;;
12     *)  later="$later $d" ;;
13     esac
14 done
15 for d in $later; do
16     #echo unmounting $d
17     umount $d
18 done