summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2004-09-26 21:59:48 +0000
committerKris Kennaway <kris@FreeBSD.org>2004-09-26 21:59:48 +0000
commit82cb4888a470ae9f0411fa9ea390b68843ba6547 (patch)
treee2cd60d8e83ed9c74e9a400d879b7ea37207c209 /Tools
parentPull in portbuild.$(hostname) for per-client customization (diff)
Refuse to "clean" / if something goes wrong upstream and we are passed
the wrong path Approved by: portmgr (self)
Notes
Notes: svn path=/head/; revision=118447
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 196dc373a5f3..a756ac31265b 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