"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libenv/sysinfo.c" between
cfengine-3.15.3.tar.gz and cfengine-3.15.4.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.

sysinfo.c  (cfengine-3.15.3):sysinfo.c  (cfengine-3.15.4)
skipping to change at line 1141 skipping to change at line 1141
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 1387 skipping to change at line 1392
{ {
*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. 2 change blocks. 
0 lines changed or deleted 35 lines changed or added

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