summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-15 12:38:26 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-15 12:38:26 +0000
commitf10f245015f67547e706f07f1e9340ccc72f313b (patch)
tree21f78f8d0cf48fbfb473a1c66033fda0b19f631e /perl-install
parent89a188d4a8a8ce296814ca52c0093f914982ec09 (diff)
downloaddrakx-backup-do-not-use-f10f245015f67547e706f07f1e9340ccc72f313b.tar
drakx-backup-do-not-use-f10f245015f67547e706f07f1e9340ccc72f313b.tar.gz
drakx-backup-do-not-use-f10f245015f67547e706f07f1e9340ccc72f313b.tar.bz2
drakx-backup-do-not-use-f10f245015f67547e706f07f1e9340ccc72f313b.tar.xz
drakx-backup-do-not-use-f10f245015f67547e706f07f1e9340ccc72f313b.zip
consolidate some stuff into printer::data::spoolers{XXX}{alternatives}
so that all alternatives get centralized in one data structure
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/printer/data.pm37
-rw-r--r--perl-install/printer/printerdrake.pm33
2 files changed, 45 insertions, 25 deletions
diff --git a/perl-install/printer/data.pm b/perl-install/printer/data.pm
index 2e20db2b5..f5230568b 100644
--- a/perl-install/printer/data.pm
+++ b/perl-install/printer/data.pm
@@ -16,23 +16,52 @@ our %spoolers = ('ppq' => {
'help' => "/usr/bin/lphelp %s |",
'print_command' => 'lpr-pdq',
'long_name' => N("PDQ - Print, Don't Queue"),
- 'short_name' => N("PDQ")
+ 'short_name' => N("PDQ"),
+ 'alternatives' => [
+ [ 'lpr', '/usr/bin/lpr-pdq' ],
+ [ 'lpq', '/usr/bin/lpq-foomatic' ],
+ [ 'lprm', '/usr/bin/lprm-foomatic' ]
+ ]
},
'lpd' => {
'help' => "/usr/bin/pdq -h -P %s 2>&1 |",
'print_command' => 'lpr',
'long_name' => N("LPD - Line Printer Daemon"),
- 'short_name' => N("LPD")
+ 'short_name' => N("LPD"),
+ 'alternatives' => [
+ [ 'lpr', '/usr/bin/lpr-lpd' ],
+ [ 'lpq', '/usr/bin/lpq-lpd' ],
+ [ 'lprm', '/usr/bin/lprm-lpd' ],
+ [ 'lpc', '/usr/sbin/lpc-lpd' ]
+ ]
},
'lprng' => {
'print_command' => 'lpr-lpd',
'long_name' => N("LPRng - LPR New Generation"),
- 'short_name' => N("LPRng")
+ 'short_name' => N("LPRng"),
+ 'alternatives' => [
+ [ 'lpr', '/usr/bin/lpr-lpd' ],
+ [ 'lpq', '/usr/bin/lpq-lpd' ],
+ [ 'lprm', '/usr/bin/lprm-lpd' ],
+ [ 'lp', '/usr/bin/lp-lpd' ],
+ [ 'cancel', '/usr/bin/cancel-lpd' ],
+ [ 'lpstat', '/usr/bin/lpstat-lpd' ],
+ [ 'lpc', '/usr/sbin/lpc-lpd' ]
+ ]
},
'cups' => {
'print_command' => 'lpr-cups',
'long_name' => N("CUPS - Common Unix Printing System"),
- 'short_name' => N("CUPS")
+ 'short_name' => N("CUPS"),
+ 'alternatives' => [
+ [ 'lpr', '/usr/bin/lpr-cups' ],
+ [ 'lpq', '/usr/bin/lpq-cups' ],
+ [ 'lprm', '/usr/bin/lprm-cups' ],
+ [ 'lp', '/usr/bin/lp-cups' ],
+ [ 'cancel', '/usr/bin/cancel-cups' ],
+ [ 'lpstat', '/usr/bin/lpstat-cups' ],
+ [ 'lpc', '/usr/sbin/lpc-cups' ]
+ ]
}
);
our %spooler_inv = map { $spoolers{$_}{long_name} => $_ } keys %spoolers;
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index e1cf3f15b..ed96d66f7 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -2704,13 +2704,9 @@ sub install_spooler {
# startup of printerdrake for several seconds.
printer::services::start_not_running_service("cups");
# Set the CUPS tools as defaults for "lpr", "lpq", "lprm", ...
- set_alternative("lpr", "/usr/bin/lpr-cups");
- set_alternative("lpq", "/usr/bin/lpq-cups");
- set_alternative("lprm", "/usr/bin/lprm-cups");
- set_alternative("lp", "/usr/bin/lp-cups");
- set_alternative("cancel", "/usr/bin/cancel-cups");
- set_alternative("lpstat", "/usr/bin/lpstat-cups");
- set_alternative("lpc", "/usr/sbin/lpc-cups");
+ foreach (@{$spoolers{cups}{alternatives}}){
+ set_alternative($_->[0], $_->[1]);
+ }
# Remove PDQ panic buttons from the user's KDE Desktops
printer::main::pdq_panic_button("remove");
}
@@ -2746,10 +2742,9 @@ sub install_spooler {
# Start daemon
printer::services::restart("lpd");
# Set the LPD tools as defaults for "lpr", "lpq", "lprm", ...
- set_alternative("lpr", "/usr/bin/lpr-lpd");
- set_alternative("lpq", "/usr/bin/lpq-lpd");
- set_alternative("lprm", "/usr/bin/lprm-lpd");
- set_alternative("lpc", "/usr/sbin/lpc-lpd");
+ foreach (@{$spoolers{lpd}{alternatives}}){
+ set_alternative($_->[0], $_->[1]);
+ }
# Remove PDQ panic buttons from the user's KDE Desktops
printer::main::pdq_panic_button("remove");
}
@@ -2785,13 +2780,9 @@ sub install_spooler {
# Start daemon
printer::services::restart("lpd");
# Set the LPRng tools as defaults for "lpr", "lpq", "lprm", ...
- set_alternative("lpr", "/usr/bin/lpr-lpd");
- set_alternative("lpq", "/usr/bin/lpq-lpd");
- set_alternative("lprm", "/usr/bin/lprm-lpd");
- set_alternative("lp", "/usr/bin/lp-lpd");
- set_alternative("cancel", "/usr/bin/cancel-lpd");
- set_alternative("lpstat", "/usr/bin/lpstat-lpd");
- set_alternative("lpc", "/usr/sbin/lpc-lpd");
+ foreach (@{$spoolers{lprng}{alternatives}}){
+ set_alternative($_->[0], $_->[1]);
+ }
# Remove PDQ panic buttons from the user's KDE Desktops
printer::main::pdq_panic_button("remove");
}
@@ -2812,9 +2803,9 @@ sub install_spooler {
# PDQ has no daemon, so nothing needs to be started
# Set the PDQ tools as defaults for "lpr", "lpq", "lprm", ...
- set_alternative("lpr", "/usr/bin/lpr-pdq");
- set_alternative("lpq", "/usr/bin/lpq-foomatic");
- set_alternative("lprm", "/usr/bin/lprm-foomatic");
+ foreach (@{$spoolers{pdq}{alternatives}}){
+ set_alternative($_->[0], $_->[1]);
+ }
# Add PDQ panic buttons to the user's KDE Desktops
printer::main::pdq_panic_button("add");
}