Freeside 1.4.1rc3 svc_forward export issues
Stephen D. Bechard
steve at destek.net
Tue Jun 24 06:40:34 PDT 2003
I am having issues trying to setup the svc_forward with exports.
I am currently running Freeside version 1.4.1rc3 and everything
else seems to work great.
Here is what I have configured for my svc_forward:
srcsvc Default
dstsvc Default 0
dst Default
Here is what I have configured for my forward_shellcommands:
useradd freeside-virtuser.sh insert $domain $username $destination
usermod freeside-virtuser.sh modify $new_domain $new_username
$new_destination
user root
userdel freeside-virtuser.sh delete $domain $username $destination
(freeside-virtuser.sh is a custom script I wrote to handle the
virtusertable on our customized sendmail installation.)
It doesn't appear to matter what I put in the forward_shellcommands
I always get errors, please see the output below. If I remove the
forward_shellcommands export everything seems to work fine.
I have attempted to decipher the errors without any luck!
Thanks,
Steve
PS
Yes, I know I still haven't submitted any of my diffs from last time. ;)
----------------------------------------------------------------------------
-----------------------
Errors Output
errant AUTOLOAD qsearchs for svc_acct (arg HASH(0x94a08d8)) at
/usr/local/lib/perl5/site_perl/5.6.1//FS/Record.pm line 430
FS::Record::AUTOLOAD('svc_acct', 'HASH(0x94a08d8)') called at
/usr/local/lib/perl5/site_perl/5.6.1//FS/part_export/forward_shellcommands.p
m line 32
FS::part_export::forward_shellcommands::_export_command('FS::part_export::fo
rward_shellcommands=HASH(0x94a0670)', 'useradd',
'FS::svc_forward=HASH(0x90e2024)') called at
/usr/local/lib/perl5/site_perl/5.6.1//FS/part_export/forward_shellcommands.p
m line 13
FS::part_export::forward_shellcommands::_export_insert('FS::part_export::for
ward_shellcommands=HASH(0x94a0670)', 'FS::svc_forward=HASH(0x90e2024)')
called at /usr/local/lib/perl5/site_perl/5.6.1//FS/part_export.pm line 407
FS::part_export::export_insert('FS::part_export::forward_shellcommands=HASH(
0x94a0670)', 'FS::svc_forward=HASH(0x90e2024)') called at
/usr/local/lib/perl5/site_perl/5.6.1//FS/svc_Common.pm line 96
FS::svc_Common::insert('FS::svc_forward=HASH(0x90e2024)') called at
/usr/local/lib/perl5/site_perl/5.6.1//FS/svc_forward.pm line 97
FS::svc_forward::insert('FS::svc_forward=HASH(0x90e2024)') called at
/usr/local/www/data/aspdocs/edit/process/svc_forward.cgi line 18
Apache::ASP::Compiles::__ASP__usr_local_etc_freeside_asp_global_x1740c41f4a1
56eda78caec4c47748752::__ASP_spdocs_edit_process_svc_forward_cgix7a89bfe5f5e
0e04c8e6a1b63a6e53882xINC() called at
/usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1487
eval {...} called at /usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line
1487
Apache::ASP::Execute('Apache::ASP=HASH(0x9445aac)',
'Apache::ASP::Compiles::__ASP__usr_local_etc_freeside_asp_global_...')
called at /usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1449
eval {...} called at /usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line
1447
Apache::ASP::Run('Apache::ASP=HASH(0x9445aac)') called at
/usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 177
Apache::ASP::handler('Apache=SCALAR(0x93b5754)') called at /dev/null line 0
eval {...} called at /dev/null line 0 ,
/usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1491
Debug Output
errant AUTOLOAD qsearchs for svc_acct (arg HASH(0x94a08d8)) at
/usr/local/lib/perl5/site_perl/5.6.1//FS/Record.pm line 430
FS::Record::AUTOLOAD('svc_acct', 'HASH(0x94a08d8)') called at
/usr/local/lib/perl5/site_perl/5.6.1//FS/part_export/forward_shellcommands.p
m line 32
FS::part_export::forward_shellcommands::_export_command('FS::part_export::fo
rward_shellcommands=HASH(0x94a0670)', 'useradd',
'FS::svc_forward=HASH(0x90e2024)') called at
/usr/local/lib/perl5/site_perl/5.6.1//FS/part_export/forward_shellcommands.p
m line 13
FS::part_export::forward_shellcommands::_export_insert('FS::part_export::for
ward_shellcommands=HASH(0x94a0670)', 'FS::svc_forward=HASH(0x90e2024)')
called at /usr/local/lib/perl5/site_perl/5.6.1//FS/part_export.pm line 407
FS::part_export::export_insert('FS::part_export::forward_shellcommands=HASH(
0x94a0670)', 'FS::svc_forward=HASH(0x90e2024)') called at
/usr/local/lib/perl5/site_perl/5.6.1//FS/svc_Common.pm line 96
FS::svc_Common::insert('FS::svc_forward=HASH(0x90e2024)') called at
/usr/local/lib/perl5/site_perl/5.6.1//FS/svc_forward.pm line 97
FS::svc_forward::insert('FS::svc_forward=HASH(0x90e2024)') called at
/usr/local/www/data/aspdocs/edit/process/svc_forward.cgi line 18
Apache::ASP::Compiles::__ASP__usr_local_etc_freeside_asp_global_x1740c41f4a1
56eda78caec4c47748752::__ASP_spdocs_edit_process_svc_forward_cgix7a89bfe5f5e
0e04c8e6a1b63a6e53882xINC() called at
/usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1487
eval {...} called at /usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line
1487
Apache::ASP::Execute('Apache::ASP=HASH(0x9445aac)',
'Apache::ASP::Compiles::__ASP__usr_local_etc_freeside_asp_global_...')
called at /usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1449
eval {...} called at /usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line
1447
Apache::ASP::Run('Apache::ASP=HASH(0x9445aac)') called at
/usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 177
Apache::ASP::handler('Apache=SCALAR(0x93b5754)') called at /dev/null line 0
eval {...} called at /dev/null line 0 ,
/usr/local/lib/perl5/site_perl/5.6.1/Apache/ASP.pm line 1491
ASP to Perl Script
-: no strict;;use vars qw($Application $Session $Response $Server
$Request);;
-: #line 1 /usr/local/www/data/aspdocs/edit/process/svc_forward.cgi
1: ;;
2:
3: $cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!";
4: my $svcnum =$1;
5:
6: my $old = qsearchs('svc_forward',{'svcnum'=>$svcnum}) if $svcnum;
7:
8: my $new = new FS::svc_forward ( {
9: map {
10: ($_, scalar($cgi->param($_)));
11: } ( fields('svc_forward'), qw( pkgnum svcpart ) )
12: } );
13:
14: my $error = '';
15: if ( $svcnum ) {
16: $error = $new->replace($old);
17: } else {
18: $error = $new->insert;
19: $svcnum = $new->getfield('svcnum');
20: }
21:
22: if ($error) {
23: $cgi->param('error', $error);
24: print $cgi->redirect(popurl(2). "svc_forward.cgi?".
$cgi->query_string );
25: } else {
26: print $cgi->redirect(popurl(3). "view/svc_forward.cgi?$svcnum");
27: }
28:
29: ;
More information about the freeside-users
mailing list