[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#422909: Bourne shell assistance needed for Bug #422909

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

And so on.
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran@debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |

Attachment: signature.asc
Description: Digital signature

Reply to: