Commit 44901677 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(param): Moved here from various files.

(parameters): Added "Normal shutdown time", "Mail after downtime",
	"Mail until downtime" and "lyskomd path".
(read_configuration): Handle param.lyskomd_path.
parent 0081f07d
/*
* $Id: server-config.c,v 0.54 1999/04/17 18:46:38 ceder Exp $
* $Id: server-config.c,v 0.55 1999/04/17 21:57:10 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -37,7 +37,7 @@
#endif
static const char *
rcsid = "$Id: server-config.c,v 0.54 1999/04/17 18:46:38 ceder Exp $";
rcsid = "$Id: server-config.c,v 0.55 1999/04/17 21:57:10 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -65,6 +65,7 @@ USE(rcsid);
#include "lyskomd.h"
#include "unused.h"
struct kom_par param;
static Success log_param(const char *val, const struct parameter *par);
static Success jubel(const char *val, const struct parameter *par);
......@@ -268,6 +269,17 @@ static const struct parameter parameters[] = {
{"Jubel",
jubel, 0, -1, NULL, NULL},
/* Configuration for support programs. */
{"Normal shutdown time",
assign_int, 0, 1, "21", &param.normal_shutdown_time},
{"Mail after downtime",
assign_int, 0, 1, "60", &param.downtime_mail_start},
{"Mail until downtime",
assign_int, 0, 1, "120", &param.downtime_mail_end},
{"lyskomd path",
assign_string, 0, 1, "bin/lyskomd", &param.lyskomd_path},
/* end marker */
{NULL, NULL, 0, 0, NULL, NULL}};
......@@ -421,6 +433,7 @@ read_configuration(const char *conf_file)
assert(param.aux_def_file != NULL);
assert(param.status_file != NULL);
assert(param.core_dir != NULL);
assert(param.lyskomd_path != NULL);
if (strlen(param.dbase_dir) > 0)
{
......@@ -442,6 +455,7 @@ read_configuration(const char *conf_file)
add_prefix(&param.aux_def_file);
add_prefix(&param.status_file);
add_prefix(&param.core_dir);
add_prefix(&param.lyskomd_path);
}
else
{
......@@ -457,6 +471,7 @@ read_configuration(const char *conf_file)
err |= check_abs_path(&param.aux_def_file);
err |= check_abs_path(&param.status_file);
err |= check_abs_path(&param.core_dir);
err |= check_abs_path(&param.lyskomd_path);
}
/* FIXME///+++ Check config parameters for sanity */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment