From: ivan Date: Sun, 25 Aug 2002 01:14:16 +0000 (+0000) Subject: noninteractive freeside-setup X-Git-Tag: freeside_1_4_1beta1~39 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ef92d87d1980598a4f786905ac7aff1af0ead2b8 noninteractive freeside-setup --- diff --git a/FS/bin/freeside-setup b/FS/bin/freeside-setup index 21defa6e5..a14f0e12b 100755 --- a/FS/bin/freeside-setup +++ b/FS/bin/freeside-setup @@ -4,6 +4,8 @@ BEGIN { $FS::Record::setup_hack = 1; } use strict; +use vars qw($opt_s); +use Getopt::Std; use DBI; use DBIx::DBSchema 0.20; use DBIx::DBSchema::Table; @@ -21,6 +23,7 @@ die "Not running uid freeside!" unless checkeuid(); my %attrib2db = map { lc($FS::raddb::attrib{$_}) => $_ } keys %FS::raddb::attrib; +getopts("s"); my $user = shift or die &usage; getsecrets($user); @@ -33,42 +36,46 @@ my($dbdef_file) = "/usr/local/etc/freeside/dbdef.". datasrc; #my($username_len)=&getvalue; my $username_len = 32; #usernamemax config file -print "\n\n", <); - chop $x; - $x; -} +#print "\n\n", <); +# chop $x; +# $x; +#} +# +#sub _yesno { +# print " [y/N]:"; +# my $x = scalar(); +# $x =~ /^y/i; +#} -sub _yesno { - print " [y/N]:"; - my $x = scalar(); - $x =~ /^y/i; -} +my @check_attributes = (); #add later +my @attributes = (); #add later +my $ship = $opt_s; ###