Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ROOT=/mnt/sdc6/TazPup
- declare -a dirs_to_clean=\
- ( "/etc" "/DEBIAN" "/bin" "/etc" "/lib" "/lib64" \
- "/opt" "/root" "/sbin" "/var" "/usr" "/var" \
- )
- while read line; do
- umount -l "$line"
- rmdir $line
- done < <( mount | grep "$ROOT" | grep -v '/TazPup/Full' | sed -n -E 's/^.*[ ]([^ ]*\/TazPup[^ ]*)[ ].*$/\1/p' )
- if [ ${#ROOT} -lt 2 ]; then
- exit
- fi
- for DIR in ${dirs_to_clean[@]}; do
- rm -rf $ROOT$DIR
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement