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

Re: [Xen-devel] [PATCH OSSTEST v7 04/15] distros: Support pvgrub for Wheezy too.



On Mon, 2015-07-06 at 15:55 +0100, Ian Jackson wrote:
> 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 <ian.jackson@xxxxxxxxxxxxx>
> 
> However:
> 
> > +            preseed_hook_command($ho, 'late_command', $sfx, <<END);
> > +#!/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!

I don't follow, the only thing above which I think you might be
referring to is the "\\\#". There isn't any other quoting.

Or do you mean that this needs quoting and is lacking it and that adding
it would make the here document useful? (I don't think you did)

>   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.

All of the $ here are intended to be expanded at the Perl level.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.