Re: Bourne shell assistance needed for Bug #422909
* From: Roger Leigh
* Date: Wed, 09 May 2007 22:48:49 +0100
> Hi folks,
> # Unmount all filesystem under specified location
> # $1: mount base location
> "$LIBEXEC_DIR/schroot-listmounts" -m "$1" |
> while read mountloc; do
> if [ "$AUTH_VERBOSITY" = "verbose" ]; then
> echo "Unmounting $mountloc"
> umount "$mountloc" || exit 1
> done || exit 1
> The problem here is that if schroot-listmounts segfaults (the trigger
> in this case) or returns an error,
1) Note, that `while' runs in the sub-shell (make sure to understand this)
2) Pipe is cause of wrong assumption. Little stick -- huge impact.
Thus, here it is:
Here Bourne shell version is most convenient, don't try to
use/understand POSIX shell version ;)
UNIX Power Tools (18.104.22.168 More Elaborate Combinations)
Compare that to historical perspective.
Thus, without bashizms yet!
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact email@example.com