[pkg-fso-commits] [nodm] 15/50: debian/<debconf>: Add support for NOXM_X_TIMEOUT via debconf. (Closes: #704128).
Mike Gabriel
sunweaver at debian.org
Mon Jan 23 15:19:31 UTC 2017
This is an automated email from the git hooks/post-receive script.
sunweaver pushed a commit to branch master
in repository nodm.
commit 28db839f985eb2f5888bd293e9cb2b9578ed5c8a
Author: Sjoerd Simons <sjoerd at debian.org>
Date: Wed Mar 23 14:00:33 2016 +0100
debian/<debconf>: Add support for NOXM_X_TIMEOUT via debconf. (Closes: #704128).
---
debian/changelog | 5 +++++
debian/nodm.config | 6 ++++++
debian/nodm.init | 3 ++-
debian/nodm.postinst | 7 +++++++
debian/nodm.templates | 7 +++++++
5 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index b6f87f9..9bf1a68 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,11 @@ nodm (0.12-1) UNRELEASED; urgency=low
+ Add Japanese DebConf translation file. Thanks to "victory" for providing
it. (Closes: #718920).
+ [ Sjoerd Simons ]
+ * debian/<debconf>:
+ + Add support for NOXM_X_TIMEOUT via debconf. (Closes: #704128). Based on
+ work by Hector Oron.
+
[ Simon McVittie ]
* debian/control:
+ Add D (nodm): xserver-xorg. (Closes: #689703).
diff --git a/debian/nodm.config b/debian/nodm.config
index 685e429..68fc680 100644
--- a/debian/nodm.config
+++ b/debian/nodm.config
@@ -57,6 +57,9 @@ if [ -s /etc/default/nodm ] ; then
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
@@ -80,5 +83,8 @@ if [ "x$START" = "xtrue" ] ; then
db_input low nodm/xsession || true
db_go
+
+ db_input low nodm/x_timeout || true
+ db_go
fi
diff --git a/debian/nodm.init b/debian/nodm.init
index 3cc1c04..6630e1e 100644
--- a/debian/nodm.init
+++ b/debian/nodm.init
@@ -25,13 +25,14 @@ NODM_XSESSION=/etc/X11/Xsession
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 --git a/debian/nodm.postinst b/debian/nodm.postinst
index 3957d61..480758e 100644
--- a/debian/nodm.postinst
+++ b/debian/nodm.postinst
@@ -39,6 +39,8 @@ EOF
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 @@ EOF
-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 @@ NODM_X_OPTIONS='$NODM_X_OPTIONS'
# 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 --git a/debian/nodm.templates b/debian/nodm.templates
index 91e593e..5d21cce 100644
--- a/debian/nodm.templates
+++ b/debian/nodm.templates
@@ -53,6 +53,13 @@ _Description: Minimum time (in seconds) for a session to be considered OK:
amount of time before restarting the session. The waiting time will grow
until a session lasts longer than this amount.
+Template: nodm/x_timeout
+Type: string
+Default: 300
+_Description: Maximum time (in seconds) to wait for X to start:
+ 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.
+
Template: nodm/xsession
Type: string
Default: /etc/X11/Xsession
--
Alioth's hooks/post-receive on /srv/git.debian.org/git/pkg-fso/nodm.git
More information about the pkg-fso-commits
mailing list