summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/printerdrake
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-09-01 12:36:09 +0000
committerFrancois Pons <fpons@mandriva.com>2000-09-01 12:36:09 +0000
commit0c928ac011478e29c10950a8f21e4bd7140e2a63 (patch)
treee6ef28ecbe9d82ee895543842ff97fb69f1f15ae /perl-install/standalone/printerdrake
parented0e070f2f50f0c2283651e1de0c9bb6713f3c29 (diff)
downloaddrakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.tar
drakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.tar.gz
drakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.tar.bz2
drakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.tar.xz
drakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.zip
*** empty log message ***
Diffstat (limited to 'perl-install/standalone/printerdrake')
-rwxr-xr-xperl-install/standalone/printerdrake9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake
index 4903e3bc4..14715e8e3 100755
--- a/perl-install/standalone/printerdrake
+++ b/perl-install/standalone/printerdrake
@@ -37,12 +37,13 @@ $::skiptest = /-skiptest/;
$::testing = /-testing/;
$::isStandalone = 1;
-my $f = "/usr/lib/rhs/rhs-printfilters";
--e $f or system("urpmi --auto rhs-printfilters");
--e $f or die "install rhs-printfilters first!\n";
+my $printer; eval { $printer = printer::getinfo('') };
+/-lpr/ and $printer->{mode} = 'lpr';
+/-cups/ and $printer->{mode} = 'cups';
+$printer->{mode} ||= 'cups'; #- assume this default if nothing found.
my $in = vnew interactive('su');
-printerdrake::main(eval { printer::getinfo('') } || {}, $in, sub { `urpmi --auto $_[0]` });
+printerdrake::main(eval { printer::getinfo('') } || {}, $in, sub { my $l = join(' ', @_); `urpmi --auto $l` });
$in->exit(0);