summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2004-09-26 21:59:48 +0000
committerkris <kris@FreeBSD.org>2004-09-26 21:59:48 +0000
commit3fb75c9125364188346fedb76075aff83a88ea5d (patch)
tree54c0fc17da770ff57bfd23ba7a71d84e9daf0809 /Tools
parent66b36761402ec5512caa47f691c08709231ab970 (diff)
downloadFreeBSD-ports-3fb75c9125364188346fedb76075aff83a88ea5d.zip
FreeBSD-ports-3fb75c9125364188346fedb76075aff83a88ea5d.tar.gz
Refuse to "clean" / if something goes wrong upstream and we are passed
the wrong path Approved by: portmgr (self)
Diffstat (limited to 'Tools')
-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 196dc37..a756ac3 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
OpenPOWER on IntegriCloud