Index: debian/changelog
===================================================================
--- debian/changelog	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/changelog	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,39 @@
+gutenbach (2.03) unstable; urgency=low
+
+  * Update permissions again, to allow everybody to access the server
+
+ -- Jessica Hamrick <jhamrick@mit.edu>  Tue, 08 Jun 2010 19:07:09 -0400
+
+gutenbach (2.02) unstable; urgency=low
+
+  * Fix print server permissions problems such that remote
+  users can user cups-lpq and cups-lprm
+
+ -- Jessica Hamrick <jhamrick@mit.edu>  Mon, 31 May 2010 23:51:52 -0400
+
+gutenbach (2.01) unstable; urgency=low
+
+  * Handle SIGTERM in the gutenbach backend, so jobs don't
+  keep playing even after being dequeued.
+
+ -- Jessica Hamrick <jhamrick@mit.edu>  Mon, 31 May 2010 22:23:53 -0400
+
+gutenbach (2.0) unstable; urgency=low
+
+  * Changed from using LPRng to CUPS
+
+ -- Jessica Hamrick <jhamrick@mit.edu>  Thu, 13 May 2010 17:40:53 -0400
+
+gutenbach (1.01) unstable; urgency=low
+
+  * Implemented debconf to retrieve printer and zephyr class names.
+  * Made uninstall cleaner (and when you purge, it purges
+  configuration files and changes)
+
+ -- Jessica Hamrick <jhamrick@mit.edu>  Wed, 16 Sep 2009 15:58:40 -0400
+
+gutenbach (1.0) unstable; urgency=low
+
+  * Initial release.
+
+ -- Jessica Hamrick <jhamrick@mit.edu>  Tue, 08 Sep 2009 18:38:12 -0400
Index: debian/compat
===================================================================
--- debian/compat	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/compat	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,1 @@
+5
Index: debian/control
===================================================================
--- debian/control	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/control	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,16 @@
+Source: gutenbach
+Section: sound
+Priority: extra
+Maintainer: Jessica Hamrick <jhamrick@mit.edu>
+Build-Depends: cdbs, debhelper (>= 7.4.15ubuntu1)
+Standards-Version: 3.8.4
+
+Package: gutenbach
+Architecture: all
+Pre-Depends: debconf
+Depends: ${shlibs:Depends}, ${misc:Depends}, mplayer, libimage-exiftool-perl, cups, debathena-cupsys-config, sysv-rc, adduser, debathena-zephyr-config, libzephyr4-krb5, alsa-base
+Conflicts: pulseaudio
+Provides: pulseaudio
+Description: Server for playing music files from a remote machine
+ Allows remote machines to play music files on this machine
+ by "printing" them with the Common UNIX Printing System (CUPS).
Index: debian/copyright
===================================================================
--- debian/copyright	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/copyright	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,1 @@
+Copyright 2009 Jessica Hamrick
Index: debian/gutenbach.config
===================================================================
--- debian/gutenbach.config	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/gutenbach.config	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,29 @@
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+printername=""
+zephyrclass=""
+hostname=""
+
+if [ -e /usr/lib/gutenbach/config/printername ]; then
+    printername=$(cat /usr/lib/gutenbach/config/printername)
+    db_set gutenbach/printername "$printername"
+fi
+
+if [ -e /usr/lib/gutenbach/config/zephyrclass ]; then
+    zephyrclass=$(cat /usr/lib/gutenbach/config/zephyrclass)
+    db_set gutenbach/zephyrclass "$zephyrclass"
+fi
+
+if [ -e /usr/lib/gutenbach/config/hostname ]; then
+    hostname=$(cat /usr/lib/gutenbach/config/hostname)
+    db_set gutenbach/hostname "$hostname"
+fi
+
+db_input high gutenbach/printername || true
+db_input high gutenbach/zephyrclass || true
+db_input high gutenbach/hostname || true
+db_go || true
+
Index: debian/gutenbach.dirs
===================================================================
--- debian/gutenbach.dirs	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/gutenbach.dirs	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,5 @@
+usr/lib/gutenbach
+usr/lib/gutenbach/inst
+usr/lib/gutenbach/rm
+usr/lib/gutenbach/config
+etc/
Index: debian/gutenbach.init
===================================================================
--- debian/gutenbach.init	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/gutenbach.init	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,49 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          gutenbach
+# Required-Start:    $remote_fs $syslog cups
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Starts lpd for gutenbach.
+# Description:       Starts lpd for gutenbach and creates
+#  files for use by gutenbach.
+### END INIT INFO
+
+case "$1" in
+  start)
+    mkdir /var/run/gutenbach
+    touch /var/run/gutenbach/status
+    chmod 0777 /var/run/gutenbach/status
+    
+    ;;
+
+  stop)
+    
+    if [ -e /var/run/gutenbach ]; then
+	rm -r /var/run/gutenbach
+    fi
+
+    ;;
+
+  restart)
+    
+    if [ -e /var/run/gutenbach ]; then
+	rm -r /var/run/gutenbach
+    fi
+
+
+    mkdir /var/run/gutenbach
+    touch /var/run/gutenbach/status
+    chmod 0777 /var/run/gutenbach/status
+
+    ;;
+
+  reload|force-reload|status)
+    ;;
+
+  *)
+    echo "Usage: /etc/init.d/gutenbach {start|stop|restart}" >&2
+    exit 1
+    ;;
+esac
Index: debian/gutenbach.install
===================================================================
--- debian/gutenbach.install	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/gutenbach.install	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,4 @@
+debian/lib/gutenbach /usr/lib/cups/backend
+debian/lib/* /usr/lib/gutenbach/
+debian/inst/* /usr/lib/gutenbach/inst/
+debian/rm/* /usr/lib/gutenbach/rm/
Index: debian/gutenbach.postinst
===================================================================
--- debian/gutenbach.postinst	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/gutenbach.postinst	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,65 @@
+#!/bin/sh
+# postinst script for gutenbach
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+. /usr/share/debconf/confmodule
+
+case "$1" in
+    configure|reconfigure)
+	if [ ! -d /usr/lib/gutenbach/config ]; then
+	    mkdir /usr/lib/gutenbach/config
+	fi
+
+	db_get gutenbach/zephyrclass
+	echo "$RET" > /usr/lib/gutenbach/config/zephyrclass
+	db_get gutenbach/printername
+	echo "$RET" > /usr/lib/gutenbach/config/printername
+	db_get gutenbach/hostname
+	echo "$RET" > /usr/lib/gutenbach/config/hostname
+
+	chmod +x /usr/lib/gutenbach/inst/create-filter-config
+	chmod +x /usr/lib/gutenbach/inst/cups-add-printer
+	chmod +x /usr/lib/gutenbach/inst/cups-set-perms
+	/usr/lib/gutenbach/inst/create-filter-config
+	/usr/lib/gutenbach/inst/cups-add-printer
+	/usr/lib/gutenbach/inst/cups-set-perms
+
+
+	inaudio=$(groups lp | grep audio || true)
+	if [ -z "$inaudio" ]; then
+	    adduser lp audio
+	fi
+
+	db_stop
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Index: debian/gutenbach.postrm
===================================================================
--- debian/gutenbach.postrm	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/gutenbach.postrm	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,54 @@
+#!/bin/sh
+# postrm script for gutenbach
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <overwriter>
+#          <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+	if [ "$1" = "purge" ]; then
+	    if [ -d /usr/lib/gutenbach ]; then
+		echo "Removing /usr/lib/gutenbach/..." >&2
+		rm -r /usr/lib/gutenbach
+	    fi
+
+	    if [ -e /usr/share/debconf/confmodule ]; then
+		echo "Purging debconf database entries..." >&2
+		. /usr/share/debconf/confmodule
+		db_purge
+	    fi
+	fi
+
+	inaudio=$(groups daemon | grep audio || true)
+	if [ ! -z "$inaudio" ]; then
+	    deluser daemon audio
+	fi
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Index: debian/gutenbach.preinst
===================================================================
--- debian/gutenbach.preinst	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/gutenbach.preinst	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,36 @@
+#!/bin/sh
+# preinst script for gutenbach
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+. /usr/share/debconf/confmodule
+
+case "$1" in
+    install|upgrade)
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Index: debian/gutenbach.prerm
===================================================================
--- debian/gutenbach.prerm	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/gutenbach.prerm	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,48 @@
+#!/bin/sh
+# prerm script for gutenbach
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+
+	if [ -e /usr/lib/gutenbach/rm/cups-revert-perms ]; then
+	    chmod +x /usr/lib/gutenbach/rm/cups-revert-perms
+	    /usr/lib/gutenbach/rm/cups-revert-perms
+	fi
+
+	if [ -e /usr/lib/gutenbach/rm/cups-remove-printer ]; then
+	    chmod +x /usr/lib/gutenbach/rm/cups-remove-printer
+	    /usr/lib/gutenbach/rm/cups-remove-printer
+	fi
+    ;;
+
+    failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Index: debian/gutenbach.templates
===================================================================
--- debian/gutenbach.templates	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/gutenbach.templates	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,25 @@
+Template: gutenbach/printername
+Type: string
+_Description: Your gutenbach printer name:
+ gutenbach creates a printer to which you can print music
+ files.  gutenbach needs to know what you want to call the 
+ printer, and then after installation, you will be able
+ to do:
+ lpr -Pprintername@hostname your-music-file-.mp3 
+
+Template: gutenbach/zephyrclass
+Type: string
+_Description: Your gutenbach zephyr class:
+ When gutenbach plays a song, it sends a message to a zephyr
+ class with the song information (title, artist, album,
+ etc).  Please specify which class you would you these 
+ zephyrs to be sent to.  If you don't know what this is,
+ or you don't want zephyrs to be sent, just leave this 
+ field blank.
+
+Template: gutenbach/hostname
+Type: string
+_Description: The hostname to be displayed:
+ When gutenbach sends a zephyr, it will display the hostname.
+ If your hostname is particularly long, you may want to set
+ this to an abbreviation or something else shorter.
Index: debian/po/POTFILES.in
===================================================================
--- debian/po/POTFILES.in	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/po/POTFILES.in	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,1 @@
+[type: gettext/rfc822deb] gutenbach.templates
Index: debian/po/templates.pot
===================================================================
--- debian/po/templates.pot	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/po/templates.pot	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,64 @@
+# Gutenbach Translation File.
+#
+# This file is distributed under the same license as the GUTENBACH package.
+# Jessica B. Hamrick <jhamrick@mit.edu>, 2010.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: gutenbach@mit.edu\n"
+"POT-Creation-Date: 2010-06-14 18:36-0600\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: string
+#. Description
+#: ../gutenbach.templates:1001
+msgid "Your gutenbach printer name:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../gutenbach.templates:1001
+msgid ""
+"gutenbach creates a printer to which you can print music files.  gutenbach "
+"needs to know what you want to call the  printer, and then after "
+"installation, you will be able to do: lpr -Pprintername@hostname your-music-"
+"file-.mp3"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../gutenbach.templates:2001
+msgid "Your gutenbach zephyr class:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../gutenbach.templates:2001
+msgid ""
+"When gutenbach plays a song, it sends a message to a zephyr class with the "
+"song information (title, artist, album, etc).  Please specify which class "
+"you would you these  zephyrs to be sent to.  If you don't know what this is, "
+"or you don't want zephyrs to be sent, just leave this  field blank."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../gutenbach.templates:3001
+msgid "The hostname to be displayed:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../gutenbach.templates:3001
+msgid ""
+"When gutenbach sends a zephyr, it will display the hostname. If your "
+"hostname is particularly long, you may want to set this to an abbreviation "
+"or something else shorter."
+msgstr ""
Index: debian/rules
===================================================================
--- debian/rules	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/rules	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
Index: debian/source/format
===================================================================
--- debian/source/format	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ debian/source/format	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,1 @@
+1.0
Index: tenbach/debian/changelog
===================================================================
--- gutenbach/debian/changelog	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,39 +1,0 @@
-gutenbach (2.03) unstable; urgency=low
-
-  * Update permissions again, to allow everybody to access the server
-
- -- Jessica Hamrick <jhamrick@mit.edu>  Tue, 08 Jun 2010 19:07:09 -0400
-
-gutenbach (2.02) unstable; urgency=low
-
-  * Fix print server permissions problems such that remote
-  users can user cups-lpq and cups-lprm
-
- -- Jessica Hamrick <jhamrick@mit.edu>  Mon, 31 May 2010 23:51:52 -0400
-
-gutenbach (2.01) unstable; urgency=low
-
-  * Handle SIGTERM in the gutenbach backend, so jobs don't
-  keep playing even after being dequeued.
-
- -- Jessica Hamrick <jhamrick@mit.edu>  Mon, 31 May 2010 22:23:53 -0400
-
-gutenbach (2.0) unstable; urgency=low
-
-  * Changed from using LPRng to CUPS
-
- -- Jessica Hamrick <jhamrick@mit.edu>  Thu, 13 May 2010 17:40:53 -0400
-
-gutenbach (1.01) unstable; urgency=low
-
-  * Implemented debconf to retrieve printer and zephyr class names.
-  * Made uninstall cleaner (and when you purge, it purges
-  configuration files and changes)
-
- -- Jessica Hamrick <jhamrick@mit.edu>  Wed, 16 Sep 2009 15:58:40 -0400
-
-gutenbach (1.0) unstable; urgency=low
-
-  * Initial release.
-
- -- Jessica Hamrick <jhamrick@mit.edu>  Tue, 08 Sep 2009 18:38:12 -0400
Index: tenbach/debian/compat
===================================================================
--- gutenbach/debian/compat	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,1 +1,0 @@
-5
Index: tenbach/debian/control
===================================================================
--- gutenbach/debian/control	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,16 +1,0 @@
-Source: gutenbach
-Section: sound
-Priority: extra
-Maintainer: Jessica Hamrick <jhamrick@mit.edu>
-Build-Depends: cdbs, debhelper (>= 7.4.15ubuntu1)
-Standards-Version: 3.8.4
-
-Package: gutenbach
-Architecture: all
-Pre-Depends: debconf
-Depends: ${shlibs:Depends}, ${misc:Depends}, mplayer, libimage-exiftool-perl, cups, debathena-cupsys-config, sysv-rc, adduser, debathena-zephyr-config, libzephyr4-krb5, alsa-base
-Conflicts: pulseaudio
-Provides: pulseaudio
-Description: Server for playing music files from a remote machine
- Allows remote machines to play music files on this machine
- by "printing" them with the Common UNIX Printing System (CUPS).
Index: tenbach/debian/copyright
===================================================================
--- gutenbach/debian/copyright	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,1 +1,0 @@
-Copyright 2009 Jessica Hamrick
Index: tenbach/debian/gutenbach.config
===================================================================
--- gutenbach/debian/gutenbach.config	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#!/bin/sh -e
-
-# Source debconf library.
-. /usr/share/debconf/confmodule
-
-printername=""
-zephyrclass=""
-hostname=""
-
-if [ -e /usr/lib/gutenbach/config/printername ]; then
-    printername=$(cat /usr/lib/gutenbach/config/printername)
-    db_set gutenbach/printername "$printername"
-fi
-
-if [ -e /usr/lib/gutenbach/config/zephyrclass ]; then
-    zephyrclass=$(cat /usr/lib/gutenbach/config/zephyrclass)
-    db_set gutenbach/zephyrclass "$zephyrclass"
-fi
-
-if [ -e /usr/lib/gutenbach/config/hostname ]; then
-    hostname=$(cat /usr/lib/gutenbach/config/hostname)
-    db_set gutenbach/hostname "$hostname"
-fi
-
-db_input high gutenbach/printername || true
-db_input high gutenbach/zephyrclass || true
-db_input high gutenbach/hostname || true
-db_go || true
-
Index: tenbach/debian/gutenbach.dirs
===================================================================
--- gutenbach/debian/gutenbach.dirs	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,5 +1,0 @@
-usr/lib/gutenbach
-usr/lib/gutenbach/inst
-usr/lib/gutenbach/rm
-usr/lib/gutenbach/config
-etc/
Index: tenbach/debian/gutenbach.init
===================================================================
--- gutenbach/debian/gutenbach.init	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,49 +1,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          gutenbach
-# Required-Start:    $remote_fs $syslog cups
-# Required-Stop:     $remote_fs $syslog
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Starts lpd for gutenbach.
-# Description:       Starts lpd for gutenbach and creates
-#  files for use by gutenbach.
-### END INIT INFO
-
-case "$1" in
-  start)
-    mkdir /var/run/gutenbach
-    touch /var/run/gutenbach/status
-    chmod 0777 /var/run/gutenbach/status
-    
-    ;;
-
-  stop)
-    
-    if [ -e /var/run/gutenbach ]; then
-	rm -r /var/run/gutenbach
-    fi
-
-    ;;
-
-  restart)
-    
-    if [ -e /var/run/gutenbach ]; then
-	rm -r /var/run/gutenbach
-    fi
-
-
-    mkdir /var/run/gutenbach
-    touch /var/run/gutenbach/status
-    chmod 0777 /var/run/gutenbach/status
-
-    ;;
-
-  reload|force-reload|status)
-    ;;
-
-  *)
-    echo "Usage: /etc/init.d/gutenbach {start|stop|restart}" >&2
-    exit 1
-    ;;
-esac
Index: tenbach/debian/gutenbach.install
===================================================================
--- gutenbach/debian/gutenbach.install	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,4 +1,0 @@
-debian/lib/gutenbach /usr/lib/cups/backend
-debian/lib/* /usr/lib/gutenbach/
-debian/inst/* /usr/lib/gutenbach/inst/
-debian/rm/* /usr/lib/gutenbach/rm/
Index: tenbach/debian/gutenbach.postinst
===================================================================
--- gutenbach/debian/gutenbach.postinst	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#!/bin/sh
-# postinst script for gutenbach
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <postinst> `abort-remove'
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-. /usr/share/debconf/confmodule
-
-case "$1" in
-    configure|reconfigure)
-	if [ ! -d /usr/lib/gutenbach/config ]; then
-	    mkdir /usr/lib/gutenbach/config
-	fi
-
-	db_get gutenbach/zephyrclass
-	echo "$RET" > /usr/lib/gutenbach/config/zephyrclass
-	db_get gutenbach/printername
-	echo "$RET" > /usr/lib/gutenbach/config/printername
-	db_get gutenbach/hostname
-	echo "$RET" > /usr/lib/gutenbach/config/hostname
-
-	chmod +x /usr/lib/gutenbach/inst/create-filter-config
-	chmod +x /usr/lib/gutenbach/inst/cups-add-printer
-	chmod +x /usr/lib/gutenbach/inst/cups-set-perms
-	/usr/lib/gutenbach/inst/create-filter-config
-	/usr/lib/gutenbach/inst/cups-add-printer
-	/usr/lib/gutenbach/inst/cups-set-perms
-
-
-	inaudio=$(groups lp | grep audio || true)
-	if [ -z "$inaudio" ]; then
-	    adduser lp audio
-	fi
-
-	db_stop
-    ;;
-
-    abort-upgrade|abort-remove|abort-deconfigure)
-    ;;
-
-    *)
-        echo "postinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
Index: tenbach/debian/gutenbach.postrm
===================================================================
--- gutenbach/debian/gutenbach.postrm	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#!/bin/sh
-# postrm script for gutenbach
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <postrm> `remove'
-#        * <postrm> `purge'
-#        * <old-postrm> `upgrade' <new-version>
-#        * <new-postrm> `failed-upgrade' <old-version>
-#        * <new-postrm> `abort-install'
-#        * <new-postrm> `abort-install' <old-version>
-#        * <new-postrm> `abort-upgrade' <old-version>
-#        * <disappearer's-postrm> `disappear' <overwriter>
-#          <overwriter-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-	if [ "$1" = "purge" ]; then
-	    if [ -d /usr/lib/gutenbach ]; then
-		echo "Removing /usr/lib/gutenbach/..." >&2
-		rm -r /usr/lib/gutenbach
-	    fi
-
-	    if [ -e /usr/share/debconf/confmodule ]; then
-		echo "Purging debconf database entries..." >&2
-		. /usr/share/debconf/confmodule
-		db_purge
-	    fi
-	fi
-
-	inaudio=$(groups daemon | grep audio || true)
-	if [ ! -z "$inaudio" ]; then
-	    deluser daemon audio
-	fi
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
Index: tenbach/debian/gutenbach.preinst
===================================================================
--- gutenbach/debian/gutenbach.preinst	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#!/bin/sh
-# preinst script for gutenbach
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <new-preinst> `install'
-#        * <new-preinst> `install' <old-version>
-#        * <new-preinst> `upgrade' <old-version>
-#        * <old-preinst> `abort-upgrade' <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-. /usr/share/debconf/confmodule
-
-case "$1" in
-    install|upgrade)
-    ;;
-
-    abort-upgrade)
-    ;;
-
-    *)
-        echo "preinst called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
Index: tenbach/debian/gutenbach.prerm
===================================================================
--- gutenbach/debian/gutenbach.prerm	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,48 +1,0 @@
-#!/bin/sh
-# prerm script for gutenbach
-#
-# see: dh_installdeb(1)
-
-set -e
-
-# summary of how this script can be called:
-#        * <prerm> `remove'
-#        * <old-prerm> `upgrade' <new-version>
-#        * <new-prerm> `failed-upgrade' <old-version>
-#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
-#        * <deconfigured's-prerm> `deconfigure' `in-favour'
-#          <package-being-installed> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-
-case "$1" in
-    remove|upgrade|deconfigure)
-
-	if [ -e /usr/lib/gutenbach/rm/cups-revert-perms ]; then
-	    chmod +x /usr/lib/gutenbach/rm/cups-revert-perms
-	    /usr/lib/gutenbach/rm/cups-revert-perms
-	fi
-
-	if [ -e /usr/lib/gutenbach/rm/cups-remove-printer ]; then
-	    chmod +x /usr/lib/gutenbach/rm/cups-remove-printer
-	    /usr/lib/gutenbach/rm/cups-remove-printer
-	fi
-    ;;
-
-    failed-upgrade)
-    ;;
-
-    *)
-        echo "prerm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
Index: tenbach/debian/gutenbach.templates
===================================================================
--- gutenbach/debian/gutenbach.templates	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,25 +1,0 @@
-Template: gutenbach/printername
-Type: string
-_Description: Your gutenbach printer name:
- gutenbach creates a printer to which you can print music
- files.  gutenbach needs to know what you want to call the 
- printer, and then after installation, you will be able
- to do:
- lpr -Pprintername@hostname your-music-file-.mp3 
-
-Template: gutenbach/zephyrclass
-Type: string
-_Description: Your gutenbach zephyr class:
- When gutenbach plays a song, it sends a message to a zephyr
- class with the song information (title, artist, album,
- etc).  Please specify which class you would you these 
- zephyrs to be sent to.  If you don't know what this is,
- or you don't want zephyrs to be sent, just leave this 
- field blank.
-
-Template: gutenbach/hostname
-Type: string
-_Description: The hostname to be displayed:
- When gutenbach sends a zephyr, it will display the hostname.
- If your hostname is particularly long, you may want to set
- this to an abbreviation or something else shorter.
Index: tenbach/debian/inst/create-filter-config
===================================================================
--- gutenbach/debian/inst/create-filter-config	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#!/bin/sh -e
-
-echo "Creating /usr/lib/gutenbach/config/gutenbach-filter-config.pl..." >&2
-if [ -e "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" ]; then
-    rm /usr/lib/gutenbach/config/gutenbach-filter-config.pl
-fi
-
-failed=
-if [ -e /usr/lib/gutenbach/config/printername ]; then
-    printername=$(cat /usr/lib/gutenbach/config/printername)
-else
-    failed="yes"
-fi
-if [ -e /usr/lib/gutenbach/config/hostname ]; then
-    hostname=$(cat /usr/lib/gutenbach/config/hostname)
-else
-    failed="yes"
-fi
-if [ -e /usr/lib/gutenbach/config/zephyrclass ]; then
-    zephyrclass=$(cat /usr/lib/gutenbach/config/zephyrclass)
-else
-    failed="yes"
-fi
-
-mixer="PCM"
-channel="Front Left"
-config_file="/usr/lib/gutenbach/config/gutenbach-filter-config.pl"
-
-if [ -z "$failed" ]; then
-    echo "\$zephyr_class = \""$zephyrclass"\";" >> "$config_file"
-    echo "\$host = \""$hostname"\";" >> "$config_file"
-    echo "\$queue = \""$printername"\";" >> "$config_file"
-    echo "\$mixer = \""$mixer"\";" >> "$config_file"
-    echo "\$channel = \""$channel"\";" >> "$config_file"
-    echo "1;" >> "$config_file"
-else
-    echo "Error: One of /usr/lib/gutenbach/config/{printername,hostname,zephyrclass} does not exist!" >&2
-    exit 1
-fi
Index: tenbach/debian/inst/cups-add-printer
===================================================================
--- gutenbach/debian/inst/cups-add-printer	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#!/bin/sh
-
-if [ -e /usr/lib/gutenbach/config/printername ]; then
-    printername="$(cat /usr/lib/gutenbach/config/printername)"
-    echo "Adding new printer $printername..."
-
-    lpadmin -p "$printername" -E -v gutenbach:/dev/null -D "Gutenbach Music Spooler"
-
-else
-    echo "Error: /usr/lib/gutenbach/config/printername does not exist"
-    exit 1
-fi
Index: tenbach/debian/inst/cups-set-perms
===================================================================
--- gutenbach/debian/inst/cups-set-perms	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,55 +1,0 @@
-#!/bin/sh
-
-# Set the CUPS permissions such that anyone can add/remove jobs
-# from the queue for gutenbach.
-
-if [ -e /usr/lib/gutenbach/config/printername ]; then
-    printername="$(cat /usr/lib/gutenbach/config/printername)"
-
-    conffile="/etc/cups/cupsd.conf"
-    mv "$conffile" "$conffile.bak"
-    touch "$conffile"
-
-    while read line; do
-	listen_localhost=$(echo "$line" | grep '^Listen localhost' || true)
-	if [ -n "$listen_localhost" ]; then
-	    echo "#GUTENBACH$line" >> "$conffile"
-       	else
-	    root_location=$(echo "$line" | grep '^<Location />$' || true)
-	    if [ -n "$root_location" ]; then
-		echo "<Location />" >> "$conffile"
-		echo "Allow from All # added by Gutenbach" >> "$conffile"
-	    else
-		echo "$line" >> "$conffile"
-	    fi
-	fi
-
-    done < "$conffile.bak"
-    rm "$conffile.bak"
-
-    cat >> "$conffile" <<EOF
-# Begin configurations for gutenbach
-
-Group audio
-Listen *
-ServerAlias *
-
-<Location /printers/$printername>
-    <Limit Cancel-Job Purge-Jobs CUPS-Authenticate-Job>
-        Order deny,allow
-        Allow from All
-    </Limit>
-
-    Order Deny, Allow
-    Allow from All
-</Location>
-
-# End configurations for gutenbach
-EOF
-
-    /etc/init.d/cups reload
-
-else
-    echo "Error: /usr/lib/gutenbach/config/printername does not exist"
-    exit 1
-fi
Index: tenbach/debian/inst/edit-lpd.conf
===================================================================
--- gutenbach/debian/inst/edit-lpd.conf	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,34 +1,0 @@
-#!/bin/sh -e
-
-echo "Editing /etc/lprng/lpd.conf..." >&2
-# add the printcap path to lpd.conf
-if [ -e /etc/lprng/lpd.conf ]; then
-    mv /etc/lprng/lpd.conf /etc/lprng/lpd.conf.bak
-    touch /etc/lprng/lpd.conf	
-
-    while read line; do
-	printcap=$(echo "$line" | grep ^printcap_path= || true)
-	if [ -n "$printcap" ]; then
-	    lprngprintcap=$(echo "$line" | grep /etc/lprng/printcap || true)
-	    printcap=$(echo "$line" | grep /etc/printcap || true)
-	    if [ ! -n "$lprngprintcap" ] && [ ! -n "$printcap" ]; then
-		echo "#$line" >> /etc/lprng/lpd.conf
-		echo "$line" | sed 's,printcap_path=,printcap_path=/etc/lprng/printcap:\|,' >> /etc/lprng/lpd.conf
-	    else
-		echo "$line" >> /etc/lprng/lpd.conf
-	    fi
-	else
-	    echo "$line" >> /etc/lprng/lpd.conf
-	fi
-    done < /etc/lprng/lpd.conf.bak
-    rm /etc/lprng/lpd.conf.bak
-else
-    touch /etc/lprng/lpd.conf
-    echo "printcap_path=/etc/lprng/printcap" >> /etc/lprng/lpd.conf
-fi
-
-# add lpd_listen_port to lpd.conf
-lpd_listen_port=$(cat /etc/lprng/lpd.conf | grep ^lpd_listen_port=515 || true)
-if [ ! -n "$lpd_listen_port" ]; then
-    echo "lpd_listen_port=515" >> /etc/lprng/lpd.conf
-fi
Index: tenbach/debian/inst/edit-lpd.perms
===================================================================
--- gutenbach/debian/inst/edit-lpd.perms	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#!/bin/sh
-
-# make lpd less paranoid about accepting connections
-# (comment out REJECT NOT SERVER)
-# allow other users to dequeue music
-# (comment out REJECT SERVICE=M)
-# make it only accept A jobs
-# (add 
-#    ACCEPT SERVICE=R,P SERVER
-#    ACCEPT C=CA* SERVICE=R,P
-#    REJECT SERVICE=R,P)
-
-echo "Editing /etc/lprng/lpd.perms..." >&2
-if [ -e /etc/lprng/lpd.perms ]; then
-    mv /etc/lprng/lpd.perms /etc/lprng/lpd.perms.bak
-    touch /etc/lprng/lpd.perms	
-
-    while read line; do
-	reject_not_server=$(echo "$line" | grep '^REJECT NOT SERVER' || true)
-	if [ -n "$reject_not_server" ]; then
-	    echo "#$line" >> /etc/lprng/lpd.perms
-	    
-	    echo "## BEGIN gutenbach configuration" >> /etc/lprng/lpd.perms
-	    echo "ACCEPT SERVICE=R,P SERVER" >> /etc/lprng/lpd.perms
-	    echo "ACCEPT C=CA* SERVICE=R,P" >> /etc/lprng/lpd.perms
-	    echo "REJECT SERVICE=R,P" >> /etc/lprng/lpd.perms
-	    echo "## END gutenbach configuration" >> /etc/lprng/lpd.perms
-      	else
-	    reject_service=$(echo "$line" | grep '^REJECT SERVICE=M' || true)
-	    if [ -n "$reject_service" ]; then
-		echo "#line" >> /etc/lprng/lpd.perms
-	    else
-		echo "$line" >> /etc/lprng/lpd.perms
-	    fi
-	fi
-    done < /etc/lprng/lpd.perms.bak
-    rm /etc/lprng/lpd.perms.bak
-fi
Index: tenbach/debian/inst/edit-printcap
===================================================================
--- gutenbach/debian/inst/edit-printcap	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#!/bin/sh -e
-
-echo "Editing /etc/printcap..." >&2
-if [ ! -e /etc/printcap ]; then
-    touch /etc/printcap
-fi
-
-if [ ! -e /etc/lprng/printcap ]; then
-    ln -s /etc/printcap /etc/lprng/printcap
-fi
-
-if [ -e /usr/lib/gutenbach/config/printername ]; then
-    printername=$(cat /usr/lib/gutenbach/config/printername)
-
-    printcap=$(cat /etc/printcap | grep ^`echo $printername` || true)
-    if [ ! -n "$printcap" ]; then
-    # add the appropriate entry into /etc/printcap, /etc/lprng/printcap
-	echo "$printername" >> /etc/printcap
-	echo "  :server" >> /etc/printcap
-	echo "  :cm=Gutenbach Music Spooler" >> /etc/printcap
-	echo "  :lp=/dev/null" >> /etc/printcap
-	echo "  :if=|/usr/lib/gutenbach/gutenbach-filter" >> /etc/printcap
-	echo "  :lf=/var/spool/lpd/$printername/log" >> /etc/printcap
-	echo "  :sd=/var/spool/lpd/$printername" >> /etc/printcap
-	echo "  :ml=0:mx=0:sh" >> /etc/printcap
-	echo "  :create_files" >> /etc/printcap
-	echo "  :auth_forward=kerberos5" >> /etc/printcap
-	echo "  :use_auth=kerberos5" >> /etc/printcap
-	echo "  :kerberos_id=daemon/"`hostname`".mit.edu@ATHENA.MIT.EDU" >> /etc/printcap
-	echo "  :kerberos_keytab=/etc/daemon.keytab" >> /etc/printcap
-    fi
-else
-    echo "Error: /usr/lib/gutenbach/config/printername does not exist!" >&2
-    exit 1
-fi
Index: tenbach/debian/inst/run-checkpc
===================================================================
--- gutenbach/debian/inst/run-checkpc	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#!/bin/sh -e
-
-# make sure directories exist for checkpc
-echo "Running checkpc..." >&2
-if [ ! -d /var/spool/lpd ]; then
-    mkdir /var/spool/lpd
-    mkdir /var/spool/lpd/%P
-else
-    if [ ! -d /var/spool/lpd/%P ]; then
-	mkdir /var/spool/lpd/%P
-    fi
-fi
-chmod og=rwx /var/spool/lpd
-chmod og=rwx /var/spool/lpd/%P
-
-if [ -e /usr/lib/gutenbach/config/printername ]; then
-    printername=$(cat /usr/lib/gutenbach/config/printername)
-    /usr/sbin/checkpc -P"$printername" -f
-else
-    echo "Error: /usr/lib/gutenbach/config/printername does not exist!" >&2
-    exit 1
-fi
Index: tenbach/debian/lib/README
===================================================================
--- gutenbach/debian/lib/README	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,20 +1,0 @@
-If you want to help make changes to gutenbach, do NOT make changes
-locally!  They will most likely get overwritten by the next package
-install.  Instead, you should check out the source and edit the
-package itself:
-
-/afs/sipb/project/sipbmp3/gutenbach.git
-
-It may be useful to just edit things locally to make sure they work,
-and then add the change into the package.
-
-zsr (in SIPB) is set up to build packages, and already has a git clone
-in /root/gutenbach.  You can edit the source there, build the package,
-and then reinstall the package.
-
-A good guide to get started with debian packaging is here:
-http://debathena.mit.edu/packaging/
-
-jhamrick (Jessica Hamrick) is currently the active maintainer for
-gutenbach, so if you're interested in contributing but don't know
-quite where to start, you should talk to her.
Index: tenbach/debian/lib/TODO
===================================================================
--- gutenbach/debian/lib/TODO	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,2 +1,0 @@
-- gutenbach-get-config should fail and error out if it can't find a
-   config file -- we can't use defaults since what would the defaults be?
Index: tenbach/debian/lib/gutenbach
===================================================================
--- gutenbach/debian/lib/gutenbach	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,333 +1,0 @@
-#!/usr/bin/perl
-# Play the data on STDIN as an audio file
-#
-# $Id: gutenbach-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $
-# $Source: /usr/local/bin/RCS/gutenbach-filter,v $
-#
-# TODO
-# ----
-# Make this structured code. It's a mess.
-# Repeat what we just played for EXT files too
-# Support HTTP Auth on ogg streams
-# License, cleanup and package
-#
-# Jered Floyd <jered@mit.edu> takes very little credit for this code
-# apparently neither does Quentin Smith <quentin@mit.edu>
-
-use strict;
-use warnings;
-use Image::ExifTool qw(ImageInfo);
-use File::Spec::Functions;
-use File::Temp qw{tempfile tempdir};
-use File::Basename qw(basename);
-use LWP::UserAgent;
-use Data::Dumper;
-use IPC::Open2;
-use English;
-
-use vars qw/$zephyr_class $host $queue $mixer $channel/;
-
-require "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" or die "Unable to load configuration";
-
-my $ua = new LWP::UserAgent;
-
-# This variable contains the pid of the child process (which runs
-# mplayer) once it has been forked, so that we can kill it on SIGTERM
-my $pid;
-
-# Replace STDERR with a log file in /tmp.
-open(CUPS, ">&STDERR") or die "Unable to copy CUPS filehandle";
-close(STDERR);
-open(STDERR, ">>", "/tmp/gutenbach.log") or warn "Couldn't open log: $!";
-
-# Set the TERM environment (for the benefit of mplayer?)
-# I don't know why we do this --quentin
-$ENV{"TERM"}="vt100";
-
-print STDERR "STDERR FROM SPOOL FILTER\n";
-
-# CUPS provides us with these arguments:
-#
-# argv[1]
-# The job ID
-# argv[2]
-# The user printing the job
-# argv[3]
-# The job name/title
-# argv[4]
-# The number of copies to print
-# argv[5]
-# The options that were provided when the job was submitted
-# argv[6]
-# The file to print (first program only)
-#
-# The scheduler runs one or more of these programs to print any given
-# job. The first filter reads from the print file and writes to the
-# standard output, while the remaining filters read from the standard
-# input and write to the standard output. The backend is the last
-# filter in the chain and writes to the device.
-
-printf(STDERR "Got \@ARGV: %s\n", Dumper(\@ARGV));
-
-my %arguments = (
-		 "job-id" => $ARGV[0],
-		 user => $ARGV[1],
-		 "job-title" => $ARGV[2],
-		 copies => $ARGV[3],
-		 options => {split(/[= ]/, $ARGV[4])},
-		 file => $ARGV[5],
-		);
-
-# If we weren't given a filename, we need to read from stdin. Since
-# mplayer really wants a file, let's write out to a temporary file
-# first.
-if (!$arguments{"file"}) {
-  my ($fh, $file) = tempfile("gutenbachXXXXX", UNLINK => 1); # Ask File::Temp for a safe temporary file
-  my $buf;
-  while (read(STDIN, $buf, 1024*1024)) { # Read 1M at a time and put it in the temporary file
-    print $fh $buf;
-  }
-  close($fh);
-  $arguments{"file"} = $file;
-}
-
-printf(STDERR "Got \%arguments: %s\n", Dumper(\%arguments));
-
-# Open up a zwrite command to announce the current track.
-my @zwrite_command = (qw(/usr/bin/zwrite -d -n -c), $zephyr_class, "-i", $queue.'@'.$host, "-s", "Gutenbach Music Spooler");
-
-print STDERR "Invoking @zwrite_command\n";
-open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
-
-my $status;
-if (exists($arguments{"options"}{"job-originating-host-name"})) {
-    print(ZEPHYR $arguments{"user"},"\@",$arguments{"options"}{"job-originating-host-name"}," is playing:\n");
-    $status = "User: ".$arguments{"user"}."\@".$arguments{"options"}{"job-originating-host-name"};
-} else {
-    print(ZEPHYR $arguments{"user"}," is playing:\n");
-    $status = "User: ".$arguments{"user"};
-}
-
-# SIGHUP handler, in case we were aborted
-sub clear_status {
-  kill 15, $pid if $pid;
-  my @zwrite_command = (qw(/usr/bin/zwrite -d -n -c), $zephyr_class, "-i", $queue.'@'.$host, "-s", "Gutenbach Music Spooler");
-  open(ZEPH, "|-", @zwrite_command);
-  print(ZEPH "Playback aborted.\n");
-  close(ZEPH);
-  die;
-}
-
-$SIG{HUP} = \&clear_status;
-$SIG{TERM} = \&clear_status;
-
-# Read the metadata information from the file.
-my ($filepath) = $arguments{"file"};
-my ($fileinfo) = ImageInfo($filepath);
-my ($magic) = $fileinfo->{FileType};
-my ($tempdir);
-my ($newpath);
-
-if ($magic) {
-  # $magic means that Image::ExifTool was able to identify the type of file
-  printf(ZEPHYR "%s file %s\n", $magic, $arguments{"job-title"});
-  $status .= sprintf(" Filetype: %s.", $magic);
-  $status .= sprintf(" Filename: %s.", $arguments{"job-title"});
-
-  if (exists $fileinfo->{'Title'}) {
-    printf(ZEPHYR "\@b{%s}\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
-    $status .= sprintf(" Title: %s.", $fileinfo->{'Title'});
-  }
-  foreach my $key (qw/Artist Album AlbumArtist/) {
-    if (exists $fileinfo->{$key}) {
-      printf(ZEPHYR "%s\n", $fileinfo->{$key}) if exists $fileinfo->{$key};
-      $status .= sprintf(" %s: %s\n", $key, $fileinfo->{$key});
-    }
-  }
-
-  $tempdir = tempdir();
-  #awful hack -- geofft
-  #== -- quentin
-  # This code appears to create a new temporary directory and symlink
-  # the job file into the temporary directory under the original
-  # filename. I think this is because mplayer sometimes uses the file
-  # extension to identify a filetype.
-  $newpath = $tempdir . '/' . basename($arguments{"job-title"});
-  symlink($filepath, $newpath);
-  $filepath = $newpath;
-}
-elsif ($arguments{copies} == 42) {
-  # This is a flag that is set by jobs queued by split_playlist(); it tells us to not try to split the playlist again.
-  # Call resolve_external_reference to apply some heuristics to determine the filetype.
-  $filepath = resolve_external_reference($filepath, \%arguments);
-  if ($filepath =~ m|http://www\.youtube\.com/watch\?v=|) {
-    # YouTube URLs are resolved by the youtube-dl command.
-    # Launch youtube-dl
-    open(YTDL, "-|", "youtube-dl", "-g", $filepath) or die "Unable to invoke youtube-dl";
-    # Read the title (currently not doing so because youtube-dl doesn't know how to get the title.
-    my $title = ""; # <YTDL>
-    # Print the title to zephyr and the status string.
-    print ZEPHYR "YouTube video $filepath\n$title";
-    $status .= " YouTube video $filepath. $title.";
-    # youtube-dl prints the URL of the flash video, which we pass to mplayer as a filename.
-    $filepath = <YTDL>;
-    chomp $filepath;
-  } else { # Doesn't appear to be a YouTube URL.
-    print STDERR "Resolved external reference to $filepath\n";
-    printf(ZEPHYR "%s\n", $filepath);
-    $status .= sprintf(" External: %s\n", $filepath);
-  }
-}
-elsif (-T $filepath) { # If the file appears to be a text file, treat it as a playlist.
-  split_playlist($filepath, \%arguments);
-  close(ZEPHYR);
-  # See http://www.cups.org/documentation.php/api-filter.html#MESSAGES
-  print CUPS "NOTICE: $status\n";
-  exit 0;
-}
-
-close(ZEPHYR);
-print CUPS "NOTICE: $status\n";
-play_mplayer_audio($filepath, \%arguments);
-
-# Remove the symlink we made earlier for the filetype.
-if ($magic) {
-  unlink($newpath);
-  rmdir($tempdir);
-}
-
-# Play an external stream reference
-sub resolve_external_reference {
-  # Retrieve those command line opts.
-  my ($filepath, $arguments) = @_;
-
-  my ($format, $uri, $userpass);
-
-  open(FILE, "<", $filepath) or die "Couldn't open spool file";
-  if (<FILE> =~ /^(\S+)/) {
-    # Take the leading non-whitespace as a URL
-    $uri=$1;
-
-    if ($uri =~ m|http://www\.youtube\.com/watch\?v=|) {
-      return $uri;
-    }
-
-    # Fetch the URL with a HEAD request to get the content type
-    my $response = $ua->head($uri);
-
-    my $contenttype=($response->content_type() or "unknown");
-
-    if ($contenttype eq "audio/mpeg") { $format="MP3" }
-    elsif ($contenttype eq "application/x-ogg") { $format="OGG" }
-    elsif ($contenttype eq "application/ogg") { $format="OGG" }
-    elsif ($contenttype eq "audio/x-scpls") { $format="SHOUTCAST" }
-    else {
-      print ZEPHYR
-	"Unknown Content-Type $contenttype for URI $uri\n";
-    }
-  } else { # Unable to match the URL regex
-    print ZEPHYR "Couldn't read URI for external reference\n";
-    # Return the existing path, in the hopes that mplayer knows what to do with it.
-    return $filepath;
-  }
-
-  if ($format eq "SHOUTCAST") {
-    print ZEPHYR "Shoutcast playlist...\n";
-    return get_shoutcast($uri);
-  } elsif ($format eq "MP3") {
-  } elsif ($format eq "OGG") {
-  } else {
-    print ZEPHYR "Unrecognized stream format: $format\n";
-  }
-  return $uri;
-}
-
-sub split_playlist {
-  my ($file, $arguments) = @_;
-
-  my $i = 0;
-
-  open(FILE, "<", $filepath) or die "Couldn't open spool file";
-  while (<FILE>) {
-    chomp;
-    if (/^([^#]\S+)/) {
-      printf (STDERR "Found playlist line: %s\n", $_);
-      open(LPR, "|-", 'lpr', '-P'.$queue.'@localhost', '-#', '42', '-J', $arguments->{"job-title"}, '-o', 'job-priority=100');
-      print LPR $1;
-      close(LPR);
-      $i++;
-    }
-  }
-  printf(ZEPHYR "Playlist containing %d valid entries, split into separate jobs.\n", $i);
-}
-
-# Process a Shoutcast playlist
-# get_shoutcast(URI)
-sub get_shoutcast {
-  my $uri = shift(@_);
-
-  my $response = $ua->get($uri);
-  my (@titles, @uris);
-
-  foreach (split("\n", $response->content())) {
-      if (/^File\d+=(\S+)/) {
-	  push(@uris, $1);
-      }
-      if (/^Title\d+=(.+)$/) {
-	  push(@titles, $1);
-      }
-  }
-
-  # choose a random server
-  my $server = int(rand scalar(@uris));
-  # print the name of the stream if available
-  print ZEPHYR "$titles[$server]\n";
-  return $uris[$server];
-}
-
-sub play_mplayer_audio {
-  my ($filepath, $opts) = @_;
-
-  # Open up a zwrite command to show the mplayer output
-  my @zwrite_command = (qw(/usr/bin/zwrite -d -n -c), $zephyr_class, "-i", $queue.'@'.$host, "-s", "Gutenbach Music Spooler");
-
-  print STDERR "Invoking (from play_mplayer_audio): @zwrite_command\n";
-
-  # fork for mplayer
-  $pid = open(MP3STATUS, "-|");
-  unless (defined $pid) {
-    open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
-    print ZEPHYR "Couldn't fork: $!\n";
-    close(ZEPHYR);
-    return;
-  }
-
-  if ($pid) { #parent
-    # Check if there were any errors
-    if ($_ = <MP3STATUS>) {
-      open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
-      print ZEPHYR "Playback completed with the following errors:\n";
-      while (<MP3STATUS>) {
-	print ZEPHYR $_;
-      }
-      close(ZEPHYR);
-    } else {
-      open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
-      print ZEPHYR "Playback completed successfully.\n";
-      close(ZEPHYR);
-    }
-    close(MP3STATUS) || print ZEPHYR "mplayer exited $?\n";
-  }
-  else { # child
-    # redirect STDERR to STDOUT
-    open STDERR, '>&STDOUT';
-    # make sure that mplayer doesn't try to intepret the file as keyboard input
-    close(STDIN);
-    open(STDIN, "/dev/null");
-
-    my @args = (qw|/usr/bin/mplayer -vo fbdev2 -zoom -x 1024 -y 768 -framedrop -nolirc -cache 512 -ao alsa -really-quiet |, $filepath);
-    #print STDERR "About to exec: ", Dumper([@args]);
-    exec(@args) ||
-      die "Couldn't exec";
-  }
-}
Index: tenbach/debian/lib/gutenbach-get-config
===================================================================
--- gutenbach/debian/lib/gutenbach-get-config	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#!/usr/bin/perl
-use strict;
-# Get configuration of gutenbach
-
-my $zephyr_class = `hostname`;
-chomp($zephyr_class);
-my $host = `hostname`;
-chomp($zephyr_class);
-my $queue = "gutenbach";
-my $mixer = "PCM";
-my $channel = "Front Left";
-
-# Configuration
-my $config_file = "/usr/lib/gutenbach/config/gutenbach-filter-config.pl";
-if (-r $config_file) {
-    # Inline the configuration file
-    local $/;
-    my $fh;
-    open $fh, $config_file;
-    eval <$fh>;
-}
-
-my %config = (
-    'zephyr-class' => $zephyr_class,
-    'host' => $host,
-    'queue' => $queue,
-    'mixer' => $mixer,
-    'channel' => $channel,
-);
-
-foreach my $argv (@ARGV)
-{
-    #print $argv . "\n";
-    print $config{$argv};
-}
Index: tenbach/debian/po/POTFILES.in
===================================================================
--- gutenbach/debian/po/POTFILES.in	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,1 +1,0 @@
-[type: gettext/rfc822deb] gutenbach.templates
Index: tenbach/debian/po/templates.pot
===================================================================
--- gutenbach/debian/po/templates.pot	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,64 +1,0 @@
-# Gutenbach Translation File.
-#
-# This file is distributed under the same license as the GUTENBACH package.
-# Jessica B. Hamrick <jhamrick@mit.edu>, 2010.
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: gutenbach@mit.edu\n"
-"POT-Creation-Date: 2010-06-14 18:36-0600\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. Type: string
-#. Description
-#: ../gutenbach.templates:1001
-msgid "Your gutenbach printer name:"
-msgstr ""
-
-#. Type: string
-#. Description
-#: ../gutenbach.templates:1001
-msgid ""
-"gutenbach creates a printer to which you can print music files.  gutenbach "
-"needs to know what you want to call the  printer, and then after "
-"installation, you will be able to do: lpr -Pprintername@hostname your-music-"
-"file-.mp3"
-msgstr ""
-
-#. Type: string
-#. Description
-#: ../gutenbach.templates:2001
-msgid "Your gutenbach zephyr class:"
-msgstr ""
-
-#. Type: string
-#. Description
-#: ../gutenbach.templates:2001
-msgid ""
-"When gutenbach plays a song, it sends a message to a zephyr class with the "
-"song information (title, artist, album, etc).  Please specify which class "
-"you would you these  zephyrs to be sent to.  If you don't know what this is, "
-"or you don't want zephyrs to be sent, just leave this  field blank."
-msgstr ""
-
-#. Type: string
-#. Description
-#: ../gutenbach.templates:3001
-msgid "The hostname to be displayed:"
-msgstr ""
-
-#. Type: string
-#. Description
-#: ../gutenbach.templates:3001
-msgid ""
-"When gutenbach sends a zephyr, it will display the hostname. If your "
-"hostname is particularly long, you may want to set this to an abbreviation "
-"or something else shorter."
-msgstr ""
Index: tenbach/debian/rm/cups-remove-printer
===================================================================
--- gutenbach/debian/rm/cups-remove-printer	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,12 +1,0 @@
-#!/bin/sh
-
-echo "Removing gutenbach printer..." >&2
-
-if [ -e /usr/lib/gutenbach/config/printername ]; then
-    printername="$(cat /usr/lib/gutenbach/config/printername)"
-
-    lpadmin -x "$printername"
-
-else
-    echo "Error: /usr/lib/gutenbach/config/printername does not exist"
-fi
Index: tenbach/debian/rm/cups-revert-perms
===================================================================
--- gutenbach/debian/rm/cups-revert-perms	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#!/bin/sh 
-
-echo "Reverting changes to /etc/cups/cupsd.conf..." >&2
-conffile="/etc/cups/cupsd.conf"
-
-mv "$conffile" "$conffile.bak"
-touch "$conffile"
-sed '/# Begin configurations for gutenbach/,/# End configurations for gutenbach/ d' < "$conffile.bak" > "$conffile"
-
-mv "$conffile" "$conffile.bak"
-touch "$conffile"
-while read line; do
-    listen_localhost=$(echo "$line" | grep '^#GUTENBACH' || true)
-    if [ -n "$listen_localhost" ]; then
-	echo "$(echo $line | sed s/#GUTENBACH//)" >> "$conffile"
-    else
-	root_location=$(echo "$line" | grep '^Allow from All # added by Gutenbach$' || true)
-	if [ -z "$root_location" ]; then
-	    echo "$line" >> "$conffile"
-	fi
-    fi
-
-done < "$conffile.bak"
-
-rm "$conffile.bak"
Index: tenbach/debian/rm/revert_lpd.conf
===================================================================
--- gutenbach/debian/rm/revert_lpd.conf	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#!/bin/sh -e
-
-echo "Reverting changes to /etc/lprng/lpd.conf..." >&2
-mv /etc/lprng/lpd.conf /etc/lprng/lpd.conf.bak
-touch /etc/lprng/lpd.conf
-while read line; do
-    lpd_listen_port=$(echo "$line" | grep ^lpd_listen_port=515$ || true)
-    if [ -z "$lpd_listen_port" ]; then
-	echo "$line" >> /etc/lprng/lpd.conf
-    fi
-done < /etc/lprng/lpd.conf.bak
Index: tenbach/debian/rm/revert_lpd.perms
===================================================================
--- gutenbach/debian/rm/revert_lpd.perms	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#!/bin/sh -e
-
-echo "Reverting changes to /etc/lprng/lpd.perms..." >&2
-mv /etc/lprng/lpd.perms /etc/lprng/lpd.perms.bak
-touch /etc/lprng/lpd.perms
-while read line; do
-    reject_not_server=$(echo "$line" | grep '^#REJECT NOT SERVER$' || true)
-    if [ ! -z "$reject_not_server" ]; then
-	echo "REJECT NOT SERVER" >> /etc/lprng/lpd.perms
-    else
-	reject_service=$(echo "$line" | grep '^#REJECT SERVICE=M$' || true)
-	if [ ! -z "$reject_service" ]; then
-	    echo "REJECT SERVICE=M" >> /etc/lprng/lpd.perms
-	else
-            echo "$line" >> /etc/lprng/lpd.perms
-	fi
-    fi
-done < /etc/lprng/lpd.perms.bak
-rm /etc/lprng/lpd.perms.bak
Index: tenbach/debian/rm/revert_printcap
===================================================================
--- gutenbach/debian/rm/revert_printcap	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#!/bin/sh -e
-
-echo "Reverting changes to /etc/printcap..." >&2
-
-if [ -e /usr/lib/gutenbach/config/printername ]; then
-    printername=$(cat /usr/lib/gutenbach/config/printername)
-
-    mv /etc/printcap /etc/printcap.bak
-    touch /etc/printcap
-    foundprinter="false"
-    while read line; do
-	printername=$(echo "$line" | grep ^`echo $printername`$ || true)
-	if [ -n "$printername" ]; then
-            foundprinter="true"
-	else
-            if [ "$foundprinter"="true" ]; then
-		configline=$(echo "$line" | grep ^[[:space:]]*: || true)
-		if [ -z "$configline" ]; then
-                    foundprinter="false"
-                    echo "$line" >> /etc/printcap
-		fi
-            else
-		echo "$line" >> /etc/printcap
-            fi
-	fi
-    done < /etc/printcap.bak
-    rm /etc/printcap.bak
-else
-    echo "Error: /usr/lib/gutenbach/config/printername does not exist!" >&2
-fi
Index: tenbach/debian/rules
===================================================================
--- gutenbach/debian/rules	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/usr/bin/make -f
-
-include /usr/share/cdbs/1/rules/debhelper.mk
Index: tenbach/debian/source/format
===================================================================
--- gutenbach/debian/source/format	(revision 593b5e1aa146f73b19a54598ff02d89816701a57)
+++ 	(revision )
@@ -1,1 +1,0 @@
-1.0
Index: gutenbach/inst/create-filter-config
===================================================================
--- gutenbach/inst/create-filter-config	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/inst/create-filter-config	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,39 @@
+#!/bin/sh -e
+
+echo "Creating /usr/lib/gutenbach/config/gutenbach-filter-config.pl..." >&2
+if [ -e "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" ]; then
+    rm /usr/lib/gutenbach/config/gutenbach-filter-config.pl
+fi
+
+failed=
+if [ -e /usr/lib/gutenbach/config/printername ]; then
+    printername=$(cat /usr/lib/gutenbach/config/printername)
+else
+    failed="yes"
+fi
+if [ -e /usr/lib/gutenbach/config/hostname ]; then
+    hostname=$(cat /usr/lib/gutenbach/config/hostname)
+else
+    failed="yes"
+fi
+if [ -e /usr/lib/gutenbach/config/zephyrclass ]; then
+    zephyrclass=$(cat /usr/lib/gutenbach/config/zephyrclass)
+else
+    failed="yes"
+fi
+
+mixer="PCM"
+channel="Front Left"
+config_file="/usr/lib/gutenbach/config/gutenbach-filter-config.pl"
+
+if [ -z "$failed" ]; then
+    echo "\$zephyr_class = \""$zephyrclass"\";" >> "$config_file"
+    echo "\$host = \""$hostname"\";" >> "$config_file"
+    echo "\$queue = \""$printername"\";" >> "$config_file"
+    echo "\$mixer = \""$mixer"\";" >> "$config_file"
+    echo "\$channel = \""$channel"\";" >> "$config_file"
+    echo "1;" >> "$config_file"
+else
+    echo "Error: One of /usr/lib/gutenbach/config/{printername,hostname,zephyrclass} does not exist!" >&2
+    exit 1
+fi
Index: gutenbach/inst/cups-add-printer
===================================================================
--- gutenbach/inst/cups-add-printer	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/inst/cups-add-printer	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ -e /usr/lib/gutenbach/config/printername ]; then
+    printername="$(cat /usr/lib/gutenbach/config/printername)"
+    echo "Adding new printer $printername..."
+
+    lpadmin -p "$printername" -E -v gutenbach:/dev/null -D "Gutenbach Music Spooler"
+
+else
+    echo "Error: /usr/lib/gutenbach/config/printername does not exist"
+    exit 1
+fi
Index: gutenbach/inst/cups-set-perms
===================================================================
--- gutenbach/inst/cups-set-perms	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/inst/cups-set-perms	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+# Set the CUPS permissions such that anyone can add/remove jobs
+# from the queue for gutenbach.
+
+if [ -e /usr/lib/gutenbach/config/printername ]; then
+    printername="$(cat /usr/lib/gutenbach/config/printername)"
+
+    conffile="/etc/cups/cupsd.conf"
+    mv "$conffile" "$conffile.bak"
+    touch "$conffile"
+
+    while read line; do
+	listen_localhost=$(echo "$line" | grep '^Listen localhost' || true)
+	if [ -n "$listen_localhost" ]; then
+	    echo "#GUTENBACH$line" >> "$conffile"
+       	else
+	    root_location=$(echo "$line" | grep '^<Location />$' || true)
+	    if [ -n "$root_location" ]; then
+		echo "<Location />" >> "$conffile"
+		echo "Allow from All # added by Gutenbach" >> "$conffile"
+	    else
+		echo "$line" >> "$conffile"
+	    fi
+	fi
+
+    done < "$conffile.bak"
+    rm "$conffile.bak"
+
+    cat >> "$conffile" <<EOF
+# Begin configurations for gutenbach
+
+Group audio
+Listen *
+ServerAlias *
+
+<Location /printers/$printername>
+    <Limit Cancel-Job Purge-Jobs CUPS-Authenticate-Job>
+        Order deny,allow
+        Allow from All
+    </Limit>
+
+    Order Deny, Allow
+    Allow from All
+</Location>
+
+# End configurations for gutenbach
+EOF
+
+    /etc/init.d/cups reload
+
+else
+    echo "Error: /usr/lib/gutenbach/config/printername does not exist"
+    exit 1
+fi
Index: gutenbach/inst/edit-lpd.conf
===================================================================
--- gutenbach/inst/edit-lpd.conf	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/inst/edit-lpd.conf	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,34 @@
+#!/bin/sh -e
+
+echo "Editing /etc/lprng/lpd.conf..." >&2
+# add the printcap path to lpd.conf
+if [ -e /etc/lprng/lpd.conf ]; then
+    mv /etc/lprng/lpd.conf /etc/lprng/lpd.conf.bak
+    touch /etc/lprng/lpd.conf	
+
+    while read line; do
+	printcap=$(echo "$line" | grep ^printcap_path= || true)
+	if [ -n "$printcap" ]; then
+	    lprngprintcap=$(echo "$line" | grep /etc/lprng/printcap || true)
+	    printcap=$(echo "$line" | grep /etc/printcap || true)
+	    if [ ! -n "$lprngprintcap" ] && [ ! -n "$printcap" ]; then
+		echo "#$line" >> /etc/lprng/lpd.conf
+		echo "$line" | sed 's,printcap_path=,printcap_path=/etc/lprng/printcap:\|,' >> /etc/lprng/lpd.conf
+	    else
+		echo "$line" >> /etc/lprng/lpd.conf
+	    fi
+	else
+	    echo "$line" >> /etc/lprng/lpd.conf
+	fi
+    done < /etc/lprng/lpd.conf.bak
+    rm /etc/lprng/lpd.conf.bak
+else
+    touch /etc/lprng/lpd.conf
+    echo "printcap_path=/etc/lprng/printcap" >> /etc/lprng/lpd.conf
+fi
+
+# add lpd_listen_port to lpd.conf
+lpd_listen_port=$(cat /etc/lprng/lpd.conf | grep ^lpd_listen_port=515 || true)
+if [ ! -n "$lpd_listen_port" ]; then
+    echo "lpd_listen_port=515" >> /etc/lprng/lpd.conf
+fi
Index: gutenbach/inst/edit-lpd.perms
===================================================================
--- gutenbach/inst/edit-lpd.perms	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/inst/edit-lpd.perms	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# make lpd less paranoid about accepting connections
+# (comment out REJECT NOT SERVER)
+# allow other users to dequeue music
+# (comment out REJECT SERVICE=M)
+# make it only accept A jobs
+# (add 
+#    ACCEPT SERVICE=R,P SERVER
+#    ACCEPT C=CA* SERVICE=R,P
+#    REJECT SERVICE=R,P)
+
+echo "Editing /etc/lprng/lpd.perms..." >&2
+if [ -e /etc/lprng/lpd.perms ]; then
+    mv /etc/lprng/lpd.perms /etc/lprng/lpd.perms.bak
+    touch /etc/lprng/lpd.perms	
+
+    while read line; do
+	reject_not_server=$(echo "$line" | grep '^REJECT NOT SERVER' || true)
+	if [ -n "$reject_not_server" ]; then
+	    echo "#$line" >> /etc/lprng/lpd.perms
+	    
+	    echo "## BEGIN gutenbach configuration" >> /etc/lprng/lpd.perms
+	    echo "ACCEPT SERVICE=R,P SERVER" >> /etc/lprng/lpd.perms
+	    echo "ACCEPT C=CA* SERVICE=R,P" >> /etc/lprng/lpd.perms
+	    echo "REJECT SERVICE=R,P" >> /etc/lprng/lpd.perms
+	    echo "## END gutenbach configuration" >> /etc/lprng/lpd.perms
+      	else
+	    reject_service=$(echo "$line" | grep '^REJECT SERVICE=M' || true)
+	    if [ -n "$reject_service" ]; then
+		echo "#line" >> /etc/lprng/lpd.perms
+	    else
+		echo "$line" >> /etc/lprng/lpd.perms
+	    fi
+	fi
+    done < /etc/lprng/lpd.perms.bak
+    rm /etc/lprng/lpd.perms.bak
+fi
Index: gutenbach/inst/edit-printcap
===================================================================
--- gutenbach/inst/edit-printcap	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/inst/edit-printcap	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,35 @@
+#!/bin/sh -e
+
+echo "Editing /etc/printcap..." >&2
+if [ ! -e /etc/printcap ]; then
+    touch /etc/printcap
+fi
+
+if [ ! -e /etc/lprng/printcap ]; then
+    ln -s /etc/printcap /etc/lprng/printcap
+fi
+
+if [ -e /usr/lib/gutenbach/config/printername ]; then
+    printername=$(cat /usr/lib/gutenbach/config/printername)
+
+    printcap=$(cat /etc/printcap | grep ^`echo $printername` || true)
+    if [ ! -n "$printcap" ]; then
+    # add the appropriate entry into /etc/printcap, /etc/lprng/printcap
+	echo "$printername" >> /etc/printcap
+	echo "  :server" >> /etc/printcap
+	echo "  :cm=Gutenbach Music Spooler" >> /etc/printcap
+	echo "  :lp=/dev/null" >> /etc/printcap
+	echo "  :if=|/usr/lib/gutenbach/gutenbach-filter" >> /etc/printcap
+	echo "  :lf=/var/spool/lpd/$printername/log" >> /etc/printcap
+	echo "  :sd=/var/spool/lpd/$printername" >> /etc/printcap
+	echo "  :ml=0:mx=0:sh" >> /etc/printcap
+	echo "  :create_files" >> /etc/printcap
+	echo "  :auth_forward=kerberos5" >> /etc/printcap
+	echo "  :use_auth=kerberos5" >> /etc/printcap
+	echo "  :kerberos_id=daemon/"`hostname`".mit.edu@ATHENA.MIT.EDU" >> /etc/printcap
+	echo "  :kerberos_keytab=/etc/daemon.keytab" >> /etc/printcap
+    fi
+else
+    echo "Error: /usr/lib/gutenbach/config/printername does not exist!" >&2
+    exit 1
+fi
Index: gutenbach/inst/run-checkpc
===================================================================
--- gutenbach/inst/run-checkpc	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/inst/run-checkpc	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+# make sure directories exist for checkpc
+echo "Running checkpc..." >&2
+if [ ! -d /var/spool/lpd ]; then
+    mkdir /var/spool/lpd
+    mkdir /var/spool/lpd/%P
+else
+    if [ ! -d /var/spool/lpd/%P ]; then
+	mkdir /var/spool/lpd/%P
+    fi
+fi
+chmod og=rwx /var/spool/lpd
+chmod og=rwx /var/spool/lpd/%P
+
+if [ -e /usr/lib/gutenbach/config/printername ]; then
+    printername=$(cat /usr/lib/gutenbach/config/printername)
+    /usr/sbin/checkpc -P"$printername" -f
+else
+    echo "Error: /usr/lib/gutenbach/config/printername does not exist!" >&2
+    exit 1
+fi
Index: gutenbach/lib/README
===================================================================
--- gutenbach/lib/README	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/lib/README	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,20 @@
+If you want to help make changes to gutenbach, do NOT make changes
+locally!  They will most likely get overwritten by the next package
+install.  Instead, you should check out the source and edit the
+package itself:
+
+/afs/sipb/project/sipbmp3/gutenbach.git
+
+It may be useful to just edit things locally to make sure they work,
+and then add the change into the package.
+
+zsr (in SIPB) is set up to build packages, and already has a git clone
+in /root/gutenbach.  You can edit the source there, build the package,
+and then reinstall the package.
+
+A good guide to get started with debian packaging is here:
+http://debathena.mit.edu/packaging/
+
+jhamrick (Jessica Hamrick) is currently the active maintainer for
+gutenbach, so if you're interested in contributing but don't know
+quite where to start, you should talk to her.
Index: gutenbach/lib/TODO
===================================================================
--- gutenbach/lib/TODO	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/lib/TODO	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,2 @@
+- gutenbach-get-config should fail and error out if it can't find a
+   config file -- we can't use defaults since what would the defaults be?
Index: gutenbach/lib/gutenbach
===================================================================
--- gutenbach/lib/gutenbach	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/lib/gutenbach	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,333 @@
+#!/usr/bin/perl
+# Play the data on STDIN as an audio file
+#
+# $Id: gutenbach-filter,v 1.26 2009/02/20 00:27:17 geofft Exp root $
+# $Source: /usr/local/bin/RCS/gutenbach-filter,v $
+#
+# TODO
+# ----
+# Make this structured code. It's a mess.
+# Repeat what we just played for EXT files too
+# Support HTTP Auth on ogg streams
+# License, cleanup and package
+#
+# Jered Floyd <jered@mit.edu> takes very little credit for this code
+# apparently neither does Quentin Smith <quentin@mit.edu>
+
+use strict;
+use warnings;
+use Image::ExifTool qw(ImageInfo);
+use File::Spec::Functions;
+use File::Temp qw{tempfile tempdir};
+use File::Basename qw(basename);
+use LWP::UserAgent;
+use Data::Dumper;
+use IPC::Open2;
+use English;
+
+use vars qw/$zephyr_class $host $queue $mixer $channel/;
+
+require "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" or die "Unable to load configuration";
+
+my $ua = new LWP::UserAgent;
+
+# This variable contains the pid of the child process (which runs
+# mplayer) once it has been forked, so that we can kill it on SIGTERM
+my $pid;
+
+# Replace STDERR with a log file in /tmp.
+open(CUPS, ">&STDERR") or die "Unable to copy CUPS filehandle";
+close(STDERR);
+open(STDERR, ">>", "/tmp/gutenbach.log") or warn "Couldn't open log: $!";
+
+# Set the TERM environment (for the benefit of mplayer?)
+# I don't know why we do this --quentin
+$ENV{"TERM"}="vt100";
+
+print STDERR "STDERR FROM SPOOL FILTER\n";
+
+# CUPS provides us with these arguments:
+#
+# argv[1]
+# The job ID
+# argv[2]
+# The user printing the job
+# argv[3]
+# The job name/title
+# argv[4]
+# The number of copies to print
+# argv[5]
+# The options that were provided when the job was submitted
+# argv[6]
+# The file to print (first program only)
+#
+# The scheduler runs one or more of these programs to print any given
+# job. The first filter reads from the print file and writes to the
+# standard output, while the remaining filters read from the standard
+# input and write to the standard output. The backend is the last
+# filter in the chain and writes to the device.
+
+printf(STDERR "Got \@ARGV: %s\n", Dumper(\@ARGV));
+
+my %arguments = (
+		 "job-id" => $ARGV[0],
+		 user => $ARGV[1],
+		 "job-title" => $ARGV[2],
+		 copies => $ARGV[3],
+		 options => {split(/[= ]/, $ARGV[4])},
+		 file => $ARGV[5],
+		);
+
+# If we weren't given a filename, we need to read from stdin. Since
+# mplayer really wants a file, let's write out to a temporary file
+# first.
+if (!$arguments{"file"}) {
+  my ($fh, $file) = tempfile("gutenbachXXXXX", UNLINK => 1); # Ask File::Temp for a safe temporary file
+  my $buf;
+  while (read(STDIN, $buf, 1024*1024)) { # Read 1M at a time and put it in the temporary file
+    print $fh $buf;
+  }
+  close($fh);
+  $arguments{"file"} = $file;
+}
+
+printf(STDERR "Got \%arguments: %s\n", Dumper(\%arguments));
+
+# Open up a zwrite command to announce the current track.
+my @zwrite_command = (qw(/usr/bin/zwrite -d -n -c), $zephyr_class, "-i", $queue.'@'.$host, "-s", "Gutenbach Music Spooler");
+
+print STDERR "Invoking @zwrite_command\n";
+open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
+
+my $status;
+if (exists($arguments{"options"}{"job-originating-host-name"})) {
+    print(ZEPHYR $arguments{"user"},"\@",$arguments{"options"}{"job-originating-host-name"}," is playing:\n");
+    $status = "User: ".$arguments{"user"}."\@".$arguments{"options"}{"job-originating-host-name"};
+} else {
+    print(ZEPHYR $arguments{"user"}," is playing:\n");
+    $status = "User: ".$arguments{"user"};
+}
+
+# SIGHUP handler, in case we were aborted
+sub clear_status {
+  kill 15, $pid if $pid;
+  my @zwrite_command = (qw(/usr/bin/zwrite -d -n -c), $zephyr_class, "-i", $queue.'@'.$host, "-s", "Gutenbach Music Spooler");
+  open(ZEPH, "|-", @zwrite_command);
+  print(ZEPH "Playback aborted.\n");
+  close(ZEPH);
+  die;
+}
+
+$SIG{HUP} = \&clear_status;
+$SIG{TERM} = \&clear_status;
+
+# Read the metadata information from the file.
+my ($filepath) = $arguments{"file"};
+my ($fileinfo) = ImageInfo($filepath);
+my ($magic) = $fileinfo->{FileType};
+my ($tempdir);
+my ($newpath);
+
+if ($magic) {
+  # $magic means that Image::ExifTool was able to identify the type of file
+  printf(ZEPHYR "%s file %s\n", $magic, $arguments{"job-title"});
+  $status .= sprintf(" Filetype: %s.", $magic);
+  $status .= sprintf(" Filename: %s.", $arguments{"job-title"});
+
+  if (exists $fileinfo->{'Title'}) {
+    printf(ZEPHYR "\@b{%s}\n", $fileinfo->{'Title'}) if exists $fileinfo->{'Title'};
+    $status .= sprintf(" Title: %s.", $fileinfo->{'Title'});
+  }
+  foreach my $key (qw/Artist Album AlbumArtist/) {
+    if (exists $fileinfo->{$key}) {
+      printf(ZEPHYR "%s\n", $fileinfo->{$key}) if exists $fileinfo->{$key};
+      $status .= sprintf(" %s: %s\n", $key, $fileinfo->{$key});
+    }
+  }
+
+  $tempdir = tempdir();
+  #awful hack -- geofft
+  #== -- quentin
+  # This code appears to create a new temporary directory and symlink
+  # the job file into the temporary directory under the original
+  # filename. I think this is because mplayer sometimes uses the file
+  # extension to identify a filetype.
+  $newpath = $tempdir . '/' . basename($arguments{"job-title"});
+  symlink($filepath, $newpath);
+  $filepath = $newpath;
+}
+elsif ($arguments{copies} == 42) {
+  # This is a flag that is set by jobs queued by split_playlist(); it tells us to not try to split the playlist again.
+  # Call resolve_external_reference to apply some heuristics to determine the filetype.
+  $filepath = resolve_external_reference($filepath, \%arguments);
+  if ($filepath =~ m|http://www\.youtube\.com/watch\?v=|) {
+    # YouTube URLs are resolved by the youtube-dl command.
+    # Launch youtube-dl
+    open(YTDL, "-|", "youtube-dl", "-g", $filepath) or die "Unable to invoke youtube-dl";
+    # Read the title (currently not doing so because youtube-dl doesn't know how to get the title.
+    my $title = ""; # <YTDL>
+    # Print the title to zephyr and the status string.
+    print ZEPHYR "YouTube video $filepath\n$title";
+    $status .= " YouTube video $filepath. $title.";
+    # youtube-dl prints the URL of the flash video, which we pass to mplayer as a filename.
+    $filepath = <YTDL>;
+    chomp $filepath;
+  } else { # Doesn't appear to be a YouTube URL.
+    print STDERR "Resolved external reference to $filepath\n";
+    printf(ZEPHYR "%s\n", $filepath);
+    $status .= sprintf(" External: %s\n", $filepath);
+  }
+}
+elsif (-T $filepath) { # If the file appears to be a text file, treat it as a playlist.
+  split_playlist($filepath, \%arguments);
+  close(ZEPHYR);
+  # See http://www.cups.org/documentation.php/api-filter.html#MESSAGES
+  print CUPS "NOTICE: $status\n";
+  exit 0;
+}
+
+close(ZEPHYR);
+print CUPS "NOTICE: $status\n";
+play_mplayer_audio($filepath, \%arguments);
+
+# Remove the symlink we made earlier for the filetype.
+if ($magic) {
+  unlink($newpath);
+  rmdir($tempdir);
+}
+
+# Play an external stream reference
+sub resolve_external_reference {
+  # Retrieve those command line opts.
+  my ($filepath, $arguments) = @_;
+
+  my ($format, $uri, $userpass);
+
+  open(FILE, "<", $filepath) or die "Couldn't open spool file";
+  if (<FILE> =~ /^(\S+)/) {
+    # Take the leading non-whitespace as a URL
+    $uri=$1;
+
+    if ($uri =~ m|http://www\.youtube\.com/watch\?v=|) {
+      return $uri;
+    }
+
+    # Fetch the URL with a HEAD request to get the content type
+    my $response = $ua->head($uri);
+
+    my $contenttype=($response->content_type() or "unknown");
+
+    if ($contenttype eq "audio/mpeg") { $format="MP3" }
+    elsif ($contenttype eq "application/x-ogg") { $format="OGG" }
+    elsif ($contenttype eq "application/ogg") { $format="OGG" }
+    elsif ($contenttype eq "audio/x-scpls") { $format="SHOUTCAST" }
+    else {
+      print ZEPHYR
+	"Unknown Content-Type $contenttype for URI $uri\n";
+    }
+  } else { # Unable to match the URL regex
+    print ZEPHYR "Couldn't read URI for external reference\n";
+    # Return the existing path, in the hopes that mplayer knows what to do with it.
+    return $filepath;
+  }
+
+  if ($format eq "SHOUTCAST") {
+    print ZEPHYR "Shoutcast playlist...\n";
+    return get_shoutcast($uri);
+  } elsif ($format eq "MP3") {
+  } elsif ($format eq "OGG") {
+  } else {
+    print ZEPHYR "Unrecognized stream format: $format\n";
+  }
+  return $uri;
+}
+
+sub split_playlist {
+  my ($file, $arguments) = @_;
+
+  my $i = 0;
+
+  open(FILE, "<", $filepath) or die "Couldn't open spool file";
+  while (<FILE>) {
+    chomp;
+    if (/^([^#]\S+)/) {
+      printf (STDERR "Found playlist line: %s\n", $_);
+      open(LPR, "|-", 'lpr', '-P'.$queue.'@localhost', '-#', '42', '-J', $arguments->{"job-title"}, '-o', 'job-priority=100');
+      print LPR $1;
+      close(LPR);
+      $i++;
+    }
+  }
+  printf(ZEPHYR "Playlist containing %d valid entries, split into separate jobs.\n", $i);
+}
+
+# Process a Shoutcast playlist
+# get_shoutcast(URI)
+sub get_shoutcast {
+  my $uri = shift(@_);
+
+  my $response = $ua->get($uri);
+  my (@titles, @uris);
+
+  foreach (split("\n", $response->content())) {
+      if (/^File\d+=(\S+)/) {
+	  push(@uris, $1);
+      }
+      if (/^Title\d+=(.+)$/) {
+	  push(@titles, $1);
+      }
+  }
+
+  # choose a random server
+  my $server = int(rand scalar(@uris));
+  # print the name of the stream if available
+  print ZEPHYR "$titles[$server]\n";
+  return $uris[$server];
+}
+
+sub play_mplayer_audio {
+  my ($filepath, $opts) = @_;
+
+  # Open up a zwrite command to show the mplayer output
+  my @zwrite_command = (qw(/usr/bin/zwrite -d -n -c), $zephyr_class, "-i", $queue.'@'.$host, "-s", "Gutenbach Music Spooler");
+
+  print STDERR "Invoking (from play_mplayer_audio): @zwrite_command\n";
+
+  # fork for mplayer
+  $pid = open(MP3STATUS, "-|");
+  unless (defined $pid) {
+    open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
+    print ZEPHYR "Couldn't fork: $!\n";
+    close(ZEPHYR);
+    return;
+  }
+
+  if ($pid) { #parent
+    # Check if there were any errors
+    if ($_ = <MP3STATUS>) {
+      open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
+      print ZEPHYR "Playback completed with the following errors:\n";
+      while (<MP3STATUS>) {
+	print ZEPHYR $_;
+      }
+      close(ZEPHYR);
+    } else {
+      open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
+      print ZEPHYR "Playback completed successfully.\n";
+      close(ZEPHYR);
+    }
+    close(MP3STATUS) || print ZEPHYR "mplayer exited $?\n";
+  }
+  else { # child
+    # redirect STDERR to STDOUT
+    open STDERR, '>&STDOUT';
+    # make sure that mplayer doesn't try to intepret the file as keyboard input
+    close(STDIN);
+    open(STDIN, "/dev/null");
+
+    my @args = (qw|/usr/bin/mplayer -vo fbdev2 -zoom -x 1024 -y 768 -framedrop -nolirc -cache 512 -ao alsa -really-quiet |, $filepath);
+    #print STDERR "About to exec: ", Dumper([@args]);
+    exec(@args) ||
+      die "Couldn't exec";
+  }
+}
Index: gutenbach/lib/gutenbach-get-config
===================================================================
--- gutenbach/lib/gutenbach-get-config	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/lib/gutenbach-get-config	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+use strict;
+# Get configuration of gutenbach
+
+my $zephyr_class = `hostname`;
+chomp($zephyr_class);
+my $host = `hostname`;
+chomp($zephyr_class);
+my $queue = "gutenbach";
+my $mixer = "PCM";
+my $channel = "Front Left";
+
+# Configuration
+my $config_file = "/usr/lib/gutenbach/config/gutenbach-filter-config.pl";
+if (-r $config_file) {
+    # Inline the configuration file
+    local $/;
+    my $fh;
+    open $fh, $config_file;
+    eval <$fh>;
+}
+
+my %config = (
+    'zephyr-class' => $zephyr_class,
+    'host' => $host,
+    'queue' => $queue,
+    'mixer' => $mixer,
+    'channel' => $channel,
+);
+
+foreach my $argv (@ARGV)
+{
+    #print $argv . "\n";
+    print $config{$argv};
+}
Index: gutenbach/rm/cups-remove-printer
===================================================================
--- gutenbach/rm/cups-remove-printer	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/rm/cups-remove-printer	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+echo "Removing gutenbach printer..." >&2
+
+if [ -e /usr/lib/gutenbach/config/printername ]; then
+    printername="$(cat /usr/lib/gutenbach/config/printername)"
+
+    lpadmin -x "$printername"
+
+else
+    echo "Error: /usr/lib/gutenbach/config/printername does not exist"
+fi
Index: gutenbach/rm/cups-revert-perms
===================================================================
--- gutenbach/rm/cups-revert-perms	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/rm/cups-revert-perms	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,25 @@
+#!/bin/sh 
+
+echo "Reverting changes to /etc/cups/cupsd.conf..." >&2
+conffile="/etc/cups/cupsd.conf"
+
+mv "$conffile" "$conffile.bak"
+touch "$conffile"
+sed '/# Begin configurations for gutenbach/,/# End configurations for gutenbach/ d' < "$conffile.bak" > "$conffile"
+
+mv "$conffile" "$conffile.bak"
+touch "$conffile"
+while read line; do
+    listen_localhost=$(echo "$line" | grep '^#GUTENBACH' || true)
+    if [ -n "$listen_localhost" ]; then
+	echo "$(echo $line | sed s/#GUTENBACH//)" >> "$conffile"
+    else
+	root_location=$(echo "$line" | grep '^Allow from All # added by Gutenbach$' || true)
+	if [ -z "$root_location" ]; then
+	    echo "$line" >> "$conffile"
+	fi
+    fi
+
+done < "$conffile.bak"
+
+rm "$conffile.bak"
Index: gutenbach/rm/revert_lpd.conf
===================================================================
--- gutenbach/rm/revert_lpd.conf	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/rm/revert_lpd.conf	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+echo "Reverting changes to /etc/lprng/lpd.conf..." >&2
+mv /etc/lprng/lpd.conf /etc/lprng/lpd.conf.bak
+touch /etc/lprng/lpd.conf
+while read line; do
+    lpd_listen_port=$(echo "$line" | grep ^lpd_listen_port=515$ || true)
+    if [ -z "$lpd_listen_port" ]; then
+	echo "$line" >> /etc/lprng/lpd.conf
+    fi
+done < /etc/lprng/lpd.conf.bak
Index: gutenbach/rm/revert_lpd.perms
===================================================================
--- gutenbach/rm/revert_lpd.perms	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/rm/revert_lpd.perms	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+echo "Reverting changes to /etc/lprng/lpd.perms..." >&2
+mv /etc/lprng/lpd.perms /etc/lprng/lpd.perms.bak
+touch /etc/lprng/lpd.perms
+while read line; do
+    reject_not_server=$(echo "$line" | grep '^#REJECT NOT SERVER$' || true)
+    if [ ! -z "$reject_not_server" ]; then
+	echo "REJECT NOT SERVER" >> /etc/lprng/lpd.perms
+    else
+	reject_service=$(echo "$line" | grep '^#REJECT SERVICE=M$' || true)
+	if [ ! -z "$reject_service" ]; then
+	    echo "REJECT SERVICE=M" >> /etc/lprng/lpd.perms
+	else
+            echo "$line" >> /etc/lprng/lpd.perms
+	fi
+    fi
+done < /etc/lprng/lpd.perms.bak
+rm /etc/lprng/lpd.perms.bak
Index: gutenbach/rm/revert_printcap
===================================================================
--- gutenbach/rm/revert_printcap	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
+++ gutenbach/rm/revert_printcap	(revision 04f7e0593d10b7f59bee40314f6e3e81da8c34ed)
@@ -0,0 +1,30 @@
+#!/bin/sh -e
+
+echo "Reverting changes to /etc/printcap..." >&2
+
+if [ -e /usr/lib/gutenbach/config/printername ]; then
+    printername=$(cat /usr/lib/gutenbach/config/printername)
+
+    mv /etc/printcap /etc/printcap.bak
+    touch /etc/printcap
+    foundprinter="false"
+    while read line; do
+	printername=$(echo "$line" | grep ^`echo $printername`$ || true)
+	if [ -n "$printername" ]; then
+            foundprinter="true"
+	else
+            if [ "$foundprinter"="true" ]; then
+		configline=$(echo "$line" | grep ^[[:space:]]*: || true)
+		if [ -z "$configline" ]; then
+                    foundprinter="false"
+                    echo "$line" >> /etc/printcap
+		fi
+            else
+		echo "$line" >> /etc/printcap
+            fi
+	fi
+    done < /etc/printcap.bak
+    rm /etc/printcap.bak
+else
+    echo "Error: /usr/lib/gutenbach/config/printername does not exist!" >&2
+fi
