From: Eric Bollengier Date: Tue, 2 Oct 2007 07:28:29 +0000 (+0000) Subject: ebl Checks if $HOME exists for default location of .brestore.conf X-Git-Tag: Release-3.0.0~2400 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2e3fe1be61e201e19e24655ada6b327573f10d1c;p=bacula%2Fbacula ebl Checks if $HOME exists for default location of .brestore.conf git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5708 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/brestore/ReleaseNotes b/gui/brestore/ReleaseNotes index 8924420792..723a1ebc47 100644 --- a/gui/brestore/ReleaseNotes +++ b/gui/brestore/ReleaseNotes @@ -1,5 +1,8 @@ Release Notes for brestore 2.2.0 +Version 2.2.5-1: + - Fix warning, thanks to Tuomas Jormola + Version 2.2.0-2: - cleanup brestore - update brestore_xxx only when job is in (T, f, A) diff --git a/gui/brestore/brestore.pl b/gui/brestore/brestore.pl index edb27f128b..fb6178ceef 100755 --- a/gui/brestore/brestore.pl +++ b/gui/brestore/brestore.pl @@ -3275,7 +3275,7 @@ sub HELP_MESSAGE exit 1; } -my $file_conf = "$ENV{HOME}/.brestore.conf" ; +my $file_conf = (exists $ENV{HOME})? "$ENV{HOME}/.brestore.conf" : undef ; my $batch_mod; GetOptions("conf=s" => \$file_conf, @@ -3283,6 +3283,11 @@ GetOptions("conf=s" => \$file_conf, "debug" => \$debug, "help" => \&HELP_MESSAGE) ; +if (! defined $file_conf) { + print STDERR "Could not detect default config and no config file specified\n"; + HELP_MESSAGE(); +} + my $p = new Pref($file_conf); if (! -f $file_conf) {