[pkg-fso-maint] Bug#704128: nodm: please add support for NODM_X_TIMEOUT via debconf
Hector Oron
zumbi at debian.org
Thu Mar 28 10:57:37 UTC 2013
Package: nodm
Version: 0.11-1.3
Severity: wishlist
Tags: patch
Hello,
Please consider the following patch that allows NODM_X_TIMEOUT to be configured via debconf variable.
diff -u nodm-0.11/debian/nodm.postinst nodm-0.11/debian/nodm.postinst
--- nodm-0.11/debian/nodm.postinst
+++ nodm-0.11/debian/nodm.postinst
@@ -39,6 +39,8 @@
NODM_MIN_SESSION_TIME="$RET"
db_get nodm/xsession
NODM_XSESSION="$RET"
+ db_get nodm/x_timeout
+ NODM_X_TIMEOUT="$RET"
if [ -s /etc/default/nodm ] ; then
sed -i -r -e "s,^NODM_ENABLED=.*,NODM_ENABLED=$NODM_ENABLED," \
@@ -47,6 +49,7 @@
-e "s,^NODM_X_OPTIONS=.*,NODM_X_OPTIONS='$NODM_X_OPTIONS'," \
-e "s,^NODM_MIN_SESSION_TIME=.*,NODM_MIN_SESSION_TIME=$NODM_MIN_SESSION_TIME," \
-e "s,^NODM_XSESSION=.*,NODM_XSESSION=$NODM_XSESSION," \
+ -e "s,^NODM_X_TIMEOUT=.*,NODM_X_TIMEOUT=$NODM_X_TIMEOUT," \
/etc/default/nodm
else
cat <<EOF > /etc/default/nodm
@@ -70,6 +73,10 @@
# If an X session will run for less than this time in seconds, nodm will wait an
# increasing bit of time before restarting the session.
NODM_MIN_SESSION_TIME=$NODM_MIN_SESSION_TIME
+
+# Timeout (in seconds) to wait for X to be ready to accept connections. If X is
+# not ready before this timeout, it is killed and restarted.
+NODM_X_TIMEOUT=$NODM_X_TIMEOUT
EOF
fi
fi
diff -u nodm-0.11/debian/nodm.init nodm-0.11/debian/nodm.init
--- nodm-0.11/debian/nodm.init
+++ nodm-0.11/debian/nodm.init
@@ -25,13 +25,14 @@
NODM_X_OPTIONS="-nolisten tcp"
NODM_USER=root
NODM_MIN_SESSION_TIME=60
+NODM_X_TIMEOUT=300
if [ -f /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
-export NODM_XINIT NODM_XSESSION NODM_X_OPTIONS NODM_USER NODM_MIN_SESSION_TIME NODM_FIRST_VT
+export NODM_XINIT NODM_XSESSION NODM_X_OPTIONS NODM_USER NODM_MIN_SESSION_TIME NODM_FIRST_VT NODM_X_TIMEOUT
# If you change the user to a non-root user, make sure you
# set allowed_users=anybody in /etc/X11/Xwrapper.config
diff -u nodm-0.11/debian/nodm.config nodm-0.11/debian/nodm.config
--- nodm-0.11/debian/nodm.config
+++ nodm-0.11/debian/nodm.config
@@ -57,6 +57,9 @@
if [ -n "$NODM_XSESSION" ]; then
db_set nodm/xsession "$NODM_XSESSION"
fi
+ if [ -n "$NODM_X_TIMEOUT" ]; then
+ db_set nodm/x_timeout "$NODM_X_TIMEOUT"
+ fi
fi
db_input medium nodm/enabled || true
@@ -81,4 +84,7 @@
db_input low nodm/xsession || true
db_go
+
+ db_input low nodm/x_timeout || true
+ db_go
fi
only in patch2:
unchanged:
--- nodm-0.11.orig/README
+++ nodm-0.11/README
@@ -46,7 +46,7 @@
* Configuration
-Configuration is made via 5 environment variables:
+Configuration is made via these environment variables:
NODM_USER
Controls the user that is used to automatically log in.
Regards,
Hector Oron
-- System Information:
Debian Release: 7.0
APT prefers unstable
APT policy: (900, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.8-trunk-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages nodm depends on:
ii debconf [debconf-2.0] 1.5.49
ii libc6 2.13-38
ii libpam0g 1.1.3-9
ii libx11-6 2:1.5.0-1
ii x11-common 1:7.7+2
ii x11-xserver-utils 7.7~3
nodm recommends no packages.
nodm suggests no packages.
-- debconf information:
* nodm/xsession: /etc/X11/Xsession
* nodm/x_options: -nolisten tcp
* nodm/first_vt: 7
* nodm/min_session_time: 60
* nodm/enabled: true
* nodm/user: zumbi
More information about the pkg-fso-maint
mailing list