Commit efa474f0 authored by ml's avatar ml

Fixed ini_RcReadAndSet

parent 0e5041b3
......@@ -1060,7 +1060,7 @@ ini_ReadBootFile (
/* Do we have this volume? */
vp = tree_Find(sts, cp->vid_t, &vid);
if (vp != NULL) {
errh_LogInfo(&cp->log, "Volume allready defined: %s", s);
errh_LogInfo(&cp->log, "Volume already defined: %s", s);
vp->isVolRef = 0;
/* todo !!! check versions */
} else {
......
......@@ -55,7 +55,8 @@ setRcValue(
pwr_tStatus
ini_RcReadAndSet(
char *nodename,
const char *dir,
const char *nodename,
int busid
) {
......@@ -84,23 +85,11 @@ ini_RcReadAndSet(
char filename[128];
int interval;
#ifdef OS_ELN
char hostspec[32];
#endif
for (rc = def_rc; rc && rc->name; rc++)
*rc->var = rc->val;
#if defined OS_VMS
sprintf(filename, load_cNameRc, load_cNameDirectory, nodename, busid);
#elif defined OS_ELN
ini_GetNodeInfo(NULL, NULL, NULL, hostspec, NULL, NULL);
sprintf(filename, "%s::%s%s", hostspec, load_cNameDirectory, name);
#else
sprintf(filename, "%s/%s", getenv(load_cNameDirectory), name);
#endif
sprintf(filename, load_cNameRc, dir, nodename, busid);
cdh_ToLower(filename, filename);
fp = fopen(filename, "r");
......
......@@ -13,7 +13,8 @@
pwr_tStatus
ini_RcReadAndSet(
char *nodename,
const char *dir,
const char *nodename,
int busid
);
......
......@@ -14,6 +14,7 @@
#include "co_ver.h"
#include "co_time.h"
#include "ini.h"
#include "ini_rc.h"
#include "rt_ini_alias.h"
#include "rt_ini_event.h"
#include "rt_bck_load.h"
......@@ -147,6 +148,10 @@ start (
}
}
sts = ini_RcReadAndSet(cp->dir, cp->nodename, cp->busid);
if (EVEN(sts))
errh_LogError(&cp->log, "ini_RcReadAndSet, %m", sts);
sts = ini_SetAttribute(cp->aliasfile.name, cp->nodename, 0);
if (EVEN(sts))
errh_LogError(&cp->log, "ini_SetAttribute, %m", sts);
......
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