[26055] in Source-Commits

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

/svn/athena r25368 - trunk/debathena/config/cupsys-config/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Wed Aug 10 17:56:38 2011

Date: Wed, 10 Aug 2011 17:56:31 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201108102156.p7ALuVSP005849@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-08-10 17:56:31 -0400 (Wed, 10 Aug 2011)
New Revision: 25368

Modified:
   trunk/debathena/config/cupsys-config/debian/changelog
   trunk/debathena/config/cupsys-config/debian/configure-athena-printers
Log:
In cupsys-config:
  * Set the new printer as default if there isn't already a default (Trac:
    #1017)


Modified: trunk/debathena/config/cupsys-config/debian/changelog
===================================================================
--- trunk/debathena/config/cupsys-config/debian/changelog	2011-08-10 20:49:05 UTC (rev 25367)
+++ trunk/debathena/config/cupsys-config/debian/changelog	2011-08-10 21:56:31 UTC (rev 25368)
@@ -1,3 +1,10 @@
+debathena-cupsys-config (1.16) unstable; urgency=low
+
+  * Set the new printer as default if there isn't already a default (Trac:
+    #1017)
+
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 10 Aug 2011 17:56:04 -0400
+
 debathena-cupsys-config (1.15) unstable; urgency=low
 
   * Bump Conflicts statement for new cluster-cups-config

Modified: trunk/debathena/config/cupsys-config/debian/configure-athena-printers
===================================================================
--- trunk/debathena/config/cupsys-config/debian/configure-athena-printers	2011-08-10 20:49:05 UTC (rev 25367)
+++ trunk/debathena/config/cupsys-config/debian/configure-athena-printers	2011-08-10 21:56:31 UTC (rev 25368)
@@ -2,6 +2,7 @@
 
 PHAROS_PRINTERS="mitprint"
 ATHENA_PRINTERS=
+DEFAULT_PRINTER="mitprint"
 PRLIST="/var/lib/debathena-cupsys-config.added_printers"
 
 add_printers() {
@@ -28,6 +29,15 @@
 	    echo "FAILED to add Athena printer $a"
 	fi
     done
+    # Dear CUPS,  
+    # There exist return codes.  Use them.
+    # Love, Debathena
+    if [ "$(lpstat -d)" = "no system default destination" ]; then
+	lpadmin -d mitprint
+    fi
+    # We don't need to deal with this on uninstall.  CUPS is
+    # smart enough (for now, at least) to not retain a default when 
+    # the printer in question is deleted.
 }
 
 del_printers() {


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