From 046406ab6b13659f4be843d3d2d5639efaf425fe Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 12 Nov 2002 12:05:40 +0000 Subject: printer related modules cleaning : - create the printer/ hierarchy - split services related stuff into services.pm & printer::services, - move things that've nothing to do with printers into common.pm (alternatives, permissions, ...) - move eveything related to cups, gimp-print, detection, {star,open}office to the corresponding splited printer:: module - big consolidation of printer::office (it was obvious there were tons of duplication between staroffice and openoffice managment) - move other stuff into printer::main, printer::common, status : print.pm has been heavily splited (now one can begin to understand the little bits). printerdrake still needs to be splited/cleaned and eventually removed since printer/printerdrake modules separation is not understandable by other people till, in printer::gimp, $lprcommand is neither declared nor setted nowhere. idem in mdk9.0 ... --- perl-install/standalone/printerdrake | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'perl-install/standalone/printerdrake') diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake index 19770d97f..a73253d05 100755 --- a/perl-install/standalone/printerdrake +++ b/perl-install/standalone/printerdrake @@ -21,11 +21,11 @@ use lib qw(/usr/lib/libDrakX); use standalone; #- warning, standalone must be loaded very first, for 'explanations' - -use interactive; -use printerdrake; -use printer; use common; +use interactive; +use printer::printerdrake; +use printer::main; +use modules; use c; local $_ = join '', @ARGV; @@ -38,7 +38,7 @@ if (/-expert/) { } elsif (/-beginner/) { $::expert = 0; } else { - printer::get_usermode (); + printer::main::get_usermode (); } $::noauto = /-noauto/; $::testing = /-testing/; @@ -49,33 +49,33 @@ my $in = 'interactive'->vnew('su', 'printer-mdk'); my $commandline = $_; -exit 0 if !printerdrake::first_time_dialog($printer, $in, 1); +exit 0 unless printer::printerdrake::first_time_dialog($printer, $in, 1); { # Check whether Foomatic is installed and install it if necessary -printerdrake::install_foomatic($in); +printer::printerdrake::install_foomatic($in); my $w = $in->wait_message(N("Printerdrake"), N("Reading printer data ...")); # Get what was installed before -eval { $printer = printer::getinfo('') }; +eval { $printer = printer::main::getinfo('') }; # Choose the spooler by command line options $commandline =~ /-cups/ and - $printer->{SPOOLER} = 'cups' and printer::read_configured_queues($printer); + $printer->{SPOOLER} = 'cups' and printer::main::read_configured_queues($printer); $commandline =~ /-lpr/ and - $printer->{SPOOLER} = 'lpd' and printer::read_configured_queues($printer); + $printer->{SPOOLER} = 'lpd' and printer::main::read_configured_queues($printer); $commandline =~ /-lpd/ and - $printer->{SPOOLER} = 'lpd' and printer::read_configured_queues($printer); + $printer->{SPOOLER} = 'lpd' and printer::main::read_configured_queues($printer); $commandline =~ /-lprng/ and - $printer->{SPOOLER} ='lprng' and printer::read_configured_queues($printer); + $printer->{SPOOLER} ='lprng' and printer::main::read_configured_queues($printer); $commandline =~ /-pdq/ and - $printer->{SPOOLER} = 'pdq' and printer::read_configured_queues($printer); + $printer->{SPOOLER} = 'pdq' and printer::main::read_configured_queues($printer); -r '/etc/modules.conf' and modules::mergein_conf('/etc/modules.conf'); } begin: $::isEmbedded and kill 'USR2', $::CCPID; -printerdrake::main($printer, $in, 1); +printer::printerdrake::main($printer, $in, 1); $::isEmbedded ? kill('USR1', $::CCPID) : $in->exit(0); goto begin; -- cgit v1.2.1