summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-08-14 14:20:12 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-08-14 14:20:12 +0000
commit806e5ddd32f5ea26833430ae6064437b73ce3cc9 (patch)
tree33840582fc9291ffa81538af535bd2158d9b4153 /perl-install/printerdrake.pm
parentbdb89adb3629a491d23f94014f3b7f1b0f5badfd (diff)
downloaddrakx-backup-do-not-use-806e5ddd32f5ea26833430ae6064437b73ce3cc9.tar
drakx-backup-do-not-use-806e5ddd32f5ea26833430ae6064437b73ce3cc9.tar.gz
drakx-backup-do-not-use-806e5ddd32f5ea26833430ae6064437b73ce3cc9.tar.bz2
drakx-backup-do-not-use-806e5ddd32f5ea26833430ae6064437b73ce3cc9.tar.xz
drakx-backup-do-not-use-806e5ddd32f5ea26833430ae6064437b73ce3cc9.zip
Transfer queues non-interactively when switching between LPD and LPRng.
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index 084611451..72f1ec24b 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -1037,6 +1037,7 @@ sub copy_queues_from {
my @queuesselected;
my $newspoolerstr;
my $oldspoolerstr;
+ my $noninteractive = 0;
{
my $w = $in->wait_message('', _("Reading printer data ..."));
@oldqueues = printer::get_copiable_queues($oldspooler, $newspooler);
@@ -1047,8 +1048,16 @@ sub copy_queues_from {
push (@queueentries, { text => $_, type => 'bool',
val => \$queuesselected[$#queuesselected] });
}
+ # LPRng and LPD use the same config files, therefore one sees the
+ # queues of LPD when one uses LPRng and vice versa, but these queues
+ # do not work. So automatically transfer all queues when switching
+ # between LPD and LPRng.
+ if (($oldspooler =~ /^lp/) && ($newspooler =~ /^lp/)) {
+ $noninteractive = 1;
+ }
}
- if ($in->ask_from_entries_refH_powered
+ if ($noninteractive ||
+ $in->ask_from_entries_refH_powered
({ title => _("Transfer printer configuration"),
messages => _("You can copy the printer configuration which you have done
for the spooler %s to %s, your current spooler. All the
@@ -1085,6 +1094,7 @@ Mark the printers which you want to transfer and click
my $oldqueue = $_;
my $newqueue = $_;
if ((!$printer->{configured}{$newqueue}) ||
+ ($noninteractive) ||
($in->ask_from_entries_refH_powered
({ title => _("Transfer printer configuration"),
messages => _("A printer named \"%s\" already exists under %s.