Hi Hendrik,

On Mon, Feb 08, 2016 at 08:59:23AM +0100, Hendrik Brueckner wrote:
> is different but I think that it is OK for zipl.  The alternative would be
> something like this:
> 
> =========================================================
> --- a/debian/zipl-installer.postinst
> +++ b/debian/zipl-installer.postinst
> @@ -57,8 +57,18 @@ EOF
>  sed -e 's/^do_bootloader.*$/do_bootloader = yes/' < 
> /target/etc/kernel-img.conf > /target/etc/kernel-img.conf.$$
>  mv /target/etc/kernel-img.conf.$$ /target/etc/kernel-img.conf
>  
> -mount -t proc none /target/proc || true
> +mount -o bind /proc /target/proc || true
> +mount -o bind /sys /target/sys || true
> +mount -o bind /dev /target/dev || true
>  
> -log-output -t zipl-installer chroot /target /sbin/zipl
> +rc=0
> +if ! log-output -t zipl-installer chroot /target /sbin/zipl -V; then
> +       # Unmount the bound file systems before exiting
> +       rc=1
> +fi
>  
> +umount /target/dev || true
> +umount /target/sys || true
>  umount /target/proc || true
> +
> +exit $rc
> =========================================================
> 
> The point here is that if zipl fails, the file systems needs to un-mounted.
> The "set -e" causes the script to end but with the file systems still mounted.
> Because that's exactly what in-target does, I preferred it rather than
> sending the patch above.  I am also fine with the patch above if you like
> that approach more and keep the zipl logging idenntifier.

Let's go with this, that's reasonably straightforward. (Another
alternative might have been a trap, but even that would need a set +e.)

Kind regards and thanks
Philipp Kern

Reply via email to