debianmacno-cupsnodebathenaweb
|
Last change
on this file since c061ab8 was
c061ab8,
checked in by Jessica Hamrick <jhamrick@…>, 16 years ago
|
|
First working version of the sipbmp3 package.
|
-
Property mode set to
100755
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | |
|---|
| 3 | # add the printcap path to lpd.conf |
|---|
| 4 | if [ -e /etc/lprng/lpd.conf ]; then |
|---|
| 5 | mv /etc/lprng/lpd.conf /etc/lprng/lpd.conf.bak |
|---|
| 6 | touch /etc/lprng/lpd.conf |
|---|
| 7 | |
|---|
| 8 | while read line; do |
|---|
| 9 | printcap=$(echo "$line" | grep ^printcap_path=) |
|---|
| 10 | if [ -n "$printcap" ]; then |
|---|
| 11 | lprngprintcap=$(echo "$line" | grep /etc/lprng/printcap) |
|---|
| 12 | printcap=$(echo "$line" | grep /etc/printcap) |
|---|
| 13 | if [ ! -n "$lprngprintcap" ] && [ ! -n "$printcap" ]; then |
|---|
| 14 | echo "#$line" >> /etc/lprng/lpd.conf |
|---|
| 15 | echo "$line" | sed 's,printcap_path=,printcap_path=/etc/lprng/printcap:\|,' >> /etc/lprng/lpd.conf |
|---|
| 16 | else |
|---|
| 17 | echo "$line" >> /etc/lprng/lpd.conf |
|---|
| 18 | fi |
|---|
| 19 | else |
|---|
| 20 | echo "$line" >> /etc/lprng/lpd.conf |
|---|
| 21 | fi |
|---|
| 22 | done < /etc/lprng/lpd.conf.bak |
|---|
| 23 | rm /etc/lprng/lpd.conf.bak |
|---|
| 24 | else |
|---|
| 25 | touch /etc/lprng/lpd.conf |
|---|
| 26 | echo "printcap_path=/etc/lprng/printcap" >> /etc/lprng/lpd.conf |
|---|
| 27 | fi |
|---|
| 28 | |
|---|
| 29 | # add lpd_listen_port to lpd.conf |
|---|
| 30 | lpd_listen_port=$(cat /etc/lprng/lpd.conf | grep ^lpd_listen_port=515) |
|---|
| 31 | if [ ! -n "$lpd_listen_port" ]; then |
|---|
| 32 | echo "lpd_listen_port=515" >> /etc/lprng/lpd.conf |
|---|
| 33 | fi |
|---|
Note: See
TracBrowser
for help on using the repository browser.