From: Ian Jackson Subject: Re: [PATCH OSSTEST v7 04/15] distros: Support pvgrub for Wheezy too. Date: Mon, 6 Jul 2015 15:55:10 +0100 Message-ID: <21914.38606.239216.668903@mariner.uk.xensource.com> References: <1432734277.14664.229.camel@citrix.com> <1432734323-14128-4-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1432734323-14128-4-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("[PATCH OSSTEST v7 04/15] distros: Support pvgrub for Wheezy too."): > This requires us to install pv-grub-menu from backports, which we do > using a late_command. Acked-by: Ian Jackson However: > + preseed_hook_command($ho, 'late_command', $sfx, < +#!/bin/sh > +set -ex > + > +( > + echo > + echo \\\# $suite backports > + echo deb http://$c{DebianMirrorHost}/$c{DebianMirrorSubpath} $suite-backports main > +) >> /target/etc/apt/sources.list > +in-target apt-get update > +in-target apt-get install -y -t wheezy-backports pv-grub-menu > +END This way of saying this requires quite a lot of quoting! Have you considered using a nested here document ? In shell you can say <<'END2' or something and the content will not be subject to $-expansion. Ian.