source: trunk/third/lprng/athena/get_hesiod_pcap.sh @ 13548

Revision 13548, 820 bytes checked in by ghudson, 25 years ago (diff)
Put /bin in PATH.
  • Property svn:executable set to *
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
6PATH=/bin/athena:/usr/bin:/bin:/usr/bsd
7
8read printer
9
10case "$printer" in
11all)
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    hesinfo $printer pcap 2>/dev/null
31    ;;
32esac
33
34exit 0
Note: See TracBrowser for help on using the repository browser.