--- ../../SOURCES/ndoutils-1.4b7/src/ndomod.c.1.4b7	2008-09-13 11:39:31.000000000 +0200
+++ ndoutils-1.4b7/src/ndomod.c	2008-09-15 11:37:48.000000000 +0200
@@ -591,20 +591,25 @@
 	/* get the raw command line */
 #ifdef BUILD_NAGIOS_2X
 	get_raw_command_line(ndomod_sink_rotation_command,raw_command_line,sizeof(raw_command_line),STRIP_ILLEGAL_MACRO_CHARS|ESCAPE_MACRO_CHARS);
+	strip(raw_command_line);
 #else
 	get_raw_command_line(find_command(ndomod_sink_rotation_command),ndomod_sink_rotation_command,&raw_command_line_3x,STRIP_ILLEGAL_MACRO_CHARS|ESCAPE_MACRO_CHARS);
+	strip(raw_command_line_3x);
 #endif
-	strip(raw_command_line);
 
 	/* process any macros in the raw command line */
 #ifdef BUILD_NAGIOS_2X
 	process_macros(raw_command_line,processed_command_line,(int)sizeof(processed_command_line),STRIP_ILLEGAL_MACRO_CHARS|ESCAPE_MACRO_CHARS);
 #else
-	process_macros(raw_command_line,&processed_command_line_3x,STRIP_ILLEGAL_MACRO_CHARS|ESCAPE_MACRO_CHARS);
+	process_macros(raw_command_line_3x,&processed_command_line_3x,STRIP_ILLEGAL_MACRO_CHARS|ESCAPE_MACRO_CHARS);
 #endif
 
 	/* run the command */
+#ifdef BUILD_NAGIOS_2X
 	my_system(processed_command_line,ndomod_sink_rotation_timeout,&early_timeout,&exectime,NULL,0);
+#else
+	my_system(processed_command_line_3x,ndomod_sink_rotation_timeout,&early_timeout,&exectime,NULL,0);
+#endif
 
 
 	/* allow data to be written to the sink */

