Date: Thursday, March 31, 2016 @ 02:47:18
  Author: svenstaro
Revision: 168939

archrelease: copy trunk to community-i686, community-x86_64

Added:
  nodm/repos/community-i686/PKGBUILD
    (from rev 168938, nodm/trunk/PKGBUILD)
  nodm/repos/community-i686/nodm.conf
    (from rev 168938, nodm/trunk/nodm.conf)
  nodm/repos/community-i686/nodm.service
    (from rev 168938, nodm/trunk/nodm.service)
  nodm/repos/community-i686/norestart.patch
    (from rev 168938, nodm/trunk/norestart.patch)
  nodm/repos/community-x86_64/PKGBUILD
    (from rev 168938, nodm/trunk/PKGBUILD)
  nodm/repos/community-x86_64/nodm.conf
    (from rev 168938, nodm/trunk/nodm.conf)
  nodm/repos/community-x86_64/nodm.service
    (from rev 168938, nodm/trunk/nodm.service)
  nodm/repos/community-x86_64/norestart.patch
    (from rev 168938, nodm/trunk/norestart.patch)
Deleted:
  nodm/repos/community-i686/PKGBUILD
  nodm/repos/community-i686/nodm.conf
  nodm/repos/community-i686/nodm.service
  nodm/repos/community-i686/norestart.patch
  nodm/repos/community-x86_64/PKGBUILD
  nodm/repos/community-x86_64/nodm.conf
  nodm/repos/community-x86_64/nodm.service
  nodm/repos/community-x86_64/norestart.patch

----------------------------------+
 /PKGBUILD                        |   72 ++++++++++++++++++++++
 /nodm.conf                       |   44 +++++++++++++
 /nodm.service                    |   18 +++++
 /norestart.patch                 |  120 +++++++++++++++++++++++++++++++++++++
 community-i686/PKGBUILD          |   35 ----------
 community-i686/nodm.conf         |   22 ------
 community-i686/nodm.service      |    9 --
 community-i686/norestart.patch   |   60 ------------------
 community-x86_64/PKGBUILD        |   35 ----------
 community-x86_64/nodm.conf       |   22 ------
 community-x86_64/nodm.service    |    9 --
 community-x86_64/norestart.patch |   60 ------------------
 12 files changed, 254 insertions(+), 252 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD     2016-03-31 00:47:07 UTC (rev 168938)
+++ community-i686/PKGBUILD     2016-03-31 00:47:18 UTC (rev 168939)
@@ -1,35 +0,0 @@
-# Maintainer: Sven-Hendrik Haase <[email protected]>
-# Contributor: Roel Gerrits <[email protected]>
-pkgname=nodm
-pkgver=0.7
-pkgrel=1
-pkgdesc='X display manager for automatic logins'
-arch=('i686' 'x86_64')
-url='http://enricozini.org/sw/nodm/'
-license=('GPL')
-depends=('pam' 'xorg-xinit')
-makedepends=('help2man')
-backup=('etc/nodm.conf')
-source=("http://enricozini.org/sw/nodm/$pkgname-$pkgver.tar.gz";
-       "nodm.conf"
-       "nodm.service"
-       "norestart.patch")
-md5sums=('6a569e9be7baf56de5c5813483d0357c'
-         '9a372ab7dcf281963d972ebb9486b605'
-         '2660ea3446841ade64db351ab639101c'
-         '5076b2fe19551c42e3f5cd8bf445927f')
-
-build() {
-       cd "$srcdir/$pkgname-$pkgver"
-
-       ./configure --prefix=/usr/
-       make
-}
-
-package() {
-       cd "$srcdir/$pkgname-$pkgver"
-
-       install -Dm755 nodm $pkgdir/usr/bin/nodm
-       install -Dm644 ../nodm.conf $pkgdir/etc/nodm.conf
-       install -Dm644 ../nodm.service 
$pkgdir/usr/lib/systemd/system/nodm.service
-}

