From ef92d87d1980598a4f786905ac7aff1af0ead2b8 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 25 Aug 2002 01:14:16 +0000 Subject: [PATCH] noninteractive freeside-setup --- FS/bin/freeside-setup | 77 ++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 35 deletions(-) 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; ### -- 2.11.0