Can't read debconf from success_command

Asked by Adam Smith

Hi, I'm using a custom script that is executed via preseeding

d-i ubiquity/success_command string /cdrom/preseed/raspberry/success_command

I'd like the script to read some other preseeded values (d-i debian-installer/add-kernel-opts), but if I place

. /usr/share/debconf/confmodule

at the start of the script it fails to execute the rest of the script.

I'm not a scripting guru so this has me scratching my head. In the past people seems to have used this successfully with preseed/late_command, although I can't get that to work at all (has it been removed from ubiquity?).

Is this a problem with ubiquity's success_command, or just my poor understanding of writing scripts?

Thanks!

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu ubiquity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #1770096.

Revision history for this message
Adam Smith (adamsmith) said :
#1

Nope, that's not it. Snippet from syslog:

Jan 28 16:15:44 xubuntu ubiquity: #!/bin/sh
Jan 28 16:15:44 xubuntu ubiquity:
Jan 28 16:15:44 xubuntu ubiquity: # Install Raspberry Pi firmware. Parts of this have been stolen/adapted from flash-kernel-installer.
Jan 28 16:15:44 xubuntu ubiquity:
Jan 28 16:15:44 xubuntu ubiquity: set -e
Jan 28 16:15:44 xubuntu ubiquity:
Jan 28 16:15:44 xubuntu ubiquity: . /usr/share/debconf/confmodule
Jan 28 16:15:44 xubuntu ubiquity: #!/bin/sh
Jan 28 16:15:44 xubuntu ubiquity: # This is a shell library to interface to the Debian configuration management
Jan 28 16:15:44 xubuntu ubiquity: # system.
Jan 28 16:15:44 xubuntu ubiquity:
Jan 28 16:15:44 xubuntu ubiquity: ###############################################################################
Jan 28 16:15:44 xubuntu ubiquity: # Initialization.
Jan 28 16:15:44 xubuntu ubiquity:
Jan 28 16:15:44 xubuntu ubiquity: # Check to see if a FrontEnd is running.
Jan 28 16:15:44 xubuntu ubiquity: if [ ! "$DEBIAN_HAS_FRONTEND" ]; then
Jan 28 16:15:44 xubuntu ubiquity: #011PERL_DL_NONLAZY=1
Jan 28 16:15:44 xubuntu ubiquity: #011export PERL_DL_NONLAZY
Jan 28 16:15:44 xubuntu ubiquity: #011# Since there is no FrontEnd, this program execs a FrontEnd.
Jan 28 16:15:44 xubuntu ubiquity: #011# It will then run a new copy of $0 that can talk to it.
Jan 28 16:15:44 xubuntu ubiquity: #011if [ "$DEBCONF_USE_CDEBCONF" ]; then
Jan 28 16:15:44 xubuntu ubiquity: #011#011exec /usr/lib/cdebconf/debconf $0 "$@"
Jan 28 16:15:44 xubuntu ubiquity: #011else
Jan 28 16:15:44 xubuntu ubiquity: #011#011exec /usr/share/debconf/frontend $0 "$@"
Jan 28 16:15:44 xubuntu ubiquity: #011fi
Jan 28 16:15:44 xubuntu ubiquity: fi
Jan 28 16:15:45 xubuntu ubiquity: debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Jan 28 16:15:45 xubuntu ubiquity[2816]: log-output -t ubiquity sh -c cp /cdrom/preseed/raspberry/success_command /tmp/; chmod +x /tmp/success_command; sh -v /tmp/success_command

The failure is caused by:

debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable

Killing the process with the lock allows the script to run. Don't know how to overcome this properly. This does seem like a bug with ubiquity.

One final thing, ubiquity copies the installer logs before the success_command which is a bit of a pain when debugging.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.