On Tue, May 05, 2015 at 10:48:37AM +0200, Thomas Goirand wrote: > > > On 05/04/2015 10:39 PM, Scott Moser wrote: > >On Mon, 4 May 2015, Antonio Terceiro wrote: > > > >>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. > > > >I think its not supported in the static busybox that is in debian > >initramfs. > > > >Not sure, but I think that was the problem. > > Scott, you are correct, the issue is in early boot using busybox within the > initramfs.
There is something weird, then. I have just tested that same script against the busybox `sh` from busybox-static on wheezy, jessie and sid and they all worked just fine. ----------------8<----------------8<----------------8<----------------- $ cat /tmp/test #!/bin/sh cleanup() { echo "exiting ..." } trap cleanup EXIT $ for release in wheezy jessie sid; do echo $release; echo $release | sed -e 's/./-'/g; echo; schroot -c $release -u root -- bash -x -c 'apt-get install -qy busybox-static >/dev/null 2>&1 && busybox sh -x /tmp/test'; echo; done wheezy ------ + apt-get install -qy busybox-static + busybox sh -x /tmp/test + trap cleanup EXIT + cleanup + echo exiting ... exiting ... jessie ------ + apt-get install -qy busybox-static + busybox sh -x /tmp/test + trap cleanup EXIT + cleanup + echo exiting ... exiting ... sid --- + apt-get install -qy busybox-static + busybox sh -x /tmp/test + trap cleanup EXIT + cleanup + echo exiting ... exiting ... $ ----------------8<----------------8<----------------8<----------------- > > I'm ok with having the issue fixed in Stretch for adding support for EXIT in > busybox, but as you know, it will be a lot more difficult to fix the issue > in Jessie and Wheezy, so I think it's better to just keep the patch to not > use EXIT. > > What's the problem for applying the patch upstream? Don't you think that > other distribution may as well have the issue? Shouldn't we just try to stay > on the safe side here? > > Cheers, > > Thomas Goirand (zigo) > > > -- > To UNSUBSCRIBE, email to debian-cloud-requ...@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org > Archive: https://lists.debian.org/554883e5.6060...@goirand.fr > -- Antonio Terceiro <terce...@debian.org>
signature.asc
Description: Digital signature