Revision 125, 1.1 kB
(checked in by broder, 17 years ago)
|
Created macathena-lprng-config info file. Also marked config files in lprng
and macathena-afs-config, and fixed a bug in the autoconf for lprng-config
|
Line | |
---|
1 |
#!/bin/sh |
---|
2 |
# $Id: get_hesiod_pcap.sh,v 1.3 1999/09/02 14:33:29 ghudson Exp $ |
---|
3 |
|
---|
4 |
# Support script used by LPRng to fetch Hesiod printcap entries |
---|
5 |
|
---|
6 |
PATH=$PATH:@prefix@/bin |
---|
7 |
|
---|
8 |
read printer |
---|
9 |
|
---|
10 |
case "$printer" in |
---|
11 |
all) |
---|
12 |
# If printer is "all", it wants a list of all available printers, the |
---|
13 |
# first of which will be considered the default printer. We can't get |
---|
14 |
# all printers, so just give the default. |
---|
15 |
|
---|
16 |
if [ -z "$PRINTER" ]; then |
---|
17 |
host=`hostname` |
---|
18 |
PRINTER=`hesinfo "$host" cluster 2>/dev/null | \ |
---|
19 |
awk '/^lpr / {print $2; exit;}'` |
---|
20 |
if [ -z "$PRINTER" ]; then |
---|
21 |
# We have no default. Let LPRng come up with its own default. |
---|
22 |
exit 0 |
---|
23 |
fi |
---|
24 |
fi |
---|
25 |
echo "all:all=$PRINTER" |
---|
26 |
;; |
---|
27 |
|
---|
28 |
*) |
---|
29 |
# Otherwise just look up the printer it asked for |
---|
30 |
PCAP=`hesinfo "$printer" pcap 2>/dev/null` |
---|
31 |
|
---|
32 |
# If the user has no tickets, and the printer supports, but does |
---|
33 |
# not require, Kerberos authentication, then don't attempt |
---|
34 |
# it. (andersk, following suggestion by jdreed) |
---|
35 |
if ! klist -s 2>/dev/null; then |
---|
36 |
PCAP=`echo "$PCAP" | sed '/ka#0/ s/:auth=kerberos5//g'` |
---|
37 |
fi |
---|
38 |
|
---|
39 |
PCAP=`echo $PCAP | sed s/:auth=none//g` |
---|
40 |
|
---|
41 |
echo "$PCAP" |
---|
42 |
;; |
---|
43 |
esac |
---|
44 |
|
---|
45 |
exit 0 |
---|