debianmacno-cupsnodebathenaweb
Last change
on this file since c631d1a was
c631d1a,
checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago
|
Changed 'sipbmp3' to 'gutenbach' by popular demand. Have not checked for errors, yet.
|
-
Property mode set to
100755
|
File size:
698 bytes
|
Line | |
---|
1 | #!/bin/sh -e |
---|
2 | |
---|
3 | echo "Reverting changes to /etc/printcap..." >&2 |
---|
4 | . /usr/share/debconf/confmodule |
---|
5 | db_get gutenbach/printername |
---|
6 | |
---|
7 | mv /etc/printcap /etc/printcap.bak |
---|
8 | touch /etc/printcap |
---|
9 | foundprinter="false" |
---|
10 | while read line; do |
---|
11 | printername=$(echo "$line" | grep ^`echo $RET`$ || true) |
---|
12 | if [ -n "$printername" ]; then |
---|
13 | foundprinter="true" |
---|
14 | else |
---|
15 | if [ "$foundprinter"="true" ]; then |
---|
16 | configline=$(echo "$line" | grep ^[[:space:]]*: || true) |
---|
17 | if [ -z "$configline" ]; then |
---|
18 | foundprinter="false" |
---|
19 | echo "$line" >> /etc/printcap |
---|
20 | fi |
---|
21 | else |
---|
22 | echo "$line" >> /etc/printcap |
---|
23 | fi |
---|
24 | fi |
---|
25 | done < /etc/printcap.bak |
---|
26 | rm /etc/printcap.bak |
---|
Note: See
TracBrowser
for help on using the repository browser.