Copied: nodm/repos/community-i686/PKGBUILD (from rev 168938, 
nodm/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD                             (rev 0)
+++ community-i686/PKGBUILD     2016-03-31 00:47:18 UTC (rev 168939)
@@ -0,0 +1,36 @@
+# Maintainer: Sven-Hendrik Haase <[email protected]>
+# Contributor: Roel Gerrits <[email protected]>
+pkgname=nodm
+pkgver=0.12
+pkgrel=1
+pkgdesc='X display manager for automatic logins'
+arch=('i686' 'x86_64')
+url='http://enricozini.org/sw/nodm/'
+license=('GPL')
+depends=('pam' 'xorg-xinit')
+makedepends=('help2man')
+backup=('etc/nodm.conf')
+source=("https://github.com/spanezz/nodm/archive/debian/${pkgver}-${pkgrel}.tar.gz";
+       "nodm.conf"
+       "nodm.service"
+       "norestart.patch")
+md5sums=('a3d2c56e639abd8b626a5f5c016ac813'
+         '9a372ab7dcf281963d972ebb9486b605'
+         '2660ea3446841ade64db351ab639101c'
+         '5076b2fe19551c42e3f5cd8bf445927f')
+
+build() {
+       cd "${srcdir}/${pkgname}-debian-${pkgver}-${pkgrel}"
+
+    ./autogen.sh
+       ./configure --prefix=/usr/
+       make
+}
+
+package() {
+       cd "${srcdir}/${pkgname}-debian-${pkgver}-${pkgrel}"
+
+       install -Dm755 nodm ${pkgdir}/usr/bin/nodm
+       install -Dm644 ../nodm.conf ${pkgdir}/etc/nodm.conf
+       install -Dm644 ../nodm.service 
${pkgdir}/usr/lib/systemd/system/nodm.service
+}

Deleted: community-i686/nodm.conf
===================================================================
--- community-i686/nodm.conf    2016-03-31 00:47:07 UTC (rev 168938)
+++ community-i686/nodm.conf    2016-03-31 00:47:18 UTC (rev 168939)
@@ -1,22 +0,0 @@
-# nodm configuration file
-
-# Controls the user that is used to automatically log in
-NODM_USER='{user}'
-
-# Options to pass to the X server (for example: "vt7 -nolisten tcp")
-NODM_X_OPTIONS='vt7 -nolisten tcp'
-
-# Minimum time (in seconds) that a session should last in order for nodm to
-# decide that it has not quit too soon.  If an X session will run for less than
-# this time, nodm will wait an increasing bit of time before restarting it.
-NODM_MIN_SESSION_TIME=60
-
-# Restart session after it ending?
-NODM_RESTART_SESSION=0
-
-# Path to the xinit program
-NODM_XINIT='/usr/bin/xinit'
-
-# Path to the X session script (useful if using xinit instead of startx).
-# NOTE: This file needs to be executable!
-NODM_XSESSION='/home/{user}/.xinitrc'

Copied: nodm/repos/community-i686/nodm.conf (from rev 168938, 
nodm/trunk/nodm.conf)
===================================================================
--- community-i686/nodm.conf                            (rev 0)
+++ community-i686/nodm.conf    2016-03-31 00:47:18 UTC (rev 168939)
@@ -0,0 +1,22 @@
+# nodm configuration file
+
+# Controls the user that is used to automatically log in
+NODM_USER='{user}'
+
+# Options to pass to the X server (for example: "vt7 -nolisten tcp")
+NODM_X_OPTIONS='vt7 -nolisten tcp'
+
+# Minimum time (in seconds) that a session should last in order for nodm to
+# decide that it has not quit too soon.  If an X session will run for less than
+# this time, nodm will wait an increasing bit of time before restarting it.
+NODM_MIN_SESSION_TIME=60
+
+# Restart session after it ending?
+NODM_RESTART_SESSION=0
+
+# Path to the xinit program
+NODM_XINIT='/usr/bin/xinit'
+
+# Path to the X session script (useful if using xinit instead of startx).
+# NOTE: This file needs to be executable!
+NODM_XSESSION='/home/{user}/.xinitrc'

Deleted: community-i686/nodm.service
===================================================================
--- community-i686/nodm.service 2016-03-31 00:47:07 UTC (rev 168938)
+++ community-i686/nodm.service 2016-03-31 00:47:18 UTC (rev 168939)
@@ -1,9 +0,0 @@
-[Unit]
-Description=nodm display manager
-
-[Service]
-EnvironmentFile=/etc/nodm.conf
-ExecStart=/usr/bin/nodm
-
-[Install]
-WantedBy=multi-user.target

Copied: nodm/repos/community-i686/nodm.service (from rev 168938, 
nodm/trunk/nodm.service)
===================================================================
--- community-i686/nodm.service                         (rev 0)
+++ community-i686/nodm.service 2016-03-31 00:47:18 UTC (rev 168939)
@@ -0,0 +1,9 @@
+[Unit]
+Description=nodm display manager
+
+[Service]
+EnvironmentFile=/etc/nodm.conf
+ExecStart=/usr/bin/nodm
+
+[Install]
+WantedBy=multi-user.target

Deleted: community-i686/norestart.patch
===================================================================
--- community-i686/norestart.patch      2016-03-31 00:47:07 UTC (rev 168938)
+++ community-i686/norestart.patch      2016-03-31 00:47:18 UTC (rev 168939)
@@ -1,60 +0,0 @@
-diff -aur nodm-0.7/nodm.c nodm-0.7-new/nodm.c
---- nodm-0.7/nodm.c    2009-07-26 20:36:14.000000000 +0200
-+++ nodm-0.7-new/nodm.c        2011-03-02 15:19:23.960000382 +0100
-@@ -427,8 +427,10 @@
-  * @param mst
-  *   The minimum time (in seconds) that a session should last to be considered
-  *   successful
-+ * @param xrestart
-+ *   Boolean option whether to restart X or not
-  */
--void run_and_restart(const char* xinit, const char* xsession, const char* 
xoptions, int mst)
-+void run_and_restart(const char* xinit, const char* xsession, const char* 
xoptions, int mst, int xrestart)
- {
-       static int retry_times[] = { 0, 0, 30, 30, 60, 60, -1 };
-       int restart_count = 0;
-@@ -446,8 +448,7 @@
-       args[2] = command;
-       args[3] = 0;
- 
--      while (1)
--      {
-+      do {
-               /* Run the X server */
-               time_t begin = time(NULL);
-               time_t end;
-@@ -470,7 +471,7 @@
-               /* Sleep a bit if the session was too short */
-               sleep(retry_times[restart_count]);
-               syslog (LOG_INFO, "Restarting session for %s", name);
--      }
-+      } while (xrestart);
- }
- 
- /*
-@@ -525,6 +526,7 @@
-       int mst;
-       int vt_fd = -1;
-       int vt_num;
-+      int xrestart = 0;
- 
-       /* Parse command line options */
-       while (1)
-@@ -576,6 +578,8 @@
-       /* Read the configuration from the environment */
-       cp = getenv("NODM_MIN_SESSION_TIME");
-       mst = cp ? atoi(cp) : 60;
-+      cp = getenv("NODM_RESTART_SESSION");
-+    xrestart = cp ? atoi(cp) : 0;
-       string_from_env(xinit, "NODM_XINIT", "/usr/bin/xinit");
-       string_from_env(xoptions, "NODM_X_OPTIONS", "");
- 
-@@ -585,7 +589,7 @@
-               snprintf(xoptions1, BUFSIZ, "vt%d %s", vt_num, xoptions);
- 
-       setenv("NODM_RUN_SESSION", "1", 1);
--      run_and_restart(xinit, opt_session, xoptions1, mst);
-+      run_and_restart(xinit, opt_session, xoptions1, mst, xrestart);
- 
-       close(vt_fd);
- 

Copied: nodm/repos/community-i686/norestart.patch (from rev 168938, 
nodm/trunk/norestart.patch)
===================================================================
--- community-i686/norestart.patch                              (rev 0)
+++ community-i686/norestart.patch      2016-03-31 00:47:18 UTC (rev 168939)
@@ -0,0 +1,60 @@
+diff -aur nodm-0.7/nodm.c nodm-0.7-new/nodm.c
+--- nodm-0.7/nodm.c    2009-07-26 20:36:14.000000000 +0200
++++ nodm-0.7-new/nodm.c        2011-03-02 15:19:23.960000382 +0100
+@@ -427,8 +427,10 @@
+  * @param mst
+  *   The minimum time (in seconds) that a session should last to be considered
+  *   successful
++ * @param xrestart
++ *   Boolean option whether to restart X or not
+  */
+-void run_and_restart(const char* xinit, const char* xsession, const char* 
xoptions, int mst)
++void run_and_restart(const char* xinit, const char* xsession, const char* 
xoptions, int mst, int xrestart)
+ {
+       static int retry_times[] = { 0, 0, 30, 30, 60, 60, -1 };
+       int restart_count = 0;
+@@ -446,8 +448,7 @@
+       args[2] = command;
+       args[3] = 0;
+ 
+-      while (1)
+-      {
++      do {
+               /* Run the X server */
+               time_t begin = time(NULL);
+               time_t end;
+@@ -470,7 +471,7 @@
+               /* Sleep a bit if the session was too short */
+               sleep(retry_times[restart_count]);
+               syslog (LOG_INFO, "Restarting session for %s", name);
+-      }
++      } while (xrestart);
+ }
+ 
+ /*
+@@ -525,6 +526,7 @@
+       int mst;
+       int vt_fd = -1;
+       int vt_num;
++      int xrestart = 0;
+ 
+       /* Parse command line options */
+       while (1)
+@@ -576,6 +578,8 @@
+       /* Read the configuration from the environment */
+       cp = getenv("NODM_MIN_SESSION_TIME");
+       mst = cp ? atoi(cp) : 60;
++      cp = getenv("NODM_RESTART_SESSION");
++    xrestart = cp ? atoi(cp) : 0;
+       string_from_env(xinit, "NODM_XINIT", "/usr/bin/xinit");
+       string_from_env(xoptions, "NODM_X_OPTIONS", "");
+ 
+@@ -585,7 +589,7 @@
+               snprintf(xoptions1, BUFSIZ, "vt%d %s", vt_num, xoptions);
+ 
+       setenv("NODM_RUN_SESSION", "1", 1);
+-      run_and_restart(xinit, opt_session, xoptions1, mst);
++      run_and_restart(xinit, opt_session, xoptions1, mst, xrestart);
+ 
+       close(vt_fd);
+ 

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD   2016-03-31 00:47:07 UTC (rev 168938)
+++ community-x86_64/PKGBUILD   2016-03-31 00:47:18 UTC (rev 168939)
@@ -1,35 +0,0 @@
-# Maintainer: Sven-Hendrik Haase <[email protected]>
-# Contributor: Roel Gerrits <[email protected]>
-pkgname=nodm
-pkgver=0.7
-pkgrel=1
-pkgdesc='X display manager for automatic logins'
-arch=('i686' 'x86_64')
-url='http://enricozini.org/sw/nodm/'
-license=('GPL')
-depends=('pam' 'xorg-xinit')
-makedepends=('help2man')
-backup=('etc/nodm.conf')
-source=("http://enricozini.org/sw/nodm/$pkgname-$pkgver.tar.gz";
-       "nodm.conf"
-       "nodm.service"
-       "norestart.patch")
-md5sums=('6a569e9be7baf56de5c5813483d0357c'
-         '9a372ab7dcf281963d972ebb9486b605'
-         '2660ea3446841ade64db351ab639101c'
-         '5076b2fe19551c42e3f5cd8bf445927f')
-
-build() {
-       cd "$srcdir/$pkgname-$pkgver"
-
-       ./configure --prefix=/usr/
-       make
-}
-
-package() {
-       cd "$srcdir/$pkgname-$pkgver"
-
-       install -Dm755 nodm $pkgdir/usr/bin/nodm
-       install -Dm644 ../nodm.conf $pkgdir/etc/nodm.conf
-       install -Dm644 ../nodm.service 
$pkgdir/usr/lib/systemd/system/nodm.service
-}

Copied: nodm/repos/community-x86_64/PKGBUILD (from rev 168938, 
nodm/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD                           (rev 0)
+++ community-x86_64/PKGBUILD   2016-03-31 00:47:18 UTC (rev 168939)
@@ -0,0 +1,36 @@
+# Maintainer: Sven-Hendrik Haase <[email protected]>
+# Contributor: Roel Gerrits <[email protected]>
+pkgname=nodm
+pkgver=0.12
+pkgrel=1
+pkgdesc='X display manager for automatic logins'
+arch=('i686' 'x86_64')
+url='http://enricozini.org/sw/nodm/'
+license=('GPL')
+depends=('pam' 'xorg-xinit')
+makedepends=('help2man')
+backup=('etc/nodm.conf')
+source=("https://github.com/spanezz/nodm/archive/debian/${pkgver}-${pkgrel}.tar.gz";
+       "nodm.conf"
+       "nodm.service"
+       "norestart.patch")
+md5sums=('a3d2c56e639abd8b626a5f5c016ac813'
+         '9a372ab7dcf281963d972ebb9486b605'
+         '2660ea3446841ade64db351ab639101c'
+         '5076b2fe19551c42e3f5cd8bf445927f')
+
+build() {
+       cd "${srcdir}/${pkgname}-debian-${pkgver}-${pkgrel}"
+
+    ./autogen.sh
+       ./configure --prefix=/usr/
+       make
+}
+
+package() {
+       cd "${srcdir}/${pkgname}-debian-${pkgver}-${pkgrel}"
+
+       install -Dm755 nodm ${pkgdir}/usr/bin/nodm
+       install -Dm644 ../nodm.conf ${pkgdir}/etc/nodm.conf
+       install -Dm644 ../nodm.service 
${pkgdir}/usr/lib/systemd/system/nodm.service
+}

Deleted: community-x86_64/nodm.conf
===================================================================
--- community-x86_64/nodm.conf  2016-03-31 00:47:07 UTC (rev 168938)
+++ community-x86_64/nodm.conf  2016-03-31 00:47:18 UTC (rev 168939)
@@ -1,22 +0,0 @@
-# nodm configuration file
-
-# Controls the user that is used to automatically log in
-NODM_USER='{user}'
-
-# Options to pass to the X server (for example: "vt7 -nolisten tcp")
-NODM_X_OPTIONS='vt7 -nolisten tcp'
-
-# Minimum time (in seconds) that a session should last in order for nodm to
-# decide that it has not quit too soon.  If an X session will run for less than
-# this time, nodm will wait an increasing bit of time before restarting it.
-NODM_MIN_SESSION_TIME=60
-
-# Restart session after it ending?
-NODM_RESTART_SESSION=0
-
-# Path to the xinit program
-NODM_XINIT='/usr/bin/xinit'
-
-# Path to the X session script (useful if using xinit instead of startx).
-# NOTE: This file needs to be executable!
-NODM_XSESSION='/home/{user}/.xinitrc'

Copied: nodm/repos/community-x86_64/nodm.conf (from rev 168938, 
nodm/trunk/nodm.conf)
===================================================================
--- community-x86_64/nodm.conf                          (rev 0)
+++ community-x86_64/nodm.conf  2016-03-31 00:47:18 UTC (rev 168939)
@@ -0,0 +1,22 @@
+# nodm configuration file
+
+# Controls the user that is used to automatically log in
+NODM_USER='{user}'
+
+# Options to pass to the X server (for example: "vt7 -nolisten tcp")
+NODM_X_OPTIONS='vt7 -nolisten tcp'
+
+# Minimum time (in seconds) that a session should last in order for nodm to
+# decide that it has not quit too soon.  If an X session will run for less than
+# this time, nodm will wait an increasing bit of time before restarting it.
+NODM_MIN_SESSION_TIME=60
+
+# Restart session after it ending?
+NODM_RESTART_SESSION=0
+
+# Path to the xinit program
+NODM_XINIT='/usr/bin/xinit'
+
+# Path to the X session script (useful if using xinit instead of startx).
+# NOTE: This file needs to be executable!
+NODM_XSESSION='/home/{user}/.xinitrc'

Deleted: community-x86_64/nodm.service
===================================================================
--- community-x86_64/nodm.service       2016-03-31 00:47:07 UTC (rev 168938)
+++ community-x86_64/nodm.service       2016-03-31 00:47:18 UTC (rev 168939)
@@ -1,9 +0,0 @@
-[Unit]
-Description=nodm display manager
-
-[Service]
-EnvironmentFile=/etc/nodm.conf
-ExecStart=/usr/bin/nodm
-
-[Install]
-WantedBy=multi-user.target

Copied: nodm/repos/community-x86_64/nodm.service (from rev 168938, 
nodm/trunk/nodm.service)
===================================================================
--- community-x86_64/nodm.service                               (rev 0)
+++ community-x86_64/nodm.service       2016-03-31 00:47:18 UTC (rev 168939)
@@ -0,0 +1,9 @@
+[Unit]
+Description=nodm display manager
+
+[Service]
+EnvironmentFile=/etc/nodm.conf
+ExecStart=/usr/bin/nodm
+
+[Install]
+WantedBy=multi-user.target

Deleted: community-x86_64/norestart.patch
===================================================================
--- community-x86_64/norestart.patch    2016-03-31 00:47:07 UTC (rev 168938)
+++ community-x86_64/norestart.patch    2016-03-31 00:47:18 UTC (rev 168939)
@@ -1,60 +0,0 @@
-diff -aur nodm-0.7/nodm.c nodm-0.7-new/nodm.c
---- nodm-0.7/nodm.c    2009-07-26 20:36:14.000000000 +0200
-+++ nodm-0.7-new/nodm.c        2011-03-02 15:19:23.960000382 +0100
-@@ -427,8 +427,10 @@
-  * @param mst
-  *   The minimum time (in seconds) that a session should last to be considered
-  *   successful
-+ * @param xrestart
-+ *   Boolean option whether to restart X or not
-  */
--void run_and_restart(const char* xinit, const char* xsession, const char* 
xoptions, int mst)
-+void run_and_restart(const char* xinit, const char* xsession, const char* 
xoptions, int mst, int xrestart)
- {
-       static int retry_times[] = { 0, 0, 30, 30, 60, 60, -1 };
-       int restart_count = 0;
-@@ -446,8 +448,7 @@
-       args[2] = command;
-       args[3] = 0;
- 
--      while (1)
--      {
-+      do {
-               /* Run the X server */
-               time_t begin = time(NULL);
-               time_t end;
-@@ -470,7 +471,7 @@
-               /* Sleep a bit if the session was too short */
-               sleep(retry_times[restart_count]);
-               syslog (LOG_INFO, "Restarting session for %s", name);
--      }
-+      } while (xrestart);
- }
- 
- /*
-@@ -525,6 +526,7 @@
-       int mst;
-       int vt_fd = -1;
-       int vt_num;
-+      int xrestart = 0;
- 
-       /* Parse command line options */
-       while (1)
-@@ -576,6 +578,8 @@
-       /* Read the configuration from the environment */
-       cp = getenv("NODM_MIN_SESSION_TIME");
-       mst = cp ? atoi(cp) : 60;
-+      cp = getenv("NODM_RESTART_SESSION");
-+    xrestart = cp ? atoi(cp) : 0;
-       string_from_env(xinit, "NODM_XINIT", "/usr/bin/xinit");
-       string_from_env(xoptions, "NODM_X_OPTIONS", "");
- 
-@@ -585,7 +589,7 @@
-               snprintf(xoptions1, BUFSIZ, "vt%d %s", vt_num, xoptions);
- 
-       setenv("NODM_RUN_SESSION", "1", 1);
--      run_and_restart(xinit, opt_session, xoptions1, mst);
-+      run_and_restart(xinit, opt_session, xoptions1, mst, xrestart);
- 
-       close(vt_fd);
- 

Copied: nodm/repos/community-x86_64/norestart.patch (from rev 168938, 
nodm/trunk/norestart.patch)
===================================================================
--- community-x86_64/norestart.patch                            (rev 0)
+++ community-x86_64/norestart.patch    2016-03-31 00:47:18 UTC (rev 168939)
@@ -0,0 +1,60 @@
+diff -aur nodm-0.7/nodm.c nodm-0.7-new/nodm.c
+--- nodm-0.7/nodm.c    2009-07-26 20:36:14.000000000 +0200
++++ nodm-0.7-new/nodm.c        2011-03-02 15:19:23.960000382 +0100
+@@ -427,8 +427,10 @@
+  * @param mst
+  *   The minimum time (in seconds) that a session should last to be considered
+  *   successful
++ * @param xrestart
++ *   Boolean option whether to restart X or not
+  */
+-void run_and_restart(const char* xinit, const char* xsession, const char* 
xoptions, int mst)
++void run_and_restart(const char* xinit, const char* xsession, const char* 
xoptions, int mst, int xrestart)
+ {
+       static int retry_times[] = { 0, 0, 30, 30, 60, 60, -1 };
+       int restart_count = 0;
+@@ -446,8 +448,7 @@
+       args[2] = command;
+       args[3] = 0;
+ 
+-      while (1)
+-      {
++      do {
+               /* Run the X server */
+               time_t begin = time(NULL);
+               time_t end;
+@@ -470,7 +471,7 @@
+               /* Sleep a bit if the session was too short */
+               sleep(retry_times[restart_count]);
+               syslog (LOG_INFO, "Restarting session for %s", name);
+-      }
++      } while (xrestart);
+ }
+ 
+ /*
+@@ -525,6 +526,7 @@
+       int mst;
+       int vt_fd = -1;
+       int vt_num;
++      int xrestart = 0;
+ 
+       /* Parse command line options */
+       while (1)
+@@ -576,6 +578,8 @@
+       /* Read the configuration from the environment */
+       cp = getenv("NODM_MIN_SESSION_TIME");
+       mst = cp ? atoi(cp) : 60;
++      cp = getenv("NODM_RESTART_SESSION");
++    xrestart = cp ? atoi(cp) : 0;
+       string_from_env(xinit, "NODM_XINIT", "/usr/bin/xinit");
+       string_from_env(xoptions, "NODM_X_OPTIONS", "");
+ 
+@@ -585,7 +589,7 @@
+               snprintf(xoptions1, BUFSIZ, "vt%d %s", vt_num, xoptions);
+ 
+       setenv("NODM_RUN_SESSION", "1", 1);
+-      run_and_restart(xinit, opt_session, xoptions1, mst);
++      run_and_restart(xinit, opt_session, xoptions1, mst, xrestart);
+ 
+       close(vt_fd);
+ 

Reply via email to