[26107] in Source-Commits
Re: /svn/athena r25392 -
daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Sat Sep 3 15:45:41 2011
Date: Sat, 3 Sep 2011 15:45:32 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201108311615.p7VGFkb4000346@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1109031541190.1411@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Wed, 31 Aug 2011, Jonathan D Reed wrote:
> Author: jdreed
> Date: 2011-08-31 12:15:46 -0400 (Wed, 31 Aug 2011)
> New Revision: 25392
>
> Modified:
> trunk/debathena/config/cupsys-config/debian/configure-athena-printers
> Log:
> Remove the for loops and tweak the B&W description
>
> Modified: trunk/debathena/config/cupsys-config/debian/configure-athena-printers
> ===================================================================
> --- trunk/debathena/config/cupsys-config/debian/configure-athena-printers 2011-08-31 16:06:58 UTC (rev 25391)
> +++ trunk/debathena/config/cupsys-config/debian/configure-athena-printers 2011-08-31 16:15:46 UTC (rev 25392)
> @@ -1,39 +1,33 @@
> #!/bin/sh
>
> -PHAROS_BW_PRINTERS="mitprint"
> -PHAROS_COLOR_PRINTERS="mitprint-color"
> ATHENA_PRINTERS=
> DEFAULT_PRINTER="mitprint"
> PRLIST="/var/lib/debathena-cupsys-config.added_printers"
>
> add_printers() {
> rm -f $PRLIST
[for loops removed]
> + lpadmin -p mitprint -E -v lpd://mitprint.mit.edu/bw \
> + -D "Pharos (Monochrome)" \
> + -L "Release jobs from any Pharos B&W printer" \
> + -o printer-is-share=false \
My lpadmin(8) has the more-pleasing-on-the-grammar "printer-is-shared"
with final 'd'. (Also again for color, below.)
> + -m drv:///hpijs.drv/hp-laserjet_9050-hpijs-pcl3.ppd
> + if [ $? != 0 ]; then
I assume you checked that lpadmin does not also always return zero?
We've been bitten a couple times, now ...
-Ben
> + echo "FAILED to add Pharos printer $p"
> + else
> + echo "Added Pharos printer $p"
> + echo "$p" >> $PRLIST
> + fi
> + lpadmin -p mitprint-color -E -v lpd://mitprint.mit.edu/color \
> + -D "Pharos (Color)" \
> + -L "Release jobs from any Pharos Color printer" \
> + -o printer-is-share=false \
> + -m drv:///hpijs.drv/hp-color_laserjet_cp3525-hpijs-pcl3.ppd
> + if [ $? != 0 ]; then
> + echo "FAILED to add Pharos printer $p"
> + else
> + echo "Added Pharos printer $p"
> + echo "$p" >> $PRLIST
> + fi
> for a in $ATHENA_PRINTERS; do
> # Don't clobber queue, this is -cluster
> if add-athena-printer $a; then
>
>