On Thu, Dec 16, 2010 at 06:14:55PM +0100, Jakub Wilk wrote: > * Matthew Palmer <mpal...@debian.org>, 2010-12-15, 14:21: >> + if mount |grep -q $(readlink -f $BUILDPLACE)/; then > > I think > > grep -q -F " $(readlink -f $BUILDPLACE)/" > > would be more robust.
Right you are. Patch 5 in a series: >From 56adfe0b23582651f3443f6c15214474d8e4702e Mon Sep 17 00:00:00 2001 From: Matt Palmer <mpal...@hezmatt.org> Date: Fri, 17 Dec 2010 18:43:38 +1100 Subject: [PATCH] Robustify the 'is anything mounted' check --- pbuilder-modules | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pbuilder-modules b/pbuilder-modules index 16e0714..886ae93 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -317,7 +317,7 @@ function cleanbuildplace () { # The readlink -f is a simple way to canonicalize the path for # $BUILDPLACE (no dirty double slashes for *us*), so it matches # what will be in the output of mount. - if mount |grep -q $(readlink -f $BUILDPLACE)/; then + if mount |grep -q -F " $(readlink -f $BUILDPLACE)/"; then log "E: Something is still mounted under ${BUILDPLACE}; unmount and remove ${BUILDPLACE} manually" else log "I: cleaning the build env " -- 1.5.6.5 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org