freeside/FS/FS/part_export shellcommands.pm,1.12.4.18,1.12.4.19 shellcommands_withdomain.pm,1.1.4.2,1.1.4.3

ivan ivan at pouncequick.420.am
Mon May 3 07:16:54 PDT 2004


Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory pouncequick:/tmp/cvs-serv19560/part_export

Modified Files:
      Tag: FREESIDE_1_4_BRANCH
	shellcommands.pm shellcommands_withdomain.pm 
Log Message:
make RADIUS groups available to shellcommands exports

Index: shellcommands.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/shellcommands.pm,v
retrieving revision 1.12.4.18
retrieving revision 1.12.4.19
diff -u -d -r1.12.4.18 -r1.12.4.19
--- shellcommands.pm	29 Mar 2004 21:49:11 -0000	1.12.4.18
+++ shellcommands.pm	3 May 2004 14:16:50 -0000	1.12.4.19
@@ -154,6 +154,7 @@
   <LI><code>$dir</code> - home directory
   <LI><code>$shell</code>
   <LI><code>$quota</code>
+  <LI><code>@radius_groups</code>
   <LI>All other fields in <a href="../docs/schema.html#svc_acct">svc_acct</a> are also available.
 </UL>
 END
@@ -228,6 +229,8 @@
     );
   }
 
+  @radius_groups = $svc_acct->radius_groups;
+
   $self->shellcommands_queue( $svc_acct->svcnum,
     user         => $self->option('user')||'root',
     host         => $self->machine,
@@ -266,6 +269,9 @@
     );
   }
 
+  @old_radius_groups = $old->radius_groups;
+  @new_radius_groups = $new->radius_groups;
+
   if ( $self->option('usermod_pwonly') ) {
     my $error = '';
     if ( $old_username ne $new_username ) {
@@ -279,6 +285,10 @@
     }
     if ( $old_dir ne $new_dir ) {
       $error ||= "can't change dir";
+    }
+    if ( join("\n", sort @old_radius_groups) ne
+         join("\n", sort @new_radius_groups)    ) {
+      $error ||= "can't change RADIUS groups";
     }
     return $error. ' ('. $self->exporttype. ' to '. $self->machine. ')'
       if $error;

Index: shellcommands_withdomain.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/shellcommands_withdomain.pm,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- shellcommands_withdomain.pm	25 Mar 2004 08:55:11 -0000	1.1.4.2
+++ shellcommands_withdomain.pm	3 May 2004 14:16:50 -0000	1.1.4.3
@@ -95,6 +95,7 @@
   <LI><code>$dir</code> - home directory
   <LI><code>$shell</code>
   <LI><code>$quota</code>
+  <LI><code>@radius_groups</code>
   <LI>All other fields in <a href="../docs/schema.html#svc_acct">svc_acct</a> are also available.
 </UL>
 END




More information about the freeside-commits mailing list