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.1 KB
|
Line | |
---|
1 | #!/bin/sh -e |
---|
2 | |
---|
3 | echo "Editing /etc/lprng/lpd.conf..." >&2 |
---|
4 | # add the printcap path to lpd.conf |
---|
5 | if [ -e /etc/lprng/lpd.conf ]; then |
---|
6 | mv /etc/lprng/lpd.conf /etc/lprng/lpd.conf.bak |
---|
7 | touch /etc/lprng/lpd.conf |
---|
8 | |
---|
9 | while read line; do |
---|
10 | printcap=$(echo "$line" | grep ^printcap_path= || true) |
---|
11 | if [ -n "$printcap" ]; then |
---|
12 | lprngprintcap=$(echo "$line" | grep /etc/lprng/printcap || true) |
---|
13 | printcap=$(echo "$line" | grep /etc/printcap || true) |
---|
14 | if [ ! -n "$lprngprintcap" ] && [ ! -n "$printcap" ]; then |
---|
15 | echo "#$line" >> /etc/lprng/lpd.conf |
---|
16 | echo "$line" | sed 's,printcap_path=,printcap_path=/etc/lprng/printcap:\|,' >> /etc/lprng/lpd.conf |
---|
17 | else |
---|
18 | echo "$line" >> /etc/lprng/lpd.conf |
---|
19 | fi |
---|
20 | else |
---|
21 | echo "$line" >> /etc/lprng/lpd.conf |
---|
22 | fi |
---|
23 | done < /etc/lprng/lpd.conf.bak |
---|
24 | rm /etc/lprng/lpd.conf.bak |
---|
25 | else |
---|
26 | touch /etc/lprng/lpd.conf |
---|
27 | echo "printcap_path=/etc/lprng/printcap" >> /etc/lprng/lpd.conf |
---|
28 | fi |
---|
29 | |
---|
30 | # add lpd_listen_port to lpd.conf |
---|
31 | lpd_listen_port=$(cat /etc/lprng/lpd.conf | grep ^lpd_listen_port=515 || true) |
---|
32 | if [ ! -n "$lpd_listen_port" ]; then |
---|
33 | echo "lpd_listen_port=515" >> /etc/lprng/lpd.conf |
---|
34 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.