Re: Would allowing preseed to be a tarball a good idea?

2022-02-16 Thread Glen Huang
@Philip > On Feb 16, 2022, at 5:48 PM, Philip Hands wrote: > > Glen Huang writes: > >> Hi, >> >> Currently, the preseed file needs to be a text file. I find it to be a >> bit limiting, especially if you want to do some non-trivial scripting >> in either early_command or late_command (let's c

Re: Would allowing preseed to be a tarball a good idea?

2022-02-16 Thread Geert Stappers
On Wed, Feb 16, 2022 at 05:32:23PM +0800, Glen Huang wrote: > > On Feb 16, 2022, at 5:19 PM, Glen Huang wrote: > > > > Hi, > > > > Currently, the preseed file needs to be a text file. I find it to > > be a bit limiting, especially if you want to do some non-trivial > > scripting in either early_co

Re: Would allowing preseed to be a tarball a good idea?

2022-02-16 Thread Philip Hands
Glen Huang writes: > Hi, > > Currently, the preseed file needs to be a text file. I find it to be a > bit limiting, especially if you want to do some non-trivial scripting > in either early_command or late_command (let's call them runners). > There are basically four options to address it AFAIK:

Re: Would allowing preseed to be a tarball a good idea?

2022-02-16 Thread Glen Huang
Forgot a few things. 1. #4 also means the preseed file needs be downloaded twice, since the one downloaded by the installer is immediately removed once the preseed is loaded into debconf db, before early_command. 2. Files parsed out in #4 needs to be stored somewhere. No matter where you place

Re: Unable to set root password with clear text using preseed/early_command

2022-02-16 Thread More Thanks
On Wed, Feb 16, 2022 at 04:52:48PM +0800, Glen Huang wrote: > On Feb 16, 2022, at 4:38 PM, Philip Hands wrote: > > Glen Huang writes: > > > Thanks to Cyril Brulebois’s tip that I could use DEBCONF_DEBUG > > > to debug debconf, I found out the seen flag should be set in order > > > for db_input to

Would allowing preseed to be a tarball a good idea?

2022-02-16 Thread Glen Huang
Hi, Currently, the preseed file needs to be a text file. I find it to be a bit limiting, especially if you want to do some non-trivial scripting in either early_command or late_command (let's call them runners). There are basically four options to address it AFAIK: 1. Strictly use one-liners i

Re: Unable to set root password with clear text using preseed/early_command

2022-02-16 Thread Glen Huang
Setting a placeholder value is a great idea, it simplifies the early_command since the seen flag no longer needs to be set. Thanks for the tip Philip. > On Feb 16, 2022, at 4:38 PM, Philip Hands wrote: > > Glen Huang writes: > >> Thanks to Cyril Brulebois’s tip that I could use DEBCONF_DEBUG

Re: Unable to set root password with clear text using preseed/early_command

2022-02-16 Thread Philip Hands
Glen Huang writes: > Thanks to Cyril Brulebois’s tip that I could use DEBCONF_DEBUG to debug > debconf, I found out the seen flag should be set in order for db_input to > pick up the value. > > Case solved, thanks to everyone helped! I was wondering about that, but didn't see my code setting l