summaryrefslogtreecommitdiffstats
path: root/perl-install/printer
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/printer')
-rw-r--r--perl-install/printer/cups.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/printer/cups.pm b/perl-install/printer/cups.pm
index 0ddff19f0..eb443482e 100644
--- a/perl-install/printer/cups.pm
+++ b/perl-install/printer/cups.pm
@@ -29,13 +29,15 @@ sub lpstat_lpv() {
for my $line (@lpstat) {
chomp($line);
if ($line !~ m!^\s*$!) {
- if ($line =~ m!^printer\s+(\S+)\s+(\S.*)$!) {
+ if ($line =~ m!^printer\s+(\S+)\s+.*\b(enabled|disabled)\b!) {
# Beginning of new printer's entry
my $name = $1;
+ my $state = $2;
push(@items, {});
$currentitem = $#items;
$itemshash->{$name} = $currentitem;
$items[$currentitem]{queuename} ||= $name;
+ $items[$currentitem]{state} ||= $state;
} elsif ($line =~ m!^\s+Description:\s+(\S.*)$!) {
# Description field
if ($currentitem != -1) {