Re: late_command is in never-never-land?
On Wed, Jul 23, 2008 at 09:26:50PM +0300, Shachar Or wrote:
> On Wednesday 23 July 2008 01:37, Shachar Or wrote:
...
> I was given advice in #debian-boot to use in-target for this purpose, so I've
> solved it like this:
>
> d-i preseed/late_command string wget -q -O -
> http://ahava/d-i/etch/late_command.sh > /target/root/late_command.sh && chmod
> u+x /target/root/late_command.sh && in-target '/root/late_command.sh'
> >> /var/log/syslog
You might want to try this:
d-i preseed/late_command string preseed-fetch late_command.sh /target/root/late_command.sh && in-target 'sh /root/late_command.sh'
preseed-fetch has the advantage that it gets stuff from wherever you
got the preseed files, so you can write scripts that are portable from
a preseed setup on your web server, to a copy of the same on an USB
stick, say.
The use of sh id just to make it more concise than doing the chmod,
but that's just a personal preference.
Have a look at http://hands.com/d-i/ for more examples of preseed-fetch,
and lots of scripting stuff.
Cheers, Phil.
--
|)| Philip Hands [+44 (0)20 8530 9560] http://www.hands.com/
|-| HANDS.COM Ltd. http://www.uk.debian.org/
|(| 10 Onslow Gardens, South Woodford, London E18 1NE ENGLAND
Reply to: