From 6ba62a43f04b784cfb0d6dba04b67cb4be878f41 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Wed, 16 Mar 2005 14:48:11 +0000 Subject: - Fixed setting of default printer on daemon-less CUPS client (bug #13940). --- perl-install/printer/default.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/perl-install/printer/default.pm b/perl-install/printer/default.pm index a6e64c30d..41da25c56 100644 --- a/perl-install/printer/default.pm +++ b/perl-install/printer/default.pm @@ -12,10 +12,14 @@ 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; + if ($spooler eq "rcups") { + run_program::rooted($::prefix, "lpoptions", + "-d", $printer->{DEFAULT}) or return 0; + } else { + run_program::rooted($::prefix, "foomatic-configure", + "-D", "-q", "-s", $spooler, + "-n", $printer->{DEFAULT}) or return 0; + } return 1; } -- cgit v1.2.1