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

Re: Debian-installer export custom variable



Leonid Shadevsky <l.shadevsky@swd.ru> writes:

> Hi, I want to install Debian on several machines via preseeding, and have a 
> question about automating of this process:
>
> Is it possible to define my own variable for example NUM=01 and use it for 
> generating hostname?
>
> i.e in preseed.cfg:
> d-i    netcfg/get_hostname     string  host$NUM

You probably want to look at preseed/early_command, or
preseed/late_command, or if you want to get clever, preseed/run lets you
execute a script

For a (perhaps more complicated than you need, and slightly out of date)
example of some of the things you might want to do, have a look at:

  http://hands.com/d-i/squeeze/etch.sh  (for use of db_set)

  http://hands.com/d-i/squeeze/start.cfg  (for use of early_command,
  late_command, and run)

  If you think you need complicated, start here:  http://hands.com/d-i/

Other examples available here:

  http://wiki.debian.org/DebianInstaller/Preseed#Examples

as well as the docs for auto install mode:

  http://d-i.alioth.debian.org/manual/en.i386/apbs02.html#preseed-auto

HTH

Cheers, Phil.

P.S. It's about time I updated my d-i stuff for wheezy, so feel free to
hassle me about things that don't work (patches appreciated :-)
-- 
|)|  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

Attachment: pgpiedrnMUSNz.pgp
Description: PGP signature


Reply to: