summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-04-12 16:16:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-04-12 16:16:39 +0000
commit4cfcceee4332b0b4520e67c7c5cab7b071d3e0bc (patch)
tree99471b3dba022deeab198608991200d55dbf1e7d
parent1002a97916b8da6957fd0080011a377818283b79 (diff)
downloaddrakx-4cfcceee4332b0b4520e67c7c5cab7b071d3e0bc.tar
drakx-4cfcceee4332b0b4520e67c7c5cab7b071d3e0bc.tar.gz
drakx-4cfcceee4332b0b4520e67c7c5cab7b071d3e0bc.tar.bz2
drakx-4cfcceee4332b0b4520e67c7c5cab7b071d3e0bc.tar.xz
drakx-4cfcceee4332b0b4520e67c7c5cab7b071d3e0bc.zip
use run_program and remove "require run_program"s
-rw-r--r--perl-install/printer.pm7
1 files changed, 1 insertions, 6 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index 4006dc446..bb2b15252 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -7,6 +7,7 @@ use vars qw(%thedb %thedb_gsdriver %printer_type %printer_type_inv @papersize_ty
use common qw(:common :system :file);
use commands;
+use run_program;
#-if we are in an DrakX config
my $prefix = "";
@@ -333,7 +334,6 @@ sub write_cupsd_conf {
close F;
#- restart cups after updating configuration.
- require run_program;
run_program::rooted($prefix, "/etc/rc.d/init.d/cups restart"); sleep 1;
}
@@ -489,7 +489,6 @@ sub configure_queue($) {
/CUPS/ && do {
#- at this level, we are using lpadmin to create a local printer (only local
#- printer are supported with printerdrake).
- require run_program;
run_program::rooted($prefix, "lpadmin",
"-p", $entry->{QUEUE},
$entry->{State} eq 'Idle' && $entry->{Accepting} eq 'Yes' ? ("-E") : (),
@@ -634,7 +633,6 @@ sub remove_queue($) {
$printer->{configured}{$printer->{QUEUE}} or return; #- something strange at this point.
if ($printer->{mode} eq 'CUPS') {
- require run_program;
run_program::rooted($prefix, "lpadmin", "-x", $printer->{QUEUE});
}
delete $printer->{configured}{$printer->{QUEUE}};
@@ -647,7 +645,6 @@ sub restart_queue($) {
for ($printer->{mode}) {
/CUPS/ && do {
#- restart cups before cleaning the queue.
- require run_program;
run_program::rooted($prefix, "/etc/rc.d/init.d/cups start"); sleep 1;
run_program::rooted($prefix, "lprm-cups", "-P$queue", "-");
last };
@@ -658,7 +655,6 @@ sub restart_queue($) {
kill 'TERM', $pidlpd if $pidlpd;
unlink "$prefix$_";
}
- require run_program;
run_program::rooted($prefix, "lprm-lpd", "-P$queue", "-"); sleep 1;
run_program::rooted($prefix, "lpd"); sleep 1;
last };
@@ -675,7 +671,6 @@ sub print_pages($@) {
/lpr/ and ($lpr, $lpq) = ("/usr/bin/lpq-lpd", "/usr/bin/lpq-lpd");
}
- require run_program;
foreach (@pages) {
run_program::rooted($prefix, $lpr, "-P$queue", $_);
}