Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
unix
FI printers over Samba on Linux
Commits
9f2e4fa8
Commit
9f2e4fa8
authored
Nov 05, 2021
by
Martin Klimeš
Browse files
rename printers
parent
07882e9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
cron.pl
View file @
9f2e4fa8
...
...
@@ -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/*f
i.mun
i.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
)
{
...
...
install.pl
View file @
9f2e4fa8
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment