Pixel <[EMAIL PROTECTED]> writes:

> > Also, earlier error still present which prevents printer setup:
> > 
> > could not start chmod! at ... /common.pm line 226 ...
> 
> there are quite a few pbs with printerdrake at the moment. I tried
> to fix some but there are tvignaud's bugs and don't want him to
> reproach me for stealing his bugs ;)

this fix the printerdrake bug i'm aware of :

Index: data.pm
===================================================================
RCS file: /cooker/gi/perl-install/printer/data.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -p -r1.6 -r1.7
--- data.pm	13 Dec 2002 20:23:46 -0000	1.6
+++ data.pm	6 Jan 2003 10:01:52 -0000	1.7
@@ -94,6 +94,6 @@ our %spoolers = ('pdq' => {
                     ]
 			 }
             );
-our %spooler_inv = map { $spoolers{$_}{long_name} => $_ } keys %spoolers;
+our %spooler_inv = map { $spoolers{$_}{long_name} => $spoolers{$_} } keys %spoolers;
 
-our %shortspooler_inv = map { $spoolers{$_}{short_name} => $_ } keys %spoolers;
+our %shortspooler_inv = map { $spoolers{$_}{short_name} => $spoolers{$_} } keys %spoolers;
Index: main.pm
===================================================================
RCS file: /cooker/gi/perl-install/printer/main.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -w -p -r1.22 -r1.23
--- main.pm	19 Dec 2002 20:55:49 -0000	1.22
+++ main.pm	6 Jan 2003 10:02:37 -0000	1.23
@@ -1,6 +1,6 @@
 package printer::main;
 
-# $Id: main.pm,v 1.22 2002/12/19 20:55:49 prigaux Exp $
+# $Id: main.pm,v 1.23 2003/01/06 10:02:37 tvignaud Exp $
 
 use strict;
 
@@ -52,7 +52,7 @@ sub spooler {
     my @res;
     my @spoolers = qw(cups pdq);
     push @spoolers, 'lprng' if files_exist(qw(/usr/lib/filters/lpf /usr/sbin/lpd));
-    push @res, $spooler_inv{$_}{long_name} foreach @spoolers;
+    push @res, $spoolers{$_}{long_name} foreach @spoolers;
     return @res;
 }
 
Index: printerdrake.pm
===================================================================
RCS file: /cooker/gi/perl-install/printer/printerdrake.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -w -p -r1.28 -r1.29
--- printerdrake.pm	3 Jan 2003 13:35:32 -0000	1.28
+++ printerdrake.pm	6 Jan 2003 10:09:21 -0000	1.29
@@ -1,5 +1,5 @@
 package printer::printerdrake;
-# $Id: printerdrake.pm,v 1.28 2003/01/03 13:35:32 prigaux Exp $
+# $Id: printerdrake.pm,v 1.29 2003/01/06 10:09:21 tvignaud Exp $
 
 use strict;
 
@@ -2338,8 +2338,8 @@ sub copy_queues_from {
 				  N("Reading printer data..."));
 	@oldqueues = printer::main::get_copiable_queues($oldspooler, $newspooler);
 	@oldqueues = sort(@oldqueues);
-	$newspoolerstr = $printer::shortspooler_inv{$newspooler};
-	$oldspoolerstr = $printer::shortspooler_inv{$oldspooler};
+	$newspoolerstr = $printer::data::shortspooler_inv{$newspooler};
+	$oldspoolerstr = $printer::data::shortspooler_inv{$oldspooler};
 	foreach (@oldqueues) {
 	    push @queuesselected, 1;
 	    push @queueentries, { text => $_, type => 'bool', 
@@ -2566,7 +2566,7 @@ sub security_check {
 This printing system runs a daemon (background process) which waits for print jobs and handles them. This daemon is also accessable by remote machines through the network and so it is a possible point for attacks. Therefore only a few selected daemons are started by default in this security level.
 
 Do you really want to configure printing on this machine?",
-			   $printer::main::shortspooler_inv{$spooler},
+			   $printer::data::shortspooler_inv{$spooler},
 			   $securitystr))) {
         printer::main::add_spooler_to_security_level($spooler, $security);
 	my $service;
@@ -2601,7 +2601,7 @@ sub start_spooler_on_boot {
 It is possible that the automatic starting was turned off by changing to a higher security level, because the printing system is a potential point for attacks.
 
 Do you want to have the automatic starting of the printing system turned on again?",
-		       $printer::main::shortspooler_inv{$printer->{SPOOLER}}))) {
+		       $printer::data::shortspooler_inv{$printer->{SPOOLER}}))) {
 	    services::start_service_on_boot($service);
 	}
     }
@@ -2675,11 +2675,12 @@ sub setup_default_spooler {
     $in->set_help('setupDefaultSpooler') if $::isInstall;
     $printer->{SPOOLER} ||= 'cups';
     my $oldspooler = $printer->{SPOOLER};
+
     my $str_spooler = 
 	$in->ask_from_list_(N("Select Printer Spooler"),
 			    N("Which printing system (spooler) do you want to use?"),
 			    [ printer::main::spooler() ],
-			    $printer::spooler_inv{$printer->{SPOOLER}},
+			    $spoolers{$printer->{SPOOLER}},
 			    ) or return;
     $printer->{SPOOLER} = $printer::spooler{$str_spooler};
     # Install the spooler if not done yet

Reply via email to