diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2004-03-05 03:11:09 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2004-03-05 03:11:09 +0000 |
commit | 91fa5771511a58bc1dbc33f3a5d65174ec76470c (patch) | |
tree | 374395d49b03c8207dcde9aef975903179322968 /perl-install/printer/cups.pm | |
parent | 166751791f0845b41a7a27d3bf20d0222f820369 (diff) | |
download | drakx-backup-do-not-use-91fa5771511a58bc1dbc33f3a5d65174ec76470c.tar drakx-backup-do-not-use-91fa5771511a58bc1dbc33f3a5d65174ec76470c.tar.gz drakx-backup-do-not-use-91fa5771511a58bc1dbc33f3a5d65174ec76470c.tar.bz2 drakx-backup-do-not-use-91fa5771511a58bc1dbc33f3a5d65174ec76470c.tar.xz drakx-backup-do-not-use-91fa5771511a58bc1dbc33f3a5d65174ec76470c.zip |
Let URIs listed by "lpinfo -v" be shown in the dialog for entering a URI manually.
Diffstat (limited to 'perl-install/printer/cups.pm')
-rw-r--r-- | perl-install/printer/cups.pm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/perl-install/printer/cups.pm b/perl-install/printer/cups.pm index 468625d65..ab9e28b21 100644 --- a/perl-install/printer/cups.pm +++ b/perl-install/printer/cups.pm @@ -77,6 +77,22 @@ sub lpstat_v() { } run_program::rooted_get_stdout($::prefix, 'lpstat', '-v'); } +sub lpinfo_v() { + map { + if (my ($type, $uri) = m/^\s*(\S+)\s+(\S+)\b/) { + if ($uri =~ m!:/!) { + $uri; + } elsif ($type =~ m/network/i) { + "$uri://"; + } else { + "$uri:/"; + } + } else { + (); + } + } run_program::rooted_get_stdout($::prefix, 'lpinfo', '-v'); +} + sub read_printer_list { my ($printer) = @_; # This function reads in a list of all printers which the local CUPS |