summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Echolot/Config.pm18
-rw-r--r--NEWS2
2 files changed, 11 insertions, 9 deletions
diff --git a/Echolot/Config.pm b/Echolot/Config.pm
index 147e98e..5ef4fda 100644
--- a/Echolot/Config.pm
+++ b/Echolot/Config.pm
@@ -68,15 +68,15 @@ sub init($) {
die ("Basedir is not defined\n") unless defined $params->{'basedir'};
- my @CONFIG_FILES =
- ( $ENV{'ECHOLOT_CONF'},
- $params->{'basedir'}.'/pingd.conf',
- $ENV{'HOME'}.'/echolot/pingd.conf',
- $ENV{'HOME'}.'/pingd.conf',
- $ENV{'HOME'}.'/.pingd.conf',
- '/etc/echolot/pingd.conf',
- '/etc/pingd.conf' );
-
+ my @CONFIG_FILES = ();
+ push(@CONFIG_FILES, $ENV{'ECHOLOT_CONF'}) if defined $ENV{'ECHOLOT_CONF'};
+ push(@CONFIG_FILES, $params->{'basedir'}.'/pingd.conf') if defined $params->{'basedir'};
+ push(@CONFIG_FILES, $ENV{'HOME'}.'/echolot/pingd.conf') if defined $ENV{'HOME'};
+ push(@CONFIG_FILES, $ENV{'HOME'}.'/pingd.conf') if defined $ENV{'HOME'};
+ push(@CONFIG_FILES, $ENV{'HOME'}.'/.pingd.conf') if defined $ENV{'HOME'};
+ push(@CONFIG_FILES, '/etc/echolot/pingd.conf');
+ push(@CONFIG_FILES, '/etc/pingd.conf');
+
my $DEFAULT;
$DEFAULT = {
# System Specific Options
diff --git a/NEWS b/NEWS
index ddc30ec..9708477 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ Changes in version -
script
* debian: Create echolot user group in proper gid space.
* debian: remove debconf stuff.
+ * handle empty environment better - we would whine when
+ HOME is not set previously.
Changes in version 2.1.6 - 2004-08-07
* Catch a possible use of undefined values in a log trace() call.