X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bin%2Ffs-setup;h=e7dda8ed709f149603e69700b7c3ebf61b871b49;hb=cf7ca698138c8708c68cb969cc843311e385a7a8;hp=53d96f6927576838a2df3e107d8194e77e9dfff0;hpb=57d69d5c1f98f778a0df82795ce21ee7bd21042a;p=freeside.git diff --git a/bin/fs-setup b/bin/fs-setup index 53d96f692..e7dda8ed7 100755 --- a/bin/fs-setup +++ b/bin/fs-setup @@ -1,6 +1,6 @@ #!/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; } @@ -15,9 +15,13 @@ use DBIx::DBSchema::ColGroup::Index; 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); @@ -35,13 +39,15 @@ reply attribute Framed-IP-Address for each user. You can specify additional 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", < 'columnnum', 'unique' => [ [ 'svcpart', 'columnname' ] ], 'index' => [ [ 'svcpart' ] ], - } + }, #(this should be renamed to part_pop) 'svc_acct_pop' => { @@ -762,6 +768,28 @@ sub tables_hash_hack { '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;