[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: automating debconf

Craig Sanders wrote:
> is there any reason why "dpkg-reconfigure -ftext" requires a controlling
> tty?

It does some things to detect screen resizes. Have you tried ssh -t ?

> dpkg-reconfigure -ftext debconf <<__EOF__
> t
> l
> yes
> no


> i'm hoping that there's a way around this, and that i'm just doing
> something the wrong way...
> it seems to me that there should be a new debconf method called "pipe"
> which allowed you to set the values like so:
> dpkg-reconfigure -fpipe debconf <<__EOF__
> debconf/frontend="Text"
> debconf/priority="low"
> debconf/preconfig="yes"
> debconf/showold="no"
> __EOF__

Well, what you're really running into is the missing third of debconf,
the flexible backend database. You _should_ be able to point all these
machines as a single master debconf database, or ship a database file
onto them, or accomplish this in several other ways. But nobody has
bothered to write that code yet, and since I am not a database person, I
really don't want to be the person to do so.

In the meantime, you could also grab deconf-utils and look at the
debconf-communicate command, which allows you to do things like:

  debconf-communicate \
  	"set foo/bar true" "fset foo/bar seen true" \
	"set baz/quux 11"  "fset baz/quux seen true"

And then use the noninteractive frontend. This requires the questions
that you are setting be existing questions that debconf knows about,
though. (There are ways around this limitation.)

(Perhaps I should make that accept piped input. Hm, done.
get debconf/frontend
0 Text
set debconf/frontend Slang
0 value set
In Incoming.)

> a utility to just list the questions would be useful. something a bit
> more reliable than setting EDITOR to /bin/cat:


see shy jo

Reply to: