"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libenv/sysinfo.c" between
cfengine-3.12.6.tar.gz and cfengine-3.12.7.tar.gz

About: CFEngine is a configuration management system for configuring and maintaining Unix-like computers (using an own high level policy language). Community version. Community version. LTS (Long Term Support) release.

sysinfo.c  (cfengine-3.12.6):sysinfo.c  (cfengine-3.12.7)
skipping to change at line 415 skipping to change at line 415
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "local_libdir", "l ib", CF_DATA_TYPE_STRING, "source=agent"); EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "local_libdir", "l ib", CF_DATA_TYPE_STRING, "source=agent");
} }
else else
{ {
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_version_major" , "BAD VERSION " VERSION, CF_DATA_TYPE_STRING, "source=agent"); EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_version_major" , "BAD VERSION " VERSION, CF_DATA_TYPE_STRING, "source=agent");
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_version_minor" , "BAD VERSION " VERSION, CF_DATA_TYPE_STRING, "source=agent"); EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_version_minor" , "BAD VERSION " VERSION, CF_DATA_TYPE_STRING, "source=agent");
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_version_patch" , "BAD VERSION " VERSION, CF_DATA_TYPE_STRING, "source=agent"); EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_version_patch" , "BAD VERSION " VERSION, CF_DATA_TYPE_STRING, "source=agent");
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "libdir", workdir, CF_DATA_TYPE_STRING, "source=agent"); EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "libdir", workdir, CF_DATA_TYPE_STRING, "source=agent");
} }
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "cf_version_release",
RELEASE, CF_DATA_TYPE_STRING, "source=agent");
} }
static void GetNameInfo3(EvalContext *ctx) static void GetNameInfo3(EvalContext *ctx)
{ {
int i, found = false; int i, found = false;
char *sp, workbuf[CF_BUFSIZE]; char *sp, workbuf[CF_BUFSIZE];
time_t tloc; time_t tloc;
struct hostent *hp; struct hostent *hp;
struct sockaddr_in cin; struct sockaddr_in cin;
unsigned char digest[EVP_MAX_MD_SIZE + 1]; unsigned char digest[EVP_MAX_MD_SIZE + 1];
skipping to change at line 1136 skipping to change at line 1139
if (os_release_id != NULL) if (os_release_id != NULL)
{ {
CanonifyNameInPlace(os_release_id); CanonifyNameInPlace(os_release_id);
const char *alias = NULL; const char *alias = NULL;
if (StringEqual(os_release_id, "rhel")) if (StringEqual(os_release_id, "rhel"))
{ {
alias = "redhat"; alias = "redhat";
} }
else if (StringEqual(os_release_id, "opensuse") ||
StringEqual(os_release_id, "sles"))
{
alias = "suse";
}
if (os_release_version_id == NULL) if (os_release_version_id == NULL)
{ {
// if VERSION_ID doesn't exist, define only one hard class: // if VERSION_ID doesn't exist, define only one hard class:
EvalContextClassPutHard(ctx, os_release_id, tags); EvalContextClassPutHard(ctx, os_release_id, tags);
if (alias != NULL) if (alias != NULL)
{ {
EvalContextClassPutHard(ctx, alias, tags); EvalContextClassPutHard(ctx, alias, tags);
} }
} }
skipping to change at line 1382 skipping to change at line 1390
{ {
*sp = '\0'; *sp = '\0';
break; break;
} }
} }
char context[CF_BUFSIZE]; char context[CF_BUFSIZE];
snprintf(context, CF_BUFSIZE, "%s_%s", VSYSNAME.sysname, vbuff); snprintf(context, CF_BUFSIZE, "%s_%s", VSYSNAME.sysname, vbuff);
SetFlavor(ctx, context); SetFlavor(ctx, context);
#ifdef __hpux
/*
* Define a hard class with just the version major number of HP-UX
*
* For example, when being run on HP-UX B.11.23 the following class will
* be defined: hpux_11
*/
// Extract major version number
char *major = NULL;
for (char *sp = vbuff; *sp != '\0'; sp++)
{
if (major == NULL && isdigit(*sp))
{
major = sp;
}
else if (!isdigit(*sp))
{
*sp = '\0';
}
}
if (major != NULL)
{
snprintf(context, CF_BUFSIZE, "hpux_%s", major);
EvalContextClassPutHard(ctx, context, "source=agent,derived-from=sys.fla
vor");
}
#endif
#ifdef __FreeBSD__ #ifdef __FreeBSD__
/* /*
* Define a hard class with just the version major number on FreeBSD * Define a hard class with just the version major number on FreeBSD
* *
* For example, when being run on either FreeBSD 10.0 or 10.1 a class * For example, when being run on either FreeBSD 10.0 or 10.1 a class
* called freebsd_10 will be defined * called freebsd_10 will be defined
*/ */
for (char *sp = vbuff; *sp != '\0'; sp++) for (char *sp = vbuff; *sp != '\0'; sp++)
{ {
if (*sp == '.') if (*sp == '.')
 End of changes. 3 change blocks. 
0 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)