I want to use debconf in my debian package to get some user input. I have a debian/config file:
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_fset dn-native-drivers/choose_port seen false
db_clear
db_purge
db_input critical dn-native-drivers/choose_port || true
db_go
and a debian/templates file:
Template: dn-native-drivers/choose_port
Type: string
Default: 50
Description: Which vcom-port should be used?
The port can be changed later in /etc/dn with the property
vcom.nativePort
when I call the config script by myself its just doing what I want (displaying debconf
question) but when I build the package with dpkg-buildpackage -us -uc
and then install it with dpkg -i packagename
the Question is not being displayed. I checked if the config and templates files been inside the control.tar.gz and they are there. I use raspbian if that matters. Why is my control script not being called during installation?