[24362] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r23960 - trunk/debathena/config/cluster-login-config/debian

daemon@ATHENA.MIT.EDU (Evan Broder)
Sun Aug 9 19:28:19 2009

Date: Sun, 9 Aug 2009 19:28:13 -0400
From: Evan Broder <broder@MIT.EDU>
Message-Id: <200908092328.n79NSD3v013805@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: broder
Date: 2009-08-09 19:28:12 -0400 (Sun, 09 Aug 2009)
New Revision: 23960

Added:
   trunk/debathena/config/cluster-login-config/debian/debathena-ttymsg
Modified:
   trunk/debathena/config/cluster-login-config/debian/changelog
   trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.install
   trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst
   trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.prerm
   trunk/debathena/config/cluster-login-config/debian/ttymsg
Log:
In cluster-login-config:
  * Use a persistantly running daemon to keep the ttys open instead of a
    one-time script. (Trac: #307)
  * Make sure the ttymsg job gets kicked when cluster-login-config is
    upgraded.


Modified: trunk/debathena/config/cluster-login-config/debian/changelog
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/changelog	2009-08-09 20:24:30 UTC (rev 23959)
+++ trunk/debathena/config/cluster-login-config/debian/changelog	2009-08-09 23:28:12 UTC (rev 23960)
@@ -1,3 +1,12 @@
+debathena-cluster-login-config (1.14) unstable; urgency=low
+
+  * Use a persistantly running daemon to keep the ttys open instead of a
+    one-time script. (Trac: #307)
+  * Make sure the ttymsg job gets kicked when cluster-login-config is
+    upgraded.
+
+ -- Evan Broder <broder@mit.edu>  Sun, 09 Aug 2009 16:28:08 -0700
+
 debathena-cluster-login-config (1.13.1) unstable; urgency=low
 
   * Ignore failures to reload gdm or stop the tty gettys.

Modified: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.install
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.install	2009-08-09 20:24:30 UTC (rev 23959)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.install	2009-08-09 23:28:12 UTC (rev 23960)
@@ -1,3 +1,4 @@
 debian/athena-root-password usr/sbin
 debian/sshd_not_to_be_run etc/ssh
 debian/ttymsg etc/event.d
+debian/debathena-ttymsg /usr/lib/debathena-cluster-login-config

Modified: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst	2009-08-09 20:24:30 UTC (rev 23959)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst	2009-08-09 23:28:12 UTC (rev 23960)
@@ -35,6 +35,7 @@
         for i in $(seq 1 6); do
             initctl stop "tty$i" >/dev/null 2>&1 || true
         done
+	initctl start ttymsg >/dev/null 2>&1 || true
 
 	# Attempt to initially set the root password.
 	/usr/sbin/athena-root-password

Modified: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.prerm
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.prerm	2009-08-09 20:24:30 UTC (rev 23959)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.prerm	2009-08-09 23:28:12 UTC (rev 23960)
@@ -21,6 +21,8 @@
     remove|upgrade|deconfigure)
         perl -i'' -ne 's%^### (BEGIN|END) debathena-cluster-login-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
 
+	initctl stop ttymsg >/dev/null 2>&1 || true
+
         # Undo our mandatory gconf settings.
         gcsrc=xml:readwrite:/etc/gconf/gconf.xml.mandatory
         gcunset="gconftool-2 --direct --config-source=$gcsrc --unset"

Added: trunk/debathena/config/cluster-login-config/debian/debathena-ttymsg
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-ttymsg	2009-08-09 20:24:30 UTC (rev 23959)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-ttymsg	2009-08-09 23:28:12 UTC (rev 23960)
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+import select
+
+def main():
+    ttys = []
+    for i in xrange(1, 7):
+        ttys.append(open('/dev/tty%d' % i, 'r+'))
+        print >>ttys[-1], 'Press ctrl-alt-F7 to log in'
+
+    select.select([], [], [])
+
+if __name__ == '__main__':
+    main()


Property changes on: trunk/debathena/config/cluster-login-config/debian/debathena-ttymsg
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/debathena/config/cluster-login-config/debian/ttymsg
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/ttymsg	2009-08-09 20:24:30 UTC (rev 23959)
+++ trunk/debathena/config/cluster-login-config/debian/ttymsg	2009-08-09 23:28:12 UTC (rev 23960)
@@ -11,7 +11,5 @@
 stop on runlevel 1
 stop on runlevel 6
 
-script
-m="Press ctrl-alt-F7 to log in"
-for n in 1 2 3 4 5 6; do echo "$m" > /dev/tty$n; done
-end script
+respawn
+exec /usr/lib/debathena-cluster-login-config/debathena-ttymsg


home help back first fref pref prev next nref lref last post