source: gutenbach/debian/inst/edit-lpd.perms @ 5b82eed

debianmacno-cupsnodebathenaweb
Last change on this file since 5b82eed was 5b82eed, checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago

Fixed comments in debina/inst/edit-lpd.perms

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!/bin/sh
2
3# make lpd less paranoid about accepting connections
4# (comment out REJECT NOT SERVER)
5# allow other users to dequeue music
6# (comment out REJECT SERVICE=M)
7# make it only accept A jobs
8# (add
9#    ACCEPT SERVICE=R,P SERVER
10#    ACCEPT C=CA* SERVICE=R,P
11#    REJECT SERVICE=R,P)
12
13echo "Editing /etc/lprng/lpd.perms..." >&2
14if [ -e /etc/lprng/lpd.perms ]; then
15    mv /etc/lprng/lpd.perms /etc/lprng/lpd.perms.bak
16    touch /etc/lprng/lpd.perms 
17
18    while read line; do
19        reject_not_server=$(echo "$line" | grep '^REJECT NOT SERVER' || true)
20        if [ -n "$reject_not_server" ]; then
21            echo "#$line" >> /etc/lprng/lpd.perms
22           
23            echo "## BEGIN gutenbach configuration" >> /etc/lprng/lpd.perms
24            echo "ACCEPT SERVICE=R,P SERVER" >> /etc/lprng/lpd.perms
25            echo "ACCEPT C=CA* SERVICE=R,P" >> /etc/lprng/lpd.perms
26            echo "REJECT SERVICE=R,P" >> /etc/lprng/lpd.perms
27            echo "## END gutenbach configuration" >> /etc/lprng/lpd.perms
28        else
29            reject_service=$(echo "$line" | grep '^REJECT SERVICE=M' || true)
30            if [ -n "$reject_service" ]; then
31                echo "#line" >> /etc/lprng/lpd.perms
32            else
33                echo "$line" >> /etc/lprng/lpd.perms
34            fi
35        fi
36    done < /etc/lprng/lpd.perms.bak
37    rm /etc/lprng/lpd.perms.bak
38fi
Note: See TracBrowser for help on using the repository browser.