source: debian/inst/edit-printcap @ c94338b

debianmacno-cupsnodebathenaweb
Last change on this file since c94338b was 53e9374, checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago

Remove other submodules and move some things around

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!/bin/sh -e
2
3echo "Editing /etc/printcap..." >&2
4if [ ! -e /etc/printcap ]; then
5    touch /etc/printcap
6fi
7
8if [ ! -e /etc/lprng/printcap ]; then
9    ln -s /etc/printcap /etc/lprng/printcap
10fi
11
12if [ -e /usr/lib/gutenbach/config/printername ]; then
13    printername=$(cat /usr/lib/gutenbach/config/printername)
14
15    printcap=$(cat /etc/printcap | grep ^`echo $printername` || true)
16    if [ ! -n "$printcap" ]; then
17    # add the appropriate entry into /etc/printcap, /etc/lprng/printcap
18        echo "$printername" >> /etc/printcap
19        echo "  :server" >> /etc/printcap
20        echo "  :cm=Gutenbach Music Spooler" >> /etc/printcap
21        echo "  :lp=/dev/null" >> /etc/printcap
22        echo "  :if=|/usr/lib/gutenbach/gutenbach-filter" >> /etc/printcap
23        echo "  :lf=/var/spool/lpd/$printername/log" >> /etc/printcap
24        echo "  :sd=/var/spool/lpd/$printername" >> /etc/printcap
25        echo "  :ml=0:mx=0:sh" >> /etc/printcap
26        echo "  :create_files" >> /etc/printcap
27        echo "  :auth_forward=kerberos5" >> /etc/printcap
28        echo "  :use_auth=kerberos5" >> /etc/printcap
29        echo "  :kerberos_id=daemon/"`hostname`".mit.edu@ATHENA.MIT.EDU" >> /etc/printcap
30        echo "  :kerberos_keytab=/etc/daemon.keytab" >> /etc/printcap
31    fi
32else
33    echo "Error: /usr/lib/gutenbach/config/printername does not exist!" >&2
34    exit 1
35fi
Note: See TracBrowser for help on using the repository browser.