diff options
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 7119fbd84..d932b4922 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -210,6 +210,14 @@ sub whatPrinterPort() { grep { tryWrite($_)} qw(/dev/lp0 /dev/lp1 /dev/lp2); } +sub hasModem($) { + my ($device) = @_; + my %probe; + local *F; open F, "pnp_serial $device |"; + foreach (<F>) { $probe{$1} = $2 if /^\s+(.*?)\s*:\s*\"(.*)\"\s*$/ } + $probe{CLASS} =~ /Modem/i && $probe{DESCRIPTION}; +} + #-###################################################################################### #- Wonderful perl :( #-###################################################################################### |