projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aab3bdd
)
prevent death on meritless sqlradius upgrade attempts
author
jeff
<jeff>
Mon, 18 May 2009 18:21:38 +0000
(18:21 +0000)
committer
jeff
<jeff>
Mon, 18 May 2009 18:21:38 +0000
(18:21 +0000)
FS/bin/freeside-upgrade
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-upgrade
b/FS/bin/freeside-upgrade
index
24f577f
..
7ee35c6
100755
(executable)
--- a/
FS/bin/freeside-upgrade
+++ b/
FS/bin/freeside-upgrade
@@
-1,7
+1,7
@@
#!/usr/bin/perl -w
use strict;
#!/usr/bin/perl -w
use strict;
-use vars qw($opt_d $opt_s $opt_q $opt_v);
+use vars qw($opt_d $opt_s $opt_q $opt_v
$opt_r
);
use vars qw($DEBUG $DRY_RUN);
use Getopt::Std;
use DBIx::DBSchema 0.31;
use vars qw($DEBUG $DRY_RUN);
use Getopt::Std;
use DBIx::DBSchema 0.31;
@@
-17,7
+17,7
@@
my $start = time;
die "Not running uid freeside!" unless checkeuid();
die "Not running uid freeside!" unless checkeuid();
-getopts("dqs");
+getopts("dq
r
s");
$DEBUG = !$opt_q;
#$DEBUG = $opt_v;
$DEBUG = !$opt_q;
#$DEBUG = $opt_v;
@@
-153,7
+153,7
@@
warn "Table updates completed in ". (time-$start). " seconds\n"; # if $DEBUG;
$start = time;
upgrade_sqlradius()
$start = time;
upgrade_sqlradius()
- unless $DRY_RUN || $opt_s;
+ unless $DRY_RUN || $opt_s
|| $opt_r
;
warn "SQL RADIUS updates completed in ". (time-$start). " seconds\n"; # if $DEBUG;
$start = time;
warn "SQL RADIUS updates completed in ". (time-$start). " seconds\n"; # if $DEBUG;
$start = time;
@@
-172,7
+172,7
@@
sub dbdef_create { # reverse engineer the schema from the DB and save to file
}
sub usage {
}
sub usage {
- die "Usage:\n freeside-upgrade [ -d ] [ -s ] [ -q | -v ] user\n";
+ die "Usage:\n freeside-upgrade [ -d ] [ -
r ] [ -
s ] [ -q | -v ] user\n";
}
=head1 NAME
}
=head1 NAME
@@
-181,7
+181,7
@@
freeside-upgrade - Upgrades database schema for new freeside verisons.
=head1 SYNOPSIS
=head1 SYNOPSIS
- freeside-upgrade [ -d ] [ -s ] [ -q | -v ]
+ freeside-upgrade [ -d ] [ -
r ] [ -
s ] [ -q | -v ]
=head1 DESCRIPTION
=head1 DESCRIPTION
@@
-203,6
+203,9
@@
Also performs other upgrade functions:
[ -q ]: Run quietly. This may become the default at some point.
[ -q ]: Run quietly. This may become the default at some point.
+ [ -r ]: Skip sqlradius updates. Useful for occassions where the sqlradius
+ databases may be inaccessible.
+
[ -v ]: Run verbosely, sending debugging information to STDERR. This is the
current default.
[ -v ]: Run verbosely, sending debugging information to STDERR. This is the
current default.