[25451] in Source-Commits

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

/svn/athena r24995 - trunk/debathena/config/gdm-config/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Wed Mar 2 14:02:20 2011

Date: Wed, 2 Mar 2011 14:02:13 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201103021902.p22J2DOF004046@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-03-02 14:02:13 -0500 (Wed, 02 Mar 2011)
New Revision: 24995

Modified:
   trunk/debathena/config/gdm-config/debian/changelog
   trunk/debathena/config/gdm-config/debian/debathena-nologin-monitor
Log:
In gdm-config:
  * Monitor the real file, not a symlink target


Modified: trunk/debathena/config/gdm-config/debian/changelog
===================================================================
--- trunk/debathena/config/gdm-config/debian/changelog	2011-03-02 16:48:36 UTC (rev 24994)
+++ trunk/debathena/config/gdm-config/debian/changelog	2011-03-02 19:02:13 UTC (rev 24995)
@@ -1,8 +1,9 @@
-debathena-gdm-config (1.24.1) unstable; urgency=low
+debathena-gdm-config (1.25) unstable; urgency=low
 
   * Applets shouldn't attempt to steal focus
+  * Monitor the real file, not a symlink target
 
- -- Jonathan Reed <jdreed@mit.edu>  Wed, 23 Feb 2011 20:47:53 -0500
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 02 Mar 2011 14:02:07 -0500
 
 debathena-gdm-config (1.24) unstable; urgency=low
 

Modified: trunk/debathena/config/gdm-config/debian/debathena-nologin-monitor
===================================================================
--- trunk/debathena/config/gdm-config/debian/debathena-nologin-monitor	2011-03-02 16:48:36 UTC (rev 24994)
+++ trunk/debathena/config/gdm-config/debian/debathena-nologin-monitor	2011-03-02 19:02:13 UTC (rev 24995)
@@ -9,6 +9,7 @@
 import gobject
 import sys
 import os
+import subprocess
 
 SM_DBUS_NAME = "org.gnome.SessionManager"
 SM_DBUS_PATH = "/org/gnome/SessionManager"
@@ -28,16 +29,26 @@
         
         self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
         self.window.set_property('can-focus', False)
+        box = gtk.VBox()
         self.label = gtk.Label()
-        self.label.set_markup('<span font_desc="Sans Bold 24">This workstation is temporarily unavailable.  Please use another workstation.</span>')
+        self.label.set_markup('<span font_desc="Sans Bold 24">Software updates are being applied.\n\nThis workstation is temporarily unavailable.\n\nPlease use another workstation.</span>')
         self.label.set_property('can-focus', False)
-        self.window.add(self.label)
+        self.label.set_justify(gtk.JUSTIFY_CENTER)
+        box.pack_start(self.label, True, True, 5)
+        self.window.add(box)
+        self.window.set_size_request(800, 600)
         self.window.set_decorated(False)
         self.window.set_position(gtk.WIN_POS_CENTER)
         self.window.hide()
-        self.gfile = gio.File("/etc/nologin")
-        self.monitor = self.gfile.monitor_file(gio.FILE_MONITOR_NONE, None)
-        self.monitor.connect("changed", self.directory_changed)
+        try:
+            metapackage = subprocess.Popen(["machtype", "-L"], stdout=subprocess.PIPE).communicate()[0].rstrip()
+        except OSError:
+            # Assume cluster
+            metapackage = 'debathena-cluster'
+        if metapackage == 'debathena-cluster':
+            self.gfile = gio.File("/var/run/athena-nologin")
+            self.monitor = self.gfile.monitor_file(gio.FILE_MONITOR_NONE, None)
+            self.monitor.connect("changed", self.directory_changed)
 
     def directory_changed(self, monitor, file1, file2, evt_type):
         # type(evt_type) is <class 'gio._gio.FileMonitorEvent'>


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