Changeset e20354c


Ignore:
Timestamp:
Jun 24, 2010, 1:48:08 AM (14 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
master, debian, mac, no-cups, nodebathena, web
Children:
b30ec0c
Parents:
7bc8b29
git-author:
Jessica B. Hamrick <jhamrick@…> (05/12/10 22:47:15)
git-committer:
Jessica B. Hamrick <jhamrick@…> (06/24/10 01:48:08)
Message:

Fix perl bugs in the filter, change 'daemon' to 'lp'

Location:
debian
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • debian/control

    r53e9374 re20354c  
    1010Pre-Depends: debconf
    1111Depends: ${shlibs:Depends}, ${misc:Depends}, mplayer, libimage-exiftool-perl, lprng | debathena-lprng, sysv-rc, adduser, debathena-zephyr-config, libzephyr3-krb, alsa-base
    12 Conflicts: pulseaudio
    13 Provides: pulseaudio
    1412Description: Server for playing music files from a remote machine
    1513 Allows remote machines to play music files on this machine
  • debian/gutenbach.postinst

    r53e9374 re20354c  
    4141
    4242
    43         inaudio=$(groups daemon | grep audio || true)
     43        inaudio=$(groups lp | grep audio || true)
    4444        if [ -z "$inaudio" ]; then
    45             adduser daemon audio
     45            adduser lp audio
    4646        fi
    4747
  • debian/inst/create-filter-config

    r53e9374 re20354c  
    2525mixer="PCM"
    2626channel="Front Left"
     27config_file="/usr/lib/gutenbach/config/gutenbach-filter-config.pl"
    2728
    2829if [ -z "$failed" ]; then
    29     echo "\$zephyr_class = \""$zephyrclass"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
    30     echo "\$host = \""$hostname"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
    31     echo "\$queue = \""$printername"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
    32     echo "\$mixer = \""$mixer"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
    33     echo "\$channel = \""$channel"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
     30    echo "\$zephyr_class = \""$zephyrclass"\";" >> "$config_file"
     31    echo "\$host = \""$hostname"\";" >> "$config_file"
     32    echo "\$queue = \""$printername"\";" >> "$config_file"
     33    echo "\$mixer = \""$mixer"\";" >> "$config_file"
     34    echo "\$channel = \""$channel"\";" >> "$config_file"
     35    echo "1;" >> "$config_file"
    3436else
    3537    echo "Error: One of /usr/lib/gutenbach/config/{printername,hostname,zephyrclass} does not exist!" >&2
  • debian/lib/gutenbach

    r53e9374 re20354c  
    2525use IPC::Open2;
    2626use English;
     27
     28use vars qw/$zephyr_class $host $queue $mixer $channel/;
    2729
    2830require "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" or die "Unable to load configuration";
     
    6567
    6668my %arguments = (
    67                  job-id => $ARGV[0],
     69                 "job-id" => $ARGV[0],
    6870                 user => $ARGV[1],
    69                  job-title => $ARGV[2],
     71                 "job-title" => $ARGV[2],
    7072                 copies => $ARGV[3],
    7173                 options => {split(/[= ]/, $ARGV[4])},
     
    8385  }
    8486  close($fh);
     87  $arguments{"file"} = $file;
    8588}
    8689
     
    9396open(ZEPHYR, "|-", @zwrite_command) or die "Couldn't launch zwrite: $!";
    9497
    95 print(ZEPHYR "$arguments{user}\@$arguments{options}{job-originating-host-name} is playing:\n");
    96 my $status = "User: $arguments{user}\@$arguments{options}{job-originating-host-name}.");
     98print(ZEPHYR $arguments{"user"},"\@",$arguments{"options"}{"job-originating-host-name"}," is playing:\n");
     99my $status = "User: ".$arguments{"user"}."\@".$arguments{"options"}{"job-originating-host-name"};
    97100
    98101# SIGHUP handler, in case we were aborted
     
    107110
    108111# Read the metadata information from the file.
    109 my ($filepath) = $options{"file"};
     112my ($filepath) = $arguments{"file"};
    110113my ($fileinfo) = ImageInfo($filepath);
    111114my ($magic) = $fileinfo->{FileType};
     115my ($tempdir);
     116my ($newpath);
    112117
    113118if ($magic) {
     
    128133  }
    129134
    130   my $tempdir = tempdir();
     135  $tempdir = tempdir();
    131136  #awful hack -- geofft
    132137  #== -- quentin
     
    135140  # filename. I think this is because mplayer sometimes uses the file
    136141  # extension to identify a filetype.
    137   my $newpath = $tempdir . '/' . basename($arguments{"job-title"});
     142  $newpath = $tempdir . '/' . basename($arguments{"job-title"});
    138143  symlink($filepath, $newpath);
    139144  $filepath = $newpath;
     
    184189  my ($filepath, $arguments) = @_;
    185190
    186   my $format, $uri, $userpass;
     191  my ($format, $uri, $userpass);
    187192
    188193  open(FILE, "<", $filepath) or die "Couldn't open spool file";
     
    250255
    251256  my $response = $ua->get($uri);
     257  my (@titles, @uris);
    252258
    253259  foreach (split("\n", $response->content())) {
     
    261267
    262268  # choose a random server
    263   $server = int(rand scalar(@uris));
     269  my $server = int(rand scalar(@uris));
    264270  # print the name of the stream if available
    265271  print ZEPHYR "$titles[$server]\n";
Note: See TracChangeset for help on using the changeset viewer.