summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-09-04 22:44:23 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-09-04 22:44:23 +0000
commit2ae9fd6598b90404d0b01a9d82e452493efacdaa (patch)
tree367f1a4d5ccaee5d4b83b16e24ef9d5198aa9c4d /perl-install
parent831b3b8b6b29fba4ae696f06ce5149c4656339f0 (diff)
downloaddrakx-backup-do-not-use-2ae9fd6598b90404d0b01a9d82e452493efacdaa.tar
drakx-backup-do-not-use-2ae9fd6598b90404d0b01a9d82e452493efacdaa.tar.gz
drakx-backup-do-not-use-2ae9fd6598b90404d0b01a9d82e452493efacdaa.tar.bz2
drakx-backup-do-not-use-2ae9fd6598b90404d0b01a9d82e452493efacdaa.tar.xz
drakx-backup-do-not-use-2ae9fd6598b90404d0b01a9d82e452493efacdaa.zip
Fitted to the new Foomatic version.
Fixed bug of spooler change only working when language is English.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/printer.pm8
-rw-r--r--perl-install/printerdrake.pm11
2 files changed, 11 insertions, 8 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index 140b8442f..7e815e9b4 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -482,10 +482,10 @@ sub get_cups_default_printer {
return undef;
}
-sub set_cups_default_printer {
+sub set_default_printer {
my $default = $_[0];
- run_program::rooted($prefix, "lpoptions",
- "-d", $default) || return;
+ run_program::rooted($prefix, "foomatic-configure",
+ "-D", "-n", $default) || return;
}
sub read_cupsd_conf {
@@ -718,7 +718,7 @@ sub configure_queue($) {
sub remove_queue($$) {
my ($printer) = $_[0];
my ($queue) = $_[1];
- run_program::rooted($prefix, "foomatic-configure", "-D",
+ run_program::rooted($prefix, "foomatic-configure", "-R",
"-s", $printer->{SPOOLER},
"-n", $queue);
delete $printer->{configured}{$queue};
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index 292beb79b..e75140b36 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -121,7 +121,7 @@ these fields blank."),
$default = $1;
}
if ($default ne "None") {
- printer::set_cups_default_printer($default);
+ printer::set_default_printer($default);
}
# Set BrowsePoll line
if (($server ne $oldserver) || ($port ne $oldport)) {
@@ -1155,7 +1155,7 @@ sub main {
{
my $w = $in->wait_message('', _("Checking installed software..."));
if ((!$::testing) &&
- (!printer::files_exist((qw(/usr/sbin/foomatic-configure
+ (!printer::files_exist((qw(/usr/bin/foomatic-configure
/usr/lib/perl5/site_perl/5.6.1/Foomatic/DB.pm
/usr/bin/escputil
/usr/share/printer-testpages/testprint.ps
@@ -1210,6 +1210,9 @@ sub main {
} else {
# Ask for a spooler when none is defined
$printer->{SPOOLER} ||= setup_default_spooler ($printer, $in) || return;
+ # This entry and the check for this entry have to use
+ # the same translation to work properly
+ my $spoolerentry = _("Spooler: ");
# Show a queue list window when there is at least one queue
# or when we are in expert mode
unless ((%{$printer->{configured} || {}} == ()) &&
@@ -1233,7 +1236,7 @@ sub main {
_("Add printer"),
# In expert mode we can change the spooler
($::expert ?
- ( _("Spooler: ") .
+ ( $spoolerentry .
$printer::spooler_inv{$printer->{SPOOLER}} ) : ()),
# Bored by configuring your printers, get out of here!
_("Done") ] } ]
@@ -1251,7 +1254,7 @@ sub main {
my $i = ''; while ($i < 100) { last unless exists $queues{"lp$i"}; ++$i; }
$queue = "lp$i";
}
- if ($queue =~ /^Spooler: /) {
+ if ($queue =~ /^$spoolerentry/) {
$printer->{SPOOLER} = setup_default_spooler ($printer, $in) || $printer->{SPOOLER};
next;
}