[plug] Mandrake 7.2 CUPS print driver
Leon Brooks
leon at brooks.smileys.net
Mon Nov 20 12:08:57 WST 2000
Matt Kemner wrote:
> On Sat, 18 Nov 2000, Leon Brooks wrote:
>> (PERL) source to /usr/sbin/printerdrake suggests that --lpd and --cups
>> might work even though not listed in --help). I've attached it (1.6kB,
>> smaller than many diatribes) to the list so PERL monks like Mr Kemner
>> can verify my guess.
> Want to double-check that attachment? :)
> The one I received says:
> [SNIP]
> <H2>The requested URL could not be retrieved</H2>
> [...]
> While trying to retrieve the URL:
> <A HREF="http://printerdrake/">http://printerdrake/</A>
> [SNIP]
Bizarre. Nutscrape was quite happy to attach the thing. Perhaps the list manager
didn't like it for some reason? I'll name it .txt and see what happens.
--
"The idea that Bill Gates has appeared like a knight in shining
armour to lead all customers out of a mire of technological chaos
neatly ignores the fact that it was he who, by peddling second-
rate technology, led them into it in the first place."
-- writer Douglas Adams, on Windows 95
-------------- next part --------------
#!/usr/bin/perl
# printerdrake
# Copyright (C) 1999 MandrakeSoft (fpons at linux-mandrake.com)
# Original version for printer configuration from pad.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
use lib qw(/usr/lib/libDrakX);
use interactive;
use printer;
use printerdrake;
use c;
local $_ = join '', @ARGV;
/-h/ and die "usage: printerdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n";
$::beginner = /-beginner/;
$::expert = /-expert/;
$::auto = /-auto/;
$::noauto = /-noauto/;
$::skiptest = /-skiptest/;
$::testing = /-testing/;
$::isStandalone = 1;
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($printer, $in, sub { $in->suspend; system("urpmi --auto --best-output " . join(' ', @_)); $in->resume; });
$in->exit(0);
More information about the plug
mailing list