summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'client/scireclient.pl')
-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 {