summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2007-12-31 23:57:35 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2007-12-31 23:57:35 +0000
commit7105b8bb9478aa4538a2346162a841ceb76059ef (patch)
tree8e7eb6e313cffc66376ba93e312936e9fd0ad0c4 /client
parentswitching on the database lines. (diff)
downloadscire-7105b8bb9478aa4538a2346162a841ceb76059ef.tar.gz
scire-7105b8bb9478aa4538a2346162a841ceb76059ef.tar.bz2
scire-7105b8bb9478aa4538a2346162a841ceb76059ef.zip
switch config location to /etc/scire/
add config defaults to scireclient svn path=/branches/new-fu/; revision=301
Diffstat (limited to 'client')
-rwxr-xr-xclient/scireclient.pl12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/scireclient.pl b/client/scireclient.pl
index 490a85b..b93c79a 100755
--- a/client/scireclient.pl
+++ b/client/scireclient.pl
@@ -11,7 +11,8 @@ use Data::Dumper;
use File::Path;
use Sys::Hostname;
-my $SCIRE_CONFIG_FILE = '../etc/scire.conf'; #will be /etc/scire.conf when released.
+my $ETC_DIR = "/etc/scire";
+my $SCIRE_CONFIG_FILE = "${ETC_DIR}/scire.conf";
my %conf;
my ($SERVER_STDOUT, $SERVER_STDIN);
my $connection_pid;
@@ -144,6 +145,10 @@ sub check_job_dir {
sub read_config_file {
my $conf_file = shift;
+ my %config_defaults = (
+ "key_file" => "${ETC_DIR}/client_key",
+ "debug" => 0,
+ );
open(FH, "< ${conf_file}") or die("Couldn't open the config file ${conf_file}: $!");
while (<FH>) {
chomp;
@@ -155,6 +160,11 @@ sub read_config_file {
}
}
close(FH) or die("Couldn't close the config file ${conf_file}: $!");
+ for(keys %config_defaults) {
+ if(!defined $conf{$_}) {
+ $conf{$_} = $config_defaults{$_};
+ }
+ }
}
sub register_client {