Group :: Monitoramento
RPM: xymon
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: xymon.helpdir.patch
Download
Download
--- xymond/etcfiles/xymonserver.cfg.DIST.helpdir 2011-10-13 05:49:56.000000000 -0700
+++ xymond/etcfiles/xymonserver.cfg.DIST 2012-04-26 16:56:29.966750997 -0700
@@ -94,2 +94,3 @@
XYMONREPDIR="$XYMONWWWDIR/rep" # Top-level directory for Xymon reports.
+XYMONHELPDIR="$XYMONSTATICWWWDIR/help" # Online help files are located here
XYMONSNAPDIR="$XYMONWWWDIR/snap" # Top-level directory for Xymon snapshots.
--- lib/links.c.helpdir 2011-09-03 23:01:06.000000000 -0700
+++ lib/links.c 2012-04-26 16:32:32.977531888 -0700
@@ -77,3 +77,3 @@
-static void load_links(char *directory, char *urlprefix)
+static void load_links(char *directory, char *urlprefix, int softfail)
{
@@ -87,3 +87,4 @@
if (!linkdir) {
- errprintf("Cannot read links in directory %s\n", directory);
+ if (softfail) dbgprintf("Cannot read links in directory %s\n", directory);
+ else errprintf("Cannot read links in directory %s\n", directory);
return;
@@ -139,13 +139,16 @@
if (!hostdocurl || (strlen(hostdocurl) == 0)) {
strcpy(dirname, xgetenv("XYMONNOTESDIR"));
- load_links(dirname, notesskin);
+ load_links(dirname, notesskin, 1);
}
- /* Change xxx/xxx/xxx/notes into xxx/xxx/xxx/help */
- strcpy(dirname, xgetenv("XYMONNOTESDIR"));
- p = strrchr(dirname, '/'); *p = '\0'; strcat(dirname, "/help");
- load_links(dirname, helpskin);
+ /* If no XYMONHELPDIR, change xxx/xxx/xxx/notes into xxx/xxx/xxx/help */
+ if (xgetenv("XYMONHELPDIR")) strcpy(dirname, xgetenv("XYMONHELPDIR"));
+ else {
+ strcpy(dirname, xgetenv("XYMONNOTESDIR"));
+ p = strrchr(dirname, '/'); *p = '\0'; strcat(dirname, "/help");
+ }
+ load_links(dirname, helpskin, 0);
linksloaded = 1;