summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorjeff <jeff>2009-05-18 18:21:38 +0000
committerjeff <jeff>2009-05-18 18:21:38 +0000
commitc6ba0fa6271880599ce3d60dcd23de248526f0b8 (patch)
treecb58aa89032edae8533e5d53758b349ce76f1503 /FS
parentaab3bdd971c21f6d422b7708ecf8ba7cb5ec0fea (diff)
prevent death on meritless sqlradius upgrade attempts
Diffstat (limited to 'FS')
-rwxr-xr-xFS/bin/freeside-upgrade13
1 files changed, 8 insertions, 5 deletions
diff --git a/FS/bin/freeside-upgrade b/FS/bin/freeside-upgrade
index 24f577f11..7ee35c68d 100755
--- a/FS/bin/freeside-upgrade
+++ b/FS/bin/freeside-upgrade
@@ -1,7 +1,7 @@
#!/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;
@@ -17,7 +17,7 @@ my $start = time;
die "Not running uid freeside!" unless checkeuid();
-getopts("dqs");
+getopts("dqrs");
$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()
- 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;
@@ -172,7 +172,7 @@ sub dbdef_create { # reverse engineer the schema from the DB and save to file
}
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
@@ -181,7 +181,7 @@ freeside-upgrade - Upgrades database schema for new freeside verisons.
=head1 SYNOPSIS
- freeside-upgrade [ -d ] [ -s ] [ -q | -v ]
+ freeside-upgrade [ -d ] [ -r ] [ -s ] [ -q | -v ]
=head1 DESCRIPTION
@@ -203,6 +203,9 @@ Also performs other upgrade functions:
[ -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.