ns-umount (280B)
1 #!/bin/sh 2 3 if [ $# -lt 1 ]; 4 then 5 printf "usage: %s nsroot\n" "$(basename $0)" >&2 6 exit 1 7 fi 8 9 nsroot="$(ns-root "$1")" 10 [ $? -gt 0 ] && exit $? 11 12 mount | cut -d' ' -f 3 | grep "^${nsroot}" | sort -r \ 13 | while read -r m; 14 do 15 printf "Unmounting '%s'.\n" "$m" 16 umount "$m"; 17 done