• Re: At what time of the install process a script is executed with 'pres

    From Geert Stappers@21:1/5 to john doe on Sun Dec 26 17:50:02 2021
    On Sun, Dec 26, 2021 at 05:30:03PM +0100, john doe wrote:
    Debians,

    From a preseed file I need to download and execute as the last command
    a script.
    I'm playing with 'd-i preseed/run string foo.sh' the script execute successfully but does not look to be executed as the last command in the install process.

    Can someone confirm when 'preseed/run' is executed?

    In other words, what is the best way to download and execute a script at
    the end of the install process.

    $ curl --silent https://d-i.debian.org/manual/en.arm64/apbs04.html | grep -e script
    by creating a <span class="quote">“<span class="quote">preseed/run</span>”</span> script containing the following


    Any help is appreciated.

    Express your self for further help.


    John Doe


    Groeten
    Geert Stappers
    --
    Silence is hard to parse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From john doe@21:1/5 to Holger Wansing on Sun Dec 26 19:20:01 2021
    On 12/26/2021 5:44 PM, Holger Wansing wrote:


    Am 26. Dezember 2021 17:30:03 MEZ schrieb john doe <johndoe65534@mail.com>:
    Debians,

    From a preseed file I need to download and execute as the last command
    a script.
    I'm playing with 'd-i preseed/run string foo.sh' the script execute
    successfully but does not look to be executed as the last command in the
    install process.

    Can someone confirm when 'preseed/run' is executed?

    In other words, what is the best way to download and execute a script at
    the end of the install process.

    Not exactly answering your question, but the installation-guide
    has a chapter about this, see https://d-i.debian.org/manual/en.amd64/apbs05.html

    I guess, "preseed/late_command is what you want...


    Actually I was more hoping for an equivalent of 'preseed/run' to the 'preseed/late_command'.
    The late_command will not per default download the *.sh file.

    Thanks alot for your answer.

    --
    John Doe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Geert Stappers@21:1/5 to john doe on Mon Dec 27 11:20:01 2021
    On Sun, Dec 26, 2021 at 07:18:26PM +0100, john doe wrote:
    On 12/26/2021 5:44 PM, Holger Wansing wrote:
    Am 26. Dezember 2021 17:30:03 MEZ schrieb john doe:
    Debians,

    From a preseed file I need to download and execute as the last command
    a script.
    I'm playing with 'd-i preseed/run string foo.sh' the script execute successfully but does not look to be executed as the last command in the install process.

    Can someone confirm when 'preseed/run' is executed?

    In other words, what is the best way to download and execute a script at the end of the install process.

    Not exactly answering your question, but the installation-guide
    has a chapter about this, see https://d-i.debian.org/manual/en.amd64/apbs05.html

    Qoute from that page
    #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh

    I guess, "preseed/late_command is what you want...


    Actually I was more hoping for an equivalent of 'preseed/run' to the 'preseed/late_command'.
    The late_command will not per default download the *.sh file.

    This is untested:

    d-i preseed/late_command string in-target wget -O /target/myscript http://server.local/install_script ; in-target bash /myscript


    Consider to share with the mailinglist (and the mailinglist archive)
    what worked for you.


    Groeten
    Geert Stappers
    --
    Silence is hard to parse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From john doe@21:1/5 to Holger Wansing on Wed Dec 29 17:20:02 2021
    On 12/29/2021 4:35 PM, Holger Wansing wrote:
    Hi,

    Am 26. Dezember 2021 19:18:26 MEZ schrieb john doe <johndoe65534@mail.com>:
    On 12/26/2021 5:44 PM, Holger Wansing wrote:


    Am 26. Dezember 2021 17:30:03 MEZ schrieb john doe <johndoe65534@mail.com>: >>>>
    Can someone confirm when 'preseed/run' is executed?

    In other words, what is the best way to download and execute a script at >>>> the end of the install process.


    [...]

    Actually I was more hoping for an equivalent of 'preseed/run' to the
    'preseed/late_command'.
    The late_command will not per default download the *.sh file.

    The preseed/run part is documented in chapter B.5.3 "Chainloading of preconfiguration files":
    https://d-i.debian.org/manual/en.amd64/apbs05.html

    So I guess this not a functionality to be executed at the end of installation, it only makes sense somewhere at the beginning.


    Thank you for this,

    I guess you are refering to:

    "
    # Most flexibly of all, this downloads a program and runs it. The program
    # can use commands such as debconf-set to manipulate the debconf database.
    # More than one script can be listed, separated by spaces.
    # Note that if the filenames are relative, they are taken from the same
    # directory as the preconfiguration file that runs them.
    #d-i preseed/run string foo.sh"

    In the description text, to me at least, it is not clear at what stage
    this command is executed!!! :)
    Having played a bit more, I can confirm that this command is not
    executed at the end of the installation process.

    While I was looking to understand what was going on, I came across (1)
    and this is where Ubuntu differs from Debian:

    "on a web server. In this example, if the preseed file sets preseed/run
    to /scripts/late_command.sh then the file will be fetched from http://autoserver.example.com/d-i/focal/./scripts/late_command.sh."

    I would love to see a rewording of the above text which would clearly
    state at what time the command is executed!!! :)

    I realy appreciate your help.

    1) https://help.ubuntu.com/lts/installation-guide/s390x/apbs02.html

    --
    John Doe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Geert Stappers@21:1/5 to All on Fri Dec 31 17:30:02 2021
    ....
    In the description text, to me at least, it is not clear at what stage
    this command is executed!!! :)
    Having played a bit more, I can confirm that this command is not
    executed at the end of the installation process.

    While I was looking to understand what was going on, I came across (1)
    and this is where Ubuntu differs from Debian:

    "on a web server. In this example, if the preseed file sets preseed/run
    to /scripts/late_command.sh then the file will be fetched from http://autoserver.example.com/d-i/focal/./scripts/late_command.sh."

    I would love to see a rewording of the above text which would clearly
    state at what time the command is executed!!! :)

    I realy appreciate your help.


    That starts with smiling to the "works for me".
    Next step is documenting how to reproduce "how it fails for me"


    Groeten
    Geert Stappers

    1) https://help.ubuntu.com/lts/installation-guide/s390x/apbs02.html
    --
    Silence is hard to parse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)