Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #172520 > unrolled thread

Installation manual is too terse

Started byRichard Owlett <rowlett@cloud85.net>
First post2016-09-20 11:00 +0200
Last post2016-09-20 13:50 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  Installation manual is too terse Richard Owlett <rowlett@cloud85.net> - 2016-09-20 11:00 +0200
    Re: Installation manual is too terse Darac Marjal <mailinglist@darac.org.uk> - 2016-09-20 11:50 +0200
      Re: Installation manual is too terse Richard Owlett <rowlett@cloud85.net> - 2016-09-20 13:10 +0200
        Re: Installation manual is too terse Darac Marjal <mailinglist@darac.org.uk> - 2016-09-20 13:20 +0200
          Re: Installation manual is too terse Richard Owlett <rowlett@cloud85.net> - 2016-09-20 13:50 +0200

#172520 — Installation manual is too terse

FromRichard Owlett <rowlett@cloud85.net>
Date2016-09-20 11:00 +0200
SubjectInstallation manual is too terse
Message-ID<sjp4e-EF-23@gated-at.bofh.it>
_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?

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

[toc] | [next] | [standalone]


#172521

FromDarac Marjal <mailinglist@darac.org.uk>
Date2016-09-20 11:50 +0200
Message-ID<sjpQB-1av-13@gated-at.bofh.it>
In reply to#172520

[Multipart message — attachments visible in raw view] — view raw

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 correctly 
(https://sources.debian.net/src/preseed/1.66/preseed.sh/?hl=76#L76), 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.

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

-- 
For more information, please reread.

[toc] | [prev] | [next] | [standalone]


#172523

FromRichard Owlett <rowlett@cloud85.net>
Date2016-09-20 13:10 +0200
Message-ID<sjr61-2by-5@gated-at.bofh.it>
In reply to#172521
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
> correctly
> (https://sources.debian.net/src/preseed/1.66/preseed.sh/?hl=76#L76),
> 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.
>>
>>
>

[toc] | [prev] | [next] | [standalone]


#172524

FromDarac Marjal <mailinglist@darac.org.uk>
Date2016-09-20 13:20 +0200
Message-ID<sjrfH-2eQ-1@gated-at.bofh.it>
In reply to#172523

[Multipart message — attachments visible in raw view] — view raw

On Tue, Sep 20, 2016 at 06:01:55AM -0500, Richard Owlett wrote:
>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
>>correctly
>>(https://sources.debian.net/src/preseed/1.66/preseed.sh/?hl=76#L76),
>>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 don't think that will work, but the following might:

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



-- 
For more information, please reread.

[toc] | [prev] | [next] | [standalone]


#172525

FromRichard Owlett <rowlett@cloud85.net>
Date2016-09-20 13:50 +0200
Message-ID<sjrIJ-2oK-13@gated-at.bofh.it>
In reply to#172524
On 9/20/2016 6:12 AM, Darac Marjal wrote:
> On Tue, Sep 20, 2016 at 06:01:55AM -0500, Richard Owlett wrote:
>> 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
>>> correctly
>>> (https://sources.debian.net/src/preseed/1.66/preseed.sh/?hl=76#L76),
>>>
>>> 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 don't think that will work, but the following might:
>
> #d-i preseed/include_command \
> #      string if [ "`hostname`" = bob ]; then echo "d-i
> pkgsel/include string pluma gedit" > bob.cfg; echo bob.cfg; fi
>

Thank you.
Looks like it's time for test cases using "debconf-set-selections 
-c preseed.cfg" and/or the various "debug = n" otions.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web