chiark / gitweb /
genopts alphanum tidyups, more
[d.git] / service
diff --git a/service b/service
index 14852b233827d0e6ac977681163c14aa51836596..d3e0499b96aa81ed4c855118fc3d068319bc8415 100755 (executable)
--- a/service
+++ b/service
@@ -28,7 +28,7 @@ privileged actions
 default generation method is alphanum
 END
 our %usage_genopts = (
-'alphanum' => <<END
+'alphanum' => <<END,
   -l<randlength>     (number of letters+digits)
 END
 );
@@ -39,9 +39,7 @@ use strict;
 use DBI;
 use POSIX;
 
-our $minrandlength = 6;
 our $randlength;
-our $maxrandlength = 50;
 
 our $maxperuser = 10000;
 our $qualdom;
@@ -52,6 +50,10 @@ our $priv;
 our $showcomment;
 our $genmethod = 'alphanum';
 
+# for alphanum
+our $minrandlength = 6;
+our $maxrandlength = 50;
+
 sub nextarg () {
     die "too few arguments\n" unless @ARGV;
     my $v = shift @ARGV;
@@ -389,6 +391,8 @@ sub action_disable_user {
 
 sub action_list_actions {
     print $usage2 or die $!;
+    print "genopts\n" or die $!;
+    print $usage_genopts{$genmethod} or die $!;
 }
 
 while (@ARGV) {