Am Sun, 22 Jan 2006 14:44:59 -0500 schrieb Justin Pryzby
<justinpryzby@users.sourceforge.net>:
> > if there is anyone willing and/or able to help me with the next
> > steps i would be very happy. right now i have some questions on how
> > to get debconf and templates working,
> Read debconf-devel(7), and google about the config, templates and
> postinst files WRT debconf.
Now I think I have got it. Thank you for the first steps.
My templates file looks now something like
Template: vexim/myip
Type: string
Description: Please enter the IP adress exim is listening to
bla bla ....
Template: vexim/pass
Type: password
Description: Please enter the password for the mysql user for vexim
bla bla ...
Template: vexim/fdqn
Type: string
Description: Please enter FDQN of your mailinglist host
bla bla ...
> > so that the user can interact whilest
> > installing. this would be very important - however i do not really
> > know, how to get the user's input and how to process it further. i
> > think about cryptic postinst script using many lines containing sed
> > s/@bla@/$user_in/ > $tempfile ...
> Are you planning on providing fully generalized "maintainer script"
> handling of the config files, or are conffiles sufficient?
I am trying this right now in ./debian/postinst:
source /usr/share/debconf/confmodule
db_version 2.0
case "$1" in
configure)
db_get vexim/dc_vexim_pass || true
dc_vexim_pass=$RET
db_get vexim/dc_vexim_myip || true
dc_vexim_myip=$RET
db_get vexim/dc_vexim_fdqn || true
dc_vexim_fdqn=$RET
cat /usr/share/doc/vexim/setup/mysql.sql |\
sed s/@@PASS@@/$dc_vexim_pass/g |\
sed s/@@MYIP@@/$dc_vexim_myip/g |\
sed s/@@FDQN@@/$dc_vexim_fdqn/g \
> /tmp/vexim_mysql.tmp
mysql -u debian-sys-maint \
< /tmp/vexim_mysql.tmp
rm /tmp/vexim_mysql.tmp
;;
and so on.
But now there're the questions:
can this work? (hope it can)
is there a more elegant way for substitution of @@PASS@@...?
> > but first of all i would need some help on the control-file, the
> > rules-file and on "how to resolve dependencies" of my package.
> Ok what about?
With kind help of Marc Haber I was able to find a solution that goes
hand in hand with the Debian-exim maintainers idea:
Provides: exim4-config-2
Conflicts: exim4-config-2, exim4-config
> > anyone willing to help: have a look at
> > http://knabl.com/~daniel/vexim
> Please make the .diff.gz available, and preferrably in such a way that
> lynx will view it instead of asking how to save it..
Should be done right now.
> Do you intend to Depend: exim4?
Yes, exim4-daemon-heavy is essential for vexim, because of mysql
backend usage.
> How do you deal with the exim4 "conf.d" model vs the exim4.conf model?
Please look at the previous paragraphs. ;-)
> sed -i -e 's/virtuel/virtual/;
> s/configuratin/configuration/;' ./debian/control
> Standards-Version: 2.2.rc1
Stupid mistakes ... I'd like to apologize for waste of your time.
> Clear skies,
> Justin
Thanks for your help
Daniel
--
mfg
Daniel Knabl http://www.tirolinux.net
PGP Fingerprint daniel@aio4u.com
A069 671B 39F2 E9B9 FB34 68BB 4BEC 1344 C8A4 3F0B
Attachment:
signature.asc
Description: PGP signature