[Buildd-tools-devel] Bug#422909: Bourne shell assistance needed for Bug #422909

Stephen Gran sgran at debian.org
Wed May 9 23:23:08 UTC 2007


This one time, at band camp, Roger Leigh said:
> How can I rewrite the while loop securely (and preferably avoiding
> tmpfiles), such that any bad exit status or failure will result in
> immediate termination of the script with an error status?

Wrap your calls of do_umount_all in if blocks:
if do_umount_all "$CHROOT_MOUNT_LOCATION"; then
  exit 1
fi

And so on.
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran at debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20070510/8cbd7ba9/attachment.pgp


More information about the Buildd-tools-devel mailing list