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

Re: Bug#783826: cloud-utils growroot doesn't work with newer sfdisk >= 2.26 : fixed patch solution for newer and older sfdisk



On Mon, May 04, 2015 at 12:48:37PM -0400, Scott Moser wrote:
> > Also, what about the do-not-use-EXIT-when-trapping.patch patch which I had to
> > add in Debian? Could you please apply them both?
> 
> EXIT is posix compatible. you really should change the shell to be posix
> compatible rather than changing all programs to expect a subset of poxix
> shell.
>   http://pubs.opengroup.org/onlinepubs/000095399/utilities/trap.html

EXIT is supported by dash ... I have just tested the script below and it
works as expected on all Debian release since at least wheezy.

----------------8<----------------8<----------------8<-----------------
$ cat /tmp/test
#!/bin/sh

cleanup() {
  echo "exiting ..."
}

trap cleanup EXIT
$ for release in wheezy jessie sid; do echo $release; schroot -c $release /tmp/test; done
wheezy
exiting ...
jessie
exiting ...
sid
exiting ...
----------------8<----------------8<----------------8<-----------------

-- 
Antonio Terceiro <terceiro@debian.org>

Attachment: signature.asc
Description: Digital signature


Reply to: