You are here
beric - Thu, 2009/12/24 - 00:24
Hello.
Short story:Let's say I have the following 2 lines in my di-live.d script
#!/bin/bash echo "hello"
di-live fails on that because its trying to get the output of that script into the d-i menu.
throwing the following exception:
File "/usr/lib/python2.5/site-packages/debconf.py", line 96, in command raise DebconfError(status, data) debconf.DebconfError: (20, 'Unsupported command "hello" (full line was "hello") received from confmodule.')
How can I bypass this without modifying di-live.py?
Long story:
I'm working on a patch that has to get some user input during the installation.
I already have a ncurses based interface that uses good old "dialog" and I'm trying to run it from a component I've created in dl-live.d. however, since dl-live runs everything in this folder as a menu component I'm getting an error. I don't want to touch that ncurses interface nor the di-live.py or d-i.
Many thanks and keep up the great work.
Forum:
A little info on di-live
live-installer scripts:
Live installer scripts live in /usr/lib/live-installer.d and will be executed inside the /target chroot. They do not support user interaction, and will be executed on firstboot when running live (for example: regeneration of ssh keys).
di-live components:
As you already know, they live in /usr/lib/di-live.d . They are executed outside of the /target chroot (ie. in the live system), so you need to take care of chrooting (di-live makes this easy, see below).
Note that di-live leverages debconf for user interaction, you cannot use ncurses/dialog without hacking di-live/d-i to pieces. Under normal circumstances, for debconf to interact with the user you would be required to create a template and have it installed together with your package. This can become tedious especially for adhoc scripts, so di-live provides simple methods to get around this.
So, for example, if you would like to get input from the user and use it to do something in the /target chroot, you would do something like this: See common.py for more info.
Note: Your scripts must NOT print to stdout or stderr, as this will cause issues with debconf. Rather, if an error occured, you should write to /var/log/di-live.log and exit with errorcode 10 (tells d-i to backup a step).
I hope the above helps...
very helpful ! thanks. I
very helpful ! thanks.
I guess a solution is to running dialog by creating another service and run it before the di-live.
Not sure if I would go down that road...
Add new comment