3
# Some ideas stolen from the cvs package
5
# Config script for seyon using debconf
6
. /usr/share/debconf/confmodule
7
db_version 2.0 || [ $? -lt 30 ]
9
db_title "Seyon communication software"
12
MODEMDEFAULTS=/etc/X11/seyon/Seyon-modem
13
DEFAULTPORT=/dev/modem
18
if [ -f $MODEMDEFAULTS ]; then
19
PORT=`cat $MODEMDEFAULTS | grep -m1 "^seyon\*modems:" | cut -f2 -d: 2>/dev/null`
21
if [ -z $PORT ] ; then
28
if [ -f $MODEMDEFAULTS ]; then
29
ESCAPEDPORT=`echo $PORT | sed 's/\//\\\\\//g'`
30
sed "s/^seyon\*modems:.*$/seyon\*modems: ${ESCAPEDPORT}/" $MODEMDEFAULTS > $TEMPFILE
31
chmod --reference=$MODEMDEFAULTS $TEMPFILE
32
chown --reference=$MODEMDEFAULTS $TEMPFILE
34
echo "seyon*modems: $PORT" > $TEMPFILE
36
chown root:dialout $TEMPFILE
38
if [ ! -d /etc/X11/seyon ] ; then
39
mkdir -p /etc/X11/seyon
41
mv $TEMPFILE $MODEMDEFAULTS
46
db_set seyon/device "$PORT" || true
53
# If not present, use default
62
db_input low seyon/device || true
66
# If not present, use default
75
# We first read the settings file
76
# in order to get admin-modified settings
78
# Debconf-stored values are updated accordingly
80
# They are re-read from Debconf
82
# In case the package has never been configured, the settings
83
# are asked through debconf
85
# They are re-re-read from debconf
86
# for updating variables
88
# The settings file is written
90
# Then we do some other stuff, which could sometimes lead to
91
# debconf showing screens
92
# This is why they are here and not in the postinst script