debianmacno-cupsnodebathenaweb
Last change
on this file since 32b323f was
32b323f,
checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago
|
Expand configurability and improve defaults
- default zephyr class to sipb-test
- autodetect hostname
- allow the ALSA channel to be configured
|
-
Property mode set to
100755
|
File size:
579 bytes
|
Rev | Line | |
---|
[b1d66d4] | 1 | #!/usr/athena/bin/perl |
---|
| 2 | use strict; |
---|
| 3 | # Get configuration of sipbmp3 |
---|
| 4 | |
---|
[32b323f] | 5 | my $zephyr_class = "sipb-test"; |
---|
| 6 | my $host = `hostname`; |
---|
[b1d66d4] | 7 | my $queue = "sipbmp3"; |
---|
[32b323f] | 8 | my $channel = "Headphone"; |
---|
[b1d66d4] | 9 | |
---|
| 10 | # Configuration |
---|
| 11 | my $config_file = "/etc/sipbmp3-filter-config.pl"; |
---|
| 12 | if (-r $config_file) { |
---|
| 13 | # Inline the configuration file |
---|
| 14 | local $/; |
---|
| 15 | my $fh; |
---|
| 16 | open $fh, $config_file; |
---|
| 17 | eval <$fh>; |
---|
| 18 | } |
---|
| 19 | |
---|
| 20 | my %config = ( |
---|
| 21 | 'zephyr-class' => $zephyr_class, |
---|
| 22 | 'host' => $host, |
---|
| 23 | 'queue' => $queue, |
---|
[32b323f] | 24 | 'channel' => $channel, |
---|
[b1d66d4] | 25 | ); |
---|
| 26 | |
---|
| 27 | foreach my $argv (@ARGV) |
---|
| 28 | { |
---|
| 29 | #print $argv . "\n"; |
---|
| 30 | print $config{$argv}; |
---|
| 31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.