Index: xymon/client/localclient.cfg
===================================================================
--- xymon.orig/client/localclient.cfg	2011-09-29 20:22:32.000000000 +0200
+++ xymon/client/localclient.cfg	2011-09-30 00:48:21.000000000 +0200
@@ -191,6 +191,8 @@
 #             - "NOEXIST" triggers a warning if the file exists. By default,
 #               a warning is triggered for files that have a FILE entry, but
 #               which do not exist.
+#             - "IFEXIST" only checks the file if it exists. If the file is
+#                reported as missing by the client, it is ignored.
 #             - "TYPE=type" where "type" is one of "file", "dir", "char", "block", 
 #               "fifo", or "socket". Triggers warning if the file is not of the
 #               specified type.
Index: xymon/xymond/client_config.c
===================================================================
--- xymon.orig/xymond/client_config.c	2011-09-29 20:22:33.000000000 +0200
+++ xymon/xymond/client_config.c	2011-09-30 00:48:21.000000000 +0200
@@ -141,6 +141,7 @@
 #define FCHK_MD5      (1 << 25)
 #define FCHK_SHA1     (1 << 26)
 #define FCHK_RMD160   (1 << 27)
+#define FCHK_IFEXIST  (1 << 28)
 
 #define CHK_OPTIONAL  (1 << 30)
 #define CHK_TRACKIT   (1 << 31)
@@ -1042,6 +1043,9 @@
 					if (strcasecmp(tok, "noexist") == 0) {
 						currule->flags |= FCHK_NOEXIST;
 					}
+					else if (strcasecmp(tok, "ifexist") == 0) {
+						currule->flags |= FCHK_IFEXIST;
+					}
 					else if (strncasecmp(tok, "type=", 5) == 0) {
 						currule->flags |= FCHK_TYPE;
 						if (strcasecmp(tok+5, "socket") == 0) currule->rule.fcheck.ftype = S_IFSOCK;
@@ -1679,6 +1683,8 @@
 
 			if (rwalk->flags & FCHK_NOEXIST) 
 				printf(" noexist");
+			if (rwalk->flags & FCHK_IFEXIST)
+				printf(" ifexist");
 			if (rwalk->flags & FCHK_TYPE)
 				printf(" type=%s", ftypestr(rwalk->rule.fcheck.ftype));
 			if (rwalk->flags & FCHK_MODE) 
@@ -2688,6 +2694,7 @@
 		*anyrules = 1;
 		if (!exists) {
 			if (rwalk->flags & CHK_OPTIONAL) goto nextcheck;
+			if (rwalk->flags & FCHK_IFEXIST) goto nextcheck;
 
 			if (!(rwalk->flags & FCHK_NOEXIST)) {
 				/* Required file does not exist */
Index: xymon/xymond/etcfiles/analysis.cfg
===================================================================
--- xymon.orig/xymond/etcfiles/analysis.cfg	2011-09-30 00:45:27.000000000 +0200
+++ xymon/xymond/etcfiles/analysis.cfg	2011-09-30 00:48:21.000000000 +0200
@@ -189,6 +189,8 @@
 #             - "NOEXIST" triggers a warning if the file exists. By default,
 #               a warning is triggered for files that have a FILE entry, but
 #               which do not exist.
+#             - "IFEXIST" only checks the file if it exists. If the file is
+#                reported as missing by the client, it is ignored.
 #             - "TYPE=type" where "type" is one of "file", "dir", "char", "block", 
 #               "fifo", or "socket". Triggers warning if the file is not of the
 #               specified type.
Index: xymon/xymond/analysis.cfg.5
===================================================================
--- xymon.orig/xymond/analysis.cfg.5	2011-09-29 20:22:33.000000000 +0200
+++ xymon/xymond/analysis.cfg.5	2011-09-30 00:48:21.000000000 +0200
@@ -285,6 +285,9 @@
 triggers a warning if the file exists. By default,
 a warning is triggered for files that have a FILE entry, but
 which do not exist.
+.IP "ifexist"
+only checks the file if it exists. If the file is
+reported as missing by the client, it is ignored.
 .IP "type=TYPE"
 where TYPE is one of "file", "dir", "char", "block",
 "fifo", or "socket". Triggers warning if the file is not of the
