diff options
author | ivan <ivan> | 1998-11-19 11:17:44 +0000 |
---|---|---|
committer | ivan <ivan> | 1998-11-19 11:17:44 +0000 |
commit | 8935cf3566726a2757c3b8f988acfcc0b7ac9352 (patch) | |
tree | 988ae5b28c5ad938ddb6207777b9046ab8b1e005 /bin/dbdef-create | |
parent | ef834d58bfd2ce38c8bea73262c8091a5d88388f (diff) |
adminsuidsetup requires argument
Diffstat (limited to 'bin/dbdef-create')
-rwxr-xr-x | bin/dbdef-create | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/bin/dbdef-create b/bin/dbdef-create index eb62c77e3..fe7475bec 100755 --- a/bin/dbdef-create +++ b/bin/dbdef-create @@ -1,19 +1,28 @@ #!/usr/bin/perl -Tw # +# $Id: dbdef-create,v 1.2 1998-11-19 11:17:44 ivan Exp $ +# # create dbdef file for existing mySQL database (needs SHOW|DESCRIBE command # not in Pg) based on fs-setup # # ivan@sisd.com 98-jun-2 +# +# $Log: dbdef-create,v $ +# Revision 1.2 1998-11-19 11:17:44 ivan +# adminsuidsetup requires argument +# use strict; use DBI; use FS::dbdef; use FS::UID qw(adminsuidsetup datasrc); -#needs to match FS::Record -my($dbdef_file) = "/var/spool/freeside/dbdef.". datasrc; +my $user = shift or die &usage; -my($dbh)=adminsuidsetup; +my($dbh)=adminsuidsetup $user; + +#needs to match FS::Record +my($dbdef_file) = "/usr/local/etc/freeside/dbdef.". datasrc; my($tables_sth)=$dbh->prepare("SHOW TABLES"); my($tables_rv)=$tables_sth->execute; @@ -83,3 +92,6 @@ my($dbdef) = new FS::dbdef ( @tables ); #important $dbdef->save($dbdef_file); +sub usage { + die "Usage:\n dbdef-create user\n"; +} |