aboutsummaryrefslogtreecommitdiffstats
path: root/Tools/portbuild
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2004-09-27 05:59:48 +0800
committerkris <kris@FreeBSD.org>2004-09-27 05:59:48 +0800
commit3fb75c9125364188346fedb76075aff83a88ea5d (patch)
tree54c0fc17da770ff57bfd23ba7a71d84e9daf0809 /Tools/portbuild
parent66b36761402ec5512caa47f691c08709231ab970 (diff)
downloadfreebsd-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-xTools/portbuild/scripts/clean-chroot5
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