X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fgrandstream.pm;h=981eb1969584b815aa088e847e9100a67a6e4de2;hp=5c6f1ed8d90f065b9f389c577ce4089975854666;hb=5372897f367498972c96f5494e142e6e11b29eb8;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924 diff --git a/FS/FS/part_export/grandstream.pm b/FS/FS/part_export/grandstream.pm index 5c6f1ed8d..981eb1969 100644 --- a/FS/FS/part_export/grandstream.pm +++ b/FS/FS/part_export/grandstream.pm @@ -7,6 +7,7 @@ use MIME::Base64; use Tie::IxHash; use IPC::Run qw(run); use FS::CGI qw(rooturl); +use Carp qw(carp); $DEBUG = 0; @@ -50,6 +51,12 @@ sub rebless { shift; } sub gs_create_config { my($self, $mac, %opt) = (@_); + if ( $FS::svc_Common::noexport_hack ) { + carp 'gs_create_config() suppressed by noexport_hack' + if $self->option('debug') || $DEBUG; + return; + } + eval "use Net::SCP;"; die $@ if $@; @@ -131,6 +138,12 @@ sub gs_create { sub gs_delete { my($self, $mac) = (shift, shift); + if ( $FS::svc_Common::noexport_hack ) { + carp 'gs_delete() suppressed by noexport_hack' + if $self->option('debug') || $DEBUG; + return; + } + $mac = sprintf('%012s', lc($mac)); ssh_cmd( user => $self->option('user'),