Commit 9f2e4fa8 authored by Martin Klimeš's avatar Martin Klimeš
Browse files

rename printers

parent 07882e9d
......@@ -23,12 +23,12 @@ else
copy("$REPO/cron.pl", "/etc/cron.weekly/fi_printers_cron")
or die "Could not update /etc/cron.weekly/fi_printers_cron";
my @files = glob('/etc/cups/ppd/*fi.muni.ppd');
my @files = glob('/etc/cups/ppd/*@fi.ppd');
for my $item (@files) {
print "current $item\n";
$item =~ s/\/etc\/cups\/ppd\///;
$item =~ s/\.fi\.muni\.cz\.ppd//;
$item =~ s/\@fi\.ppd//;
}
for my $printer (@files) {
......
......@@ -161,7 +161,7 @@ sub install_printer {
my $url = get_url($printer_name);
my $command = qq(lpadmin \\
-p "${printer_name}.fi.muni.cz" \\
-p "${printer_name}\@fi" \\
-D "${printer_name} (FI MUNI)" \\
-L "$printers->{$printer_name}->{'location'}" \\
-E \\
......@@ -189,7 +189,7 @@ sub update_ppd {
my ($printer_name) = @_;
my $command = qq(lpadmin \\
-p "${printer_name}.fi.muni.cz" \\
-p "${printer_name}\@fi" \\
-P "ppds/${printer_name}.ppd" );
system($command);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment