config is in nodm 0.11-1.3.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
if [ -s /etc/default/nodm ] ; then
. /etc/default/nodm
if [ -n "$NODM_ENABLED" ] ; then
db_set nodm/enabled "$NODM_ENABLED"
fi
if [ -n "$NODM_USER" ] ; then
db_set nodm/user "$NODM_USER"
fi
if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.10"
then
# After 0.10 nodm/xinit is not needed anymore
# don't fail if it was unregistered before
db_unregister nodm/xinit || true
fi
if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.5"
then
# If I'm coming from <0.5, remove vtN from NODM_X_OPTIONS and
# set first_vt to N
if [ -n "$NODM_X_OPTIONS" ] ; then
# Try to extract vtN from NODM_X_OPTIONS
VTNUM=`echo "$NODM_X_OPTIONS" | sed -re 's/^.*\<vt([0-9]+)\>.*$/\1/'`
if [ "$VTNUM" = "$NODM_X_OPTIONS" ]
then
VTNUM=
else
# If it found vtN, strip it away from NODM_X_OPTIONS
NODM_X_OPTIONS=`echo "$NODM_X_OPTIONS" | sed -r -e 's/[[:blank:]]*\<vt([0-9]+)\>[[:blank:]]/ /' -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//'`
fi
db_set nodm/x_options "$NODM_X_OPTIONS"
fi
if [ -n "$NODM_FIRST_VT" ] ; then
db_set nodm/first_vt "$NODM_FIRST_VT"
elif [ -n "$VTNUM" ]; then
# If VTNUM was not set but we found it in NODM_X_OPTIONS, set it here
db_set nodm/first_vt "$VTNUM"
fi
else
if [ -n "$NODM_FIRST_VT" ] ; then
db_set nodm/first_vt "$NODM_FIRST_VT"
fi
if [ -n "$NODM_X_OPTIONS" ] ; then
db_set nodm/x_options "$NODM_X_OPTIONS"
fi
fi
if [ -n "$NODM_MIN_SESSION_TIME" ]; then
db_set nodm/min_session_time "$NODM_MIN_SESSION_TIME"
fi
if [ -n "$NODM_XSESSION" ]; then
db_set nodm/xsession "$NODM_XSESSION"
fi
fi
db_input medium nodm/enabled || true
db_go
db_get nodm/enabled
START="$RET"
if [ "x$START" = "xtrue" ] ; then
db_input medium nodm/user || true
db_go
db_input low nodm/first_vt || true
db_go
db_input low nodm/x_options || true
db_go
db_input low nodm/min_session_time || true
db_go
db_input low nodm/xsession || true
db_go
fi
|