diff options
author | kris <kris@FreeBSD.org> | 2004-09-27 05:59:48 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2004-09-27 05:59:48 +0800 |
commit | 3fb75c9125364188346fedb76075aff83a88ea5d (patch) | |
tree | 54c0fc17da770ff57bfd23ba7a71d84e9daf0809 /Tools/portbuild | |
parent | 66b36761402ec5512caa47f691c08709231ab970 (diff) | |
download | freebsd-ports-graphics-3fb75c9125364188346fedb76075aff83a88ea5d.tar.gz freebsd-ports-graphics-3fb75c9125364188346fedb76075aff83a88ea5d.tar.zst freebsd-ports-graphics-3fb75c9125364188346fedb76075aff83a88ea5d.zip |
Refuse to "clean" / if something goes wrong upstream and we are passed
the wrong path
Approved by: portmgr (self)
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-x | Tools/portbuild/scripts/clean-chroot | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/clean-chroot b/Tools/portbuild/scripts/clean-chroot index 196dc373a5f..a756ac31265 100755 --- a/Tools/portbuild/scripts/clean-chroot +++ b/Tools/portbuild/scripts/clean-chroot @@ -8,6 +8,11 @@ noclean=$4 # directories to clean cleandirs="/usr/local /usr/X11R6 /compat /var/db/pkg" +if [ `realpath ${chroot}` = "/" ]; then + # Don't spam the root file system if something has gone wrong! + exit 1 +fi + #umount ${chroot}/proc if [ ${arch} = "i386" ]; then |