[26700] in Source-Commits

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

/svn/athena r25699 - trunk/debathena/config/lightdm-config/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Sat Aug 4 12:41:15 2012

Date: Sat, 4 Aug 2012 12:41:13 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201208041641.q74GfD5a031934@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2012-08-04 12:41:13 -0400 (Sat, 04 Aug 2012)
New Revision: 25699

Modified:
   trunk/debathena/config/lightdm-config/debian/changelog
   trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
   trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ini
Log:
In lightdm-config:
  * Append the codename to the motd filename, if possible
  * Pick a less stupid default motd filename


Modified: trunk/debathena/config/lightdm-config/debian/changelog
===================================================================
--- trunk/debathena/config/lightdm-config/debian/changelog	2012-08-04 15:47:44 UTC (rev 25698)
+++ trunk/debathena/config/lightdm-config/debian/changelog	2012-08-04 16:41:13 UTC (rev 25699)
@@ -1,3 +1,10 @@
+debathena-lightdm-config (1.5) unstable; urgency=low
+
+  * Append the codename to the motd filename, if possible
+  * Pick a less stupid default motd filename
+
+ -- Jonathan Reed <jdreed@mit.edu>  Sat, 04 Aug 2012 12:41:05 -0400
+
 debathena-lightdm-config (1.4) unstable; urgency=low
 
   * Be clearer about what a DBus error probably means when initiating a

Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter
===================================================================
--- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter	2012-08-04 15:47:44 UTC (rev 25698)
+++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter	2012-08-04 16:41:13 UTC (rev 25699)
@@ -28,7 +28,8 @@
                  "background_image": "/usr/share/debathena-lightdm-config/background.jpg",
                  "base_logo_file": "/usr/share/debathena-lightdm-config/debathena.png",
                  "extra_logo_frames": 8,
-                 "motd_filename": "/afs/athena.mit.edu/system/config/motd/login.94",
+                 "motd_filename": "/afs/athena.mit.edu/system/config/motd/login.debathena",
+                 "append_codename_to_motd": "true",
                  "time_pedantry": "true"}
 
 # See below, and then go cry.
@@ -62,6 +63,11 @@
             self.timePedantry = config.getboolean('DEFAULT', 'time_pedantry')
 
         try:
+            self.appendCodenameToMotd = config.getboolean('Greeter', 'append_codename_to_motd')
+        except:
+            self.appendCodenameToMotd = config.getboolean('DEFAULT', 'append_codename_to_motd')
+
+        try:
             self.minimumUID = config.getint('Greeter', 'minimum_uid')
         except:
             self.minimumUID = config.getint('DEFAULT', 'minimum_uid')
@@ -81,6 +87,13 @@
         # No need to check these, they get checked later.
         self.backgroundImageFile = config.get('Greeter', 'background_image')
         self.motdFilename = config.get('Greeter', 'motd_filename')
+        if self.appendCodenameToMotd:
+            try:
+                codename = subprocess.Popen(["lsb_release", "-s", "-c"], stdout=subprocess.PIPE).communicate()[0]
+                if codename:
+                    self.motdFilename += "." + codename.strip()
+            except OSError:
+                print >>sys.stderr, "Couldn't append codename to motd_filename.  Oh well..."
         self.nologinFile = config.get('Greeter', 'nologin_file')
         
         # Set up and connect to the greeter

Modified: trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ini
===================================================================
--- trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ini	2012-08-04 15:47:44 UTC (rev 25698)
+++ trunk/debathena/config/lightdm-config/debian/debathena-lightdm-greeter.ini	2012-08-04 16:41:13 UTC (rev 25699)
@@ -19,6 +19,9 @@
 extra_logo_frames=8
 # A MOTD file to display at the bottom of the greeter
 # Will be truncated to 10 lines, 80 characters per line
-motd_filename=/afs/athena.mit.edu/system/config/motd/login.94
+motd_filename=/afs/athena.mit.edu/system/config/motd/login.debathena
+# Append a period and the output of "lsb_release -c" to the motd
+# filename?  (If appending fails, it will fallback to motd_filename)
+append_codename_to_motd=true
 # Do you require your time to be measured in seconds? (boolean)
 time_pedantry=true


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