diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-08-16 15:09:56 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-08-16 15:09:56 +0000 |
commit | ecfcc3545cd8326eec46eb5fcbc1a8364238d8b2 (patch) | |
tree | 71d0af073bc7754d3613d11199f34504e455418a | |
parent | be6a656b38fbae3c80767894119106a7bed16af7 (diff) |
xpp: Dahdi::Hardware->rescan() - refresh hardware list
Allow refreshing the list of hardware even after the initial scan.
(E.g. a script that resets firmware for Astribanks)
xpp rev: 7320
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@7012 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | xpp/perl_modules/Dahdi/Hardware.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xpp/perl_modules/Dahdi/Hardware.pm b/xpp/perl_modules/Dahdi/Hardware.pm index 1509615..ba89447 100644 --- a/xpp/perl_modules/Dahdi/Hardware.pm +++ b/xpp/perl_modules/Dahdi/Hardware.pm @@ -183,6 +183,20 @@ sub scan($) { } } +=head1 rescan + +Rescan for devices. In case new devices became available since the script +has started. + +=cut + +sub rescan($) { + my $pack = shift || die; + + $hardware_scanned = 0; + $pack->scan(); +} + sub import { Dahdi::Hardware->scan unless grep(/\bnoscan\b/i, @_); } |