summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/default.pm
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2004-11-06 08:30:59 +0000
committerMystery Man <unknown@mandriva.org>2004-11-06 08:30:59 +0000
commit42e38e074bf1200783849ea85e205e6614f988d7 (patch)
tree3c218a7ef3c66c8064eb2f6fa84ef44cef7b55a6 /perl-install/printer/default.pm
parenta4a67fd68bcffc42eb98871618c8f07b55157d5e (diff)
downloaddrakx-backup-do-not-use-topic/a.tar
drakx-backup-do-not-use-topic/a.tar.gz
drakx-backup-do-not-use-topic/a.tar.bz2
drakx-backup-do-not-use-topic/a.tar.xz
drakx-backup-do-not-use-topic/a.zip
This commit was manufactured by cvs2svn to create branch 'a'.topic/a
Diffstat (limited to 'perl-install/printer/default.pm')
-rw-r--r--perl-install/printer/default.pm55
1 files changed, 0 insertions, 55 deletions
diff --git a/perl-install/printer/default.pm b/perl-install/printer/default.pm
deleted file mode 100644
index b6f45c889..000000000
--- a/perl-install/printer/default.pm
+++ /dev/null
@@ -1,55 +0,0 @@
-package printer::default;
-
-use strict;
-use run_program;
-use common;
-
-#-configuration directory of Foomatic
-my $FOOMATICCONFDIR = "/etc/foomatic";
-#-location of the file containing the default spooler's name
-my $FOOMATIC_DEFAULT_SPOOLER = "$FOOMATICCONFDIR/defaultspooler";
-
-sub set_printer {
- my ($printer) = $_[0];
- my $spooler = $printer->{SPOOLER};
- $spooler = "cups" if $spooler eq "rcups";
- run_program::rooted($::prefix, "foomatic-configure",
- "-D", "-q", "-s", $spooler,
- "-n", $printer->{DEFAULT}) or return 0;
- return 1;
-}
-
-sub get_printer {
- my $printer = $_[0];
- my $spooler = $printer->{SPOOLER};
- $spooler = "cups" if $spooler eq "rcups";
- local *F;
- open F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
- "foomatic-configure -Q -q -s $spooler |" or return undef;
- my $line;
- while ($line = <F>) {
- if ($line =~ m!^\s*<defaultqueue>(.*)</defaultqueue>\s*$!) {
- return $1;
- }
- }
- return undef;
-}
-
-sub printer_type() { "LOCAL" }
-
-sub get_spooler () {
- if (-f "$::prefix$FOOMATIC_DEFAULT_SPOOLER") {
- my $spool = cat_("$::prefix$FOOMATIC_DEFAULT_SPOOLER");
- chomp $spool;
- return $spool if $spool =~ /cups|lpd|lprng|pdq/;
- }
-}
-
-sub set_spooler ($) {
- my ($printer) = @_;
- # Mark the default driver in a file
- output_p("$::prefix$FOOMATIC_DEFAULT_SPOOLER", $printer->{SPOOLER});
-}
-
-
-1;