debianmacno-cups
Last change
on this file since 569c377 was
55b24d1,
checked in by Kyle Brogle <broglek@…>, 14 years ago
|
changed create-filter-config to use the mixer and channel settings from debconf
|
-
Property mode set to
100755
|
File size:
1.4 KB
|
Rev | Line | |
---|
[c631d1a] | 1 | #!/bin/sh -e |
---|
| 2 | |
---|
| 3 | echo "Creating /usr/lib/gutenbach/config/gutenbach-filter-config.pl..." >&2 |
---|
[8fdf1a8] | 4 | if [ -e "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" ]; then |
---|
| 5 | rm /usr/lib/gutenbach/config/gutenbach-filter-config.pl |
---|
| 6 | fi |
---|
[c631d1a] | 7 | |
---|
[8fdf1a8] | 8 | failed= |
---|
| 9 | if [ -e /usr/lib/gutenbach/config/printername ]; then |
---|
| 10 | printername=$(cat /usr/lib/gutenbach/config/printername) |
---|
| 11 | else |
---|
| 12 | failed="yes" |
---|
| 13 | fi |
---|
| 14 | if [ -e /usr/lib/gutenbach/config/hostname ]; then |
---|
| 15 | hostname=$(cat /usr/lib/gutenbach/config/hostname) |
---|
| 16 | else |
---|
| 17 | failed="yes" |
---|
| 18 | fi |
---|
| 19 | if [ -e /usr/lib/gutenbach/config/zephyrclass ]; then |
---|
| 20 | zephyrclass=$(cat /usr/lib/gutenbach/config/zephyrclass) |
---|
| 21 | else |
---|
| 22 | failed="yes" |
---|
| 23 | fi |
---|
[55b24d1] | 24 | if [ -e /usr/lib/gutenbach/remctl/config/mixer ]; then |
---|
| 25 | mixer=$(cat /usr/lib/gutenbach/remctl/config/mixer) |
---|
| 26 | else |
---|
| 27 | mixer="PCM" |
---|
| 28 | fi |
---|
| 29 | if [ -e /usr/lib/gutenbach/remctl/config/channel ]; then |
---|
| 30 | channel=$(cat /usr/lib/gutenbach/remctl/config/channel) |
---|
| 31 | else |
---|
| 32 | channel="Front Left" |
---|
| 33 | fi |
---|
| 34 | |
---|
| 35 | |
---|
[e4cb270] | 36 | |
---|
[e20354c] | 37 | config_file="/usr/lib/gutenbach/config/gutenbach-filter-config.pl" |
---|
[8fdf1a8] | 38 | |
---|
| 39 | if [ -z "$failed" ]; then |
---|
[e20354c] | 40 | echo "\$zephyr_class = \""$zephyrclass"\";" >> "$config_file" |
---|
| 41 | echo "\$host = \""$hostname"\";" >> "$config_file" |
---|
| 42 | echo "\$queue = \""$printername"\";" >> "$config_file" |
---|
| 43 | echo "\$mixer = \""$mixer"\";" >> "$config_file" |
---|
| 44 | echo "\$channel = \""$channel"\";" >> "$config_file" |
---|
| 45 | echo "1;" >> "$config_file" |
---|
[8fdf1a8] | 46 | else |
---|
| 47 | echo "Error: One of /usr/lib/gutenbach/config/{printername,hostname,zephyrclass} does not exist!" >&2 |
---|
| 48 | exit 1 |
---|
[e20354c] | 49 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.