#!/usr/bin/perl -Tw
#
-# $Id: fs-setup,v 1.54 2001-09-06 20:41:59 ivan Exp $
+# $Id: fs-setup,v 1.58 2001-09-11 22:20:28 ivan Exp $
#to delay loading dbdef until we're ready
BEGIN { $FS::Record::setup_hack = 1; }
use FS::UID qw(adminsuidsetup datasrc checkeuid getsecrets);
use FS::Record;
use FS::cust_main_county;
+use FS::raddb;
die "Not running uid freeside!" unless checkeuid();
+my %attrib2db =
+ map { lc($FS::raddb::attrib{$_}) => $_ } keys %FS::raddb::attrib;
+
my $user = shift or die &usage;
getsecrets($user);
check and reply attributes. First enter any additional RADIUS check attributes
you need to track for each user, separated by whitespace.
END
-my @check_attributes = map { s/\-/_/g; $_; } split(" ",&getvalue);
+my @check_attributes = map { $attrib2db{lc($_)} or die "unknown attribute $_"; }
+ split(" ",&getvalue);
print "\n\n", <<END, ":";
Now enter any additional reply attributes you need to track for each user,
separated by whitespace.
END
-my @attributes = map { s/\-/_/g; $_; } split(" ",&getvalue);
+my @attributes = map { $attrib2db{lc($_)} or die "unknown attribute $_"; }
+ split(" ",&getvalue);
print "\n\n", <<END, ":";
Do you wish to enable the tracking of a second, separate shipping/service
'primary_key' => 'columnnum',
'unique' => [ [ 'svcpart', 'columnname' ] ],
'index' => [ [ 'svcpart' ] ],
- }
+ },
#(this should be renamed to part_pop)
'svc_acct_pop' => {
'index' => [ [ 'portnum' ] ],
},
+ 'queue' => {
+ 'columns' => [
+ 'jobnum', 'int', '', '',
+ 'job', 'varchar', '', '',
+ '_date', 'int', '', '',
+ 'status', 'varchar', '', $char_d,
+ ],
+ 'primary_key' => 'jobnum',
+ 'unique' => [],
+ 'index' => [],
+ },
+
+ 'queue_arg' => {
+ 'columns' => [
+ 'argnum', 'int', '', '',
+ 'jobnum', 'int', '', '',
+ 'arg', 'varchar', 'NULL', '',
+ ],
+ 'primary_key' => 'argnum',
+ 'unique' => [],
+ 'index' => [ [ 'jobnum' ] ],
+ },
);
%tables;