[freeside-devel] Re: add service name and service id to
shellcommands
Simon P. Ditner
simon-freeside at uc.org
Fri Sep 15 08:06:10 PDT 2006
Woops, missed _export_replace
Index: shellcommands.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/shellcommands.pm,v
retrieving revision 1.40
diff -u -r1.40 shellcommands.pm
--- shellcommands.pm 29 Jun 2006 15:45:57 -0000 1.40
+++ shellcommands.pm 15 Sep 2006 14:31:33 -0000
@@ -162,6 +162,8 @@
<LI><code>$shell</code>
<LI><code>$quota</code>
<LI><code>@radius_groups</code>
+ <LI><code>$service_name</code> - Name of this service, i.e. "POP Account"
+ <LI><code>$service_id</code> - The internal ID of this service
<LI>All other fields in <a href="../docs/schema.html#svc_acct">svc_acct</a> are also available.
</UL>
END
@@ -233,6 +235,8 @@
$finger = shell_quote $finger;
$quoted_password = shell_quote $_password;
$domain = $svc_acct->domain;
+ $service_name = shell_quote( $svc_acct->cust_svc->part_svc->svc );
+ $service_id = shell_quote( $svc_acct->cust_svc->svcpart );
$crypt_password =
shell_quote( $svc_acct->crypt_password( $self->option('crypt') ) );
@@ -267,6 +271,11 @@
$old_domain = $old->domain;
$new_domain = $new->domain;
+ $old_service_name = shell_quote( $old->cust_svc->part_svc->svc );
+ $old_service_id = shell_quote( $old->cust_svc->svcpart );
+ $new_service_name = shell_quote( $new->cust_svc->part_svc->svc );
+ $new_service_id = shell_quote( $new->cust_svc->svcpart );
+
$new_crypt_password =
shell_quote( $new->crypt_password( $self->option('crypt') ) );
On Thu, 14 Sep 2006, Simon P. Ditner wrote:
> If you're upgrading a customer from one package to another, i.e. more
> disk quota, and such, I found you needed to call the same Export command,
> otherwise the "delete" / "insert" commands would be invoked rather than
> the "upgrade". So here's a quick fix that will pass along the service
> name so that your external script can make a better decision about what
> to do. (Credit: ArmorTechnologies / armorware.com)
>
> Index: shellcommands.pm
> ===================================================================
> RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/shellcommands.pm,v
> retrieving revision 1.40
> diff -u -r1.40 shellcommands.pm
> --- shellcommands.pm 29 Jun 2006 15:45:57 -0000 1.40
> +++ shellcommands.pm 15 Sep 2006 01:24:00 -0000
> @@ -162,6 +162,8 @@
> <LI><code>$shell</code>
> <LI><code>$quota</code>
> <LI><code>@radius_groups</code>
> + <LI><code>$service_name</code> - Name of this service, i.e. "POP Account"
> + <LI><code>$service_id</code> - The internal ID of this service
> <LI>All other fields in <a href="../docs/schema.html#svc_acct">svc_acct</a> are also available.
> </UL>
> END
> @@ -233,6 +235,8 @@
> $finger = shell_quote $finger;
> $quoted_password = shell_quote $_password;
> $domain = $svc_acct->domain;
> + $service_name = shell_quote( $svc_acct->cust_svc->part_svc->svc );
> + $service_id = shell_quote( $svc_acct->cust_svc->svcpart );
>
> $crypt_password =
> shell_quote( $svc_acct->crypt_password( $self->option('crypt') ) );
>
>
More information about the freeside-devel
mailing list