debianmacno-cupsnodebathenaweb
Last change
on this file since 53e9374 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
|
Rev | Line | |
---|
[1bdadfb] | 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 |
---|
[5b82eed] | 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 | |
---|
[331360d] | 13 | echo "Editing /etc/lprng/lpd.perms..." >&2 |
---|
[1bdadfb] | 14 | if [ -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 |
---|
[331360d] | 19 | reject_not_server=$(echo "$line" | grep '^REJECT NOT SERVER' || true) |
---|
[1bdadfb] | 20 | if [ -n "$reject_not_server" ]; then |
---|
| 21 | echo "#$line" >> /etc/lprng/lpd.perms |
---|
[5b82eed] | 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 |
---|
[1bdadfb] | 28 | else |
---|
[331360d] | 29 | reject_service=$(echo "$line" | grep '^REJECT SERVICE=M' || true) |
---|
[1bdadfb] | 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 |
---|
| 38 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.