diff -Nurp nagios-1.2/base/checks.c nagios-1.2-folke/base/checks.c
--- nagios-1.2/base/checks.c	2003-12-05 03:01:44.000000000 +0100
+++ nagios-1.2-folke/base/checks.c	2004-06-04 12:44:56.000000000 +0200
@@ -1693,19 +1693,6 @@ int run_host_check(host *hst){
 		return HOST_UP;
 	        }
 
-	/* find the command we use to check the host */
-	temp_command=find_command(hst->host_check_command,NULL);
-
-	/* if we couldn't find the command, return with an error */
-	if(temp_command==NULL){
-
-#ifdef DEBUG3
-		printf("\tCouldn't find the host check command!\n");
-#endif
-
-		return HOST_UP;
-	        }
-
 	/* grab the host macros */
 	clear_volatile_macros();
 	grab_host_macros(hst);
@@ -1715,13 +1702,23 @@ int run_host_check(host *hst){
 	hst->last_check=start_time;
 
 	/* get the raw command line */
-	strncpy(raw_check_command,temp_command->command_line,sizeof(raw_check_command));
-	raw_check_command[sizeof(raw_check_command)-1]='\x0';
+	get_raw_command_line(hst->host_check_command,raw_check_command,sizeof(raw_check_command));
+	strip(raw_check_command);
+
+	/* process any macros contained in the argument */
+	process_macros(raw_check_command,processed_check_command,sizeof(processed_check_command),0);
+	strip(processed_check_command);
 
-	/* process any macros in the check command */
-	process_macros(raw_check_command,&processed_check_command[0],(int)sizeof(processed_check_command),0);
+	/* if we couldn't find the command, return with an error */
+	if(processed_check_command==NULL){
 
-			
+#ifdef DEBUG3
+		printf("\tCouldn't find the host check command!\n");
+#endif
+
+		return HOST_UP;
+	        }
+		
 #ifdef DEBUG3
 	printf("\t\tRaw Command: %s\n",hst->host_check_command);
 	printf("\t\tProcessed Command: %s\n",processed_check_command);
diff -Nurp nagios-1.2/base/config.c nagios-1.2-folke/base/config.c
--- nagios-1.2/base/config.c	2003-08-07 05:30:14.000000000 +0200
+++ nagios-1.2-folke/base/config.c	2004-06-04 12:45:04.000000000 +0200
@@ -1475,10 +1475,19 @@ int pre_flight_check(void){
 
 		/* hosts that don't have check commands defined shouldn't ever be checked... */
 		if(temp_host->host_check_command!=NULL){
+		    strncpy(temp_buffer,temp_host->host_check_command,sizeof(temp_buffer));
+		    temp_buffer[sizeof(temp_buffer)-1]='\x0';
 
-			temp_command=find_command(temp_host->host_check_command,NULL);
+		    /* raw command lines shouldn't be checked */
+		    if(temp_buffer[0]=='"')
+		      continue;
+		    /* get the command name, leave any arguments behind */
+		    temp_command_name=my_strtok(temp_buffer,"!");
+
+			temp_command=find_command(temp_command_name,NULL);
 			if(temp_command==NULL){
-				snprintf(temp_buffer,sizeof(temp_buffer),"Error: Host check command '%s' specified for host '%s' is not defined anywhere!",temp_host->host_check_command,temp_host->name);
+				snprintf(temp_buffer,sizeof(temp_buffer),"Error: Host check command '%s' specified for host '%s' is not defined anywhere!",
+					    temp_command_name,temp_host->name);
 				temp_buffer[sizeof(temp_buffer)-1]='\x0';
 				write_to_logs_and_console(temp_buffer,NSLOG_VERIFICATION_ERROR,TRUE);
 				errors++;
