freeside/FS/FS/part_export shellcommands.pm,1.29,1.30 shellcommands_withdomain.pm,1.3,1.4

ivan ivan at pouncequick.420.am
Mon May 3 07:32:12 PDT 2004


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

Modified Files:
	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.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- shellcommands.pm	29 Mar 2004 21:49:09 -0000	1.29
+++ shellcommands.pm	3 May 2004 14:32:10 -0000	1.30
@@ -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.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- shellcommands_withdomain.pm	25 Mar 2004 08:55:09 -0000	1.3
+++ shellcommands_withdomain.pm	3 May 2004 14:32:10 -0000	1.4
@@ -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