Commit 9a9fcf36 authored by Martin Klimes (k11m1)'s avatar Martin Klimes (k11m1)
Browse files

cleanup, one-for-all

parent 193ce7fa
......@@ -143,68 +143,7 @@ sub get_url {
return "smb://NTFI\\${user}:${password}\@print.fi.muni.cz/$printer_name";
}
sub hp_laserjet_600 {
my ($printer_name) = @_;
my $url = get_url($printer_name);
my $command = qq(lpadmin \\
-p "${printer_name}.fi.muni" \\
-D "${printer_name} (FI MUNI)" \\
-L "$printers->{$printer_name}->{'location'}" \\
-E \\
-v "${url}" \\
-P "ppds/${printer_name}.ppd" \\
-o media-default=iso_a4_210x297mm \\
-o sides-default=two-sided-long-edge \\
-o auth-info-required=username,password \\
-o HPOption_Duplexer=True); # REVIEW nevím jestli tohle je ok
# NOTE asi je... mozna tu muze byt i disk
system($command);
return;
}
sub TA_4505ci {
my ($printer_name) = @_;
my $url = get_url($printer_name);
# Add cups printer
# sudo lpadmin CLI CUPS administration
# -p "${printers[$printer]}" Set printer name
# -D "${descriptions[$printer]}" Set printer description
# -L "${locations[$printer]}" Set printer location
# -E Enables the destination and accepts jobs (cupsaccept+cupsenable)
# -v smb://print.fi.muni.cz/$printer Set printer URI
# -m UTAX_TA/TA4505ci.ppd Set PPD file
# -o media-default=iso_a4_210x297mm Set default paper format
# -o sides-default=two-sided-long-edge Set two-sided as default
# -o auth-info-required=username,password Enable password authentication
# -o Option19=One Cassettes 3, 4 installed
# -o Option21=True Punch unit installed
# -o Option17=DF730 1000-page finisher installed
my $command = qq(lpadmin \\
-p "${printer_name}.fi.muni" \\
-D "${printer_name} (FI MUNI)" \\
-L "$printers->{$printer_name}->{'location'}" \\
-E \\
-v "${url}" \\
-P "ppds/${printer_name}.ppd" \\
-o media-default=iso_a4_210x297mm \\
-o sides-default=two-sided-long-edge \\
-o auth-info-required=username,password \\
-o Option19=One \\
-o Option21=True \\
-o Option17=DF730);
system($command);
return;
}
sub generic_printer {
sub install_printer {
my ($printer_name) = @_;
my $url = get_url($printer_name);
......
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