diff options
author | ivan <ivan> | 2008-08-24 21:52:34 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-08-24 21:52:34 +0000 |
commit | 6f07c574d3c6732a6f90f73bf5dcb6732c5a94d4 (patch) | |
tree | a8240c72b4df82f75ae04b255ce915d9ef40f851 /bin | |
parent | 49d05188796f8bc685124db7d68ca1f75b1de2f2 (diff) |
add -k option for pkgpart
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/customer-faker | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/customer-faker b/bin/customer-faker index 9076df061..236a41247 100755 --- a/bin/customer-faker +++ b/bin/customer-faker @@ -12,15 +12,16 @@ use FS::svc_acct; my $refnum = 1; -my @pkgs = ( 2, 3, 4 ); #my @pkgs = ( 4, 5, 6 ); my $svcpart = 2; -use vars qw( $opt_p $opt_a ); -getopts('p:a:'); +use vars qw( $opt_p $opt_a $opt_k ); +getopts('p:a:k:'); my $agentnum = $opt_a || 1; +my @pkgs = $opt_k ? split(/,\s*/, $opt_k) : ( 2, 3, 4 ); + my $user = shift or die &usage; my $num = shift or die &usage; adminsuidsetup($user); @@ -119,5 +120,5 @@ print "$onum customers inserted in $sec seconds ($persec customers/sec)\n"; #--- sub usage { - die "Usage:\n\n customer-faker [ -p payby ] [ -a agentnum ] user num_fakes\n"; + die "Usage:\n\n customer-faker [ -p payby ] [ -a agentnum ] [ -k pkgpart,pkgpart,pkgpart... ] user num_fakes\n"; } |