installer: preseeding based on hostname
Josef Wolf
jw at raven.inka.de
Thu Dec 7 18:17:40 UTC 2006
Hello!
I'm trying to build an install-CD with different configurations based on
the hostname. I took the example from
http://d-i.alioth.debian.org/manual/en.i386/apbs05.html#preseed-chainload
This is what the example suggests:
d-i preseed/include_command \
string if [ "`hostname`" = bob ]; then echo bob.cfg; fi
But unfortunately, there is a problem here: AFAICS, the include_command
is run immediately when the main preseed file is read. At this early
stage the hostname is not set. Therefore bob.cfg will never be read.
Is this a real bug or am I trying to do something very stupid? Any ideas
how I can include different preseed files based on hostname?
BTW: The actual example is:
d-i preseed/include_command \
string echo if [ "`hostname`" = bob ]; then echo bob.cfg; fi
which is obviously wrong (note the echo)
More information about the ubuntu-users
mailing list