<<<

Example debconf config script

#!/bin/sh -e
# A simplified version of debconf's own config script.
. /usr/share/debconf/confmodule
db_capb backup
# Use a state machine to allow jumping back to previous questions.
STATE=1
while [ "$STATE" != 0 -a "$STATE" != 3 ]; do
case "$STATE" in
1)
db_beginblock
db_input medium debconf/frontend || true
db_input medium debconf/priority || true
db_endblock
;;
2)
db_beginblock
db_input low debconf/showold || true
db_endblock
;;
esac
if db_go; then
STATE=$(($STATE + 1))
else
STATE=$(($STATE - 1))
fi
done