On 9/20/2016 4:42 AM, Darac Marjal wrote:
On Tue, Sep 20, 2016 at 03:59:05AM -0500, Richard Owlett wrote:
_B.5.3. Chainloading preconfiguration files_ says in part:
# More flexibly, this runs a shell command and if it outputs
the names of
# preconfiguration files, includes those files.
#d-i preseed/include_command \
#      string if [ "`hostname`" = bob ]; then echo bob.cfg; fi

How complex can the shell command be?
Where could I find other examples?

If I'm looking in the right place AND interpreting things
the preseed system runs "eval" on your string and then appends
the output to the list of include files.

As this is run in /bin/sh, anything that's valid POSIX shell
should work.

If I interpret things correctly then the below should work.

#d-i preseed/include_command \
# string if [ "`hostname`" = bob ]; then d-i pkgsel/include string pluma gedit; fi

I suspect the substring "then d-i pkgsel/include string pluma gedit" might not be syntactically correct but indicates what I would like to do.

I have a germ of an idea. I need more data before asking too
detailed questions.

Reply via email to