[freeside-commits] freeside/FS/FS/part_export shellcommands.pm, 1.50, 1.51 shellcommands_withdomain.pm, 1.10, 1.11

Mark Wells mark at wavetail.420.am
Mon Aug 17 16:08:49 PDT 2009


Update of /home/cvs/cvsroot/freeside/FS/FS/part_export
In directory wavetail.420.am:/tmp/cvs-serv25335/FS/FS/part_export

Modified Files:
	shellcommands.pm shellcommands_withdomain.pm 
Log Message:
Add more fine-grained queue options

Index: shellcommands.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/shellcommands.pm,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- shellcommands.pm	14 Aug 2009 21:51:44 -0000	1.50
+++ shellcommands.pm	17 Aug 2009 23:08:47 -0000	1.51
@@ -14,6 +14,9 @@
                  default=>'useradd -c $finger -d $dir -m -s $shell -u $uid -p $crypt_password $username'
                 #default=>'cp -pr /etc/skel $dir; chown -R $uid.$gid $dir'
                },
+  'useradd_no_queue' => { label=>'Run immediately',
+                          type => 'checkbox',
+                        },
   'useradd_stdin' => { label=>'Insert command STDIN',
                        type =>'textarea',
                        default=>'',
@@ -22,6 +25,9 @@
                  default=>'userdel -r $username',
                  #default=>'rm -rf $dir',
                },
+  'userdel_no_queue' => { label=>'Run immediately',
+                          type =>'checkbox',
+                        },
   'userdel_stdin' => { label=>'Delete command STDIN',
                        type =>'textarea',
                        default=>'',
@@ -35,6 +41,9 @@
                  #  'rm -rf $old_dir'.
                  #')'
                },
+  'usermod_no_queue' => { label=>'Run immediately',
+                          type =>'checkbox',
+                        },
   'usermod_stdin' => { label=>'Modify command STDIN',
                        type =>'textarea',
                        default=>'',
@@ -48,12 +57,18 @@
   'suspend' => { label=>'Suspension command',
                  default=>'usermod -L $username',
                },
+  'suspend_no_queue' => { label=>'Run immediately',
+                          type =>'checkbox',
+                        },
   'suspend_stdin' => { label=>'Suspension command STDIN',
                        default=>'',
                      },
   'unsuspend' => { label=>'Unsuspension command',
                    default=>'usermod -U $username',
                  },
+  'unsuspend_no_queue' => { label=>'Run immediately',
+                            type =>'checkbox',
+                          },
   'unsuspend_stdin' => { label=>'Unsuspension command STDIN',
                          default=>'',
                        },
@@ -65,9 +80,9 @@
                              'Radius group mapping to reason (via template user)',
 			    type  => 'textarea',
 			  },
-  'no_queue' => { label => 'Run command immediately',
-                   type  => 'checkbox',
-                },
+#  'no_queue' => { label => 'Run command immediately',
+#                   type  => 'checkbox',
+#                },
 ;
 
 %info = (
@@ -312,7 +327,7 @@
     stdin_string  => $stdin_string,
   );
 
-  if($self->option('no_queue')) {
+  if($self->option($action . '_no_queue')) {
     # discard return value just like freeside-queued.
     eval { ssh_cmd(@ssh_cmd_args) };
     $error = $@;
@@ -397,7 +412,7 @@
     stdin_string  => $stdin_string,
   );
 
-  if($self->option('no_queue')) {
+  if($self->option('usermod_no_queue')) {
     # discard return value just like freeside-queued.
     eval { ssh_cmd(@ssh_cmd_args) };
     $error = $@;

Index: shellcommands_withdomain.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export/shellcommands_withdomain.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- shellcommands_withdomain.pm	10 Aug 2009 18:05:50 -0000	1.10
+++ shellcommands_withdomain.pm	17 Aug 2009 23:08:47 -0000	1.11
@@ -15,6 +15,9 @@
                        type =>'textarea',
                        #default=>"$_password\n$_password\n",
                      },
+  'useradd_no_queue' => { label => 'Run immediately',
+                 type  => 'checkbox',
+           },
   'userdel' => { label=>'Delete command',
                  #default=>'',
                },
@@ -22,6 +25,9 @@
                        type =>'textarea',
                        #default=>'',
                      },
+  'userdel_no_queue' => { label => 'Run immediately',
+                 type  => 'checkbox',
+           },
   'usermod' => { label=>'Modify command',
                  default=>'',
                },
@@ -29,6 +35,9 @@
                        type =>'textarea',
                        #default=>"$_password\n$_password\n",
                      },
+  'usermod_no_queue' => { label => 'Run immediately',
+                 type  => 'checkbox',
+           },
   'usermod_pwonly' => { label=>'Disallow username, domain, uid, dir and RADIUS group changes',
                         type =>'checkbox',
                       },
@@ -41,19 +50,22 @@
   'suspend_stdin' => { label=>'Suspension command STDIN',
                        default=>'',
                      },
+  'suspend_no_queue' => { label => 'Run immediately',
+                 type  => 'checkbox',
+           },
   'unsuspend' => { label=>'Unsuspension command',
                    default=>'',
                  },
   'unsuspend_stdin' => { label=>'Unsuspension command STDIN',
                          default=>'',
                        },
+  'unsuspend_no_queue' => { label => 'Run immediately',
+                 type  => 'checkbox',
+           },
   'crypt' => { label   => 'Default password encryption',
                type=>'select', options=>[qw(crypt md5)],
                default => 'crypt',
              },
-  'no_queue' => { label => 'Run command immediately',
-                 type  => 'checkbox',
-           },
 ;
 
 %info = (
@@ -90,13 +102,14 @@
   <LI><INPUT TYPE="button" VALUE="MagicMail" onClick='
     this.form.useradd.value = "/usr/bin/mm_create_email_service -e $svcnum -d $domain -u $username -p $quoted_password -f $first -l $last -m $svcnum -g EMAIL";
     this.form.useradd_stdin.value = "";
+    this.form.useradd_no_queue.checked = 1;
     this.form.userdel.value = "/usr/bin/mm_delete_user -e ${username}\\\@${domain}";
     this.form.userdel_stdin.value = "";
+    this.form.userdel_no_queue.checked = 1;
     this.form.suspend.value = "/usr/bin/mm_suspend_user -e ${username}\\\@${domain}";
     this.form.suspend_stdin.value = "";
     this.form.unsuspend.value = "/usr/bin/mm_activate_user -e ${username}\\\@${domain}";
     this.form.unsuspend_stdin.value = "";
-    this.form.no_queue.checked = 1;
   '>
 </UL>
 



More information about the freeside-commits mailing list