setup: postshell.c Skip commented out lines.

arekm arekm at pld-linux.org
Fri Oct 14 12:14:42 CEST 2011


Author: arekm                        Date: Fri Oct 14 10:14:41 2011 GMT
Module: setup                         Tag: HEAD
---- Log message:
Skip commented out lines.

---- Files affected:
setup:
   postshell.c (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: setup/postshell.c
diff -u setup/postshell.c:1.6 setup/postshell.c:1.7
--- setup/postshell.c:1.6	Tue Mar  7 21:46:09 2006
+++ setup/postshell.c	Fri Oct 14 12:14:36 2011
@@ -73,6 +73,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <ctype.h>
 #include <fcntl.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
@@ -166,8 +167,16 @@
 
 void exec_line(char *s)
 {
-	char *argv[MAX_ARGS + 1];
+	char *argv[MAX_ARGS + 1], *c;
 	int ret;
+
+
+	/* skip blank characters */	
+	for (c = s; c && isblank(*c); c++)
+		;
+	/* skip commented lines */
+	if (*c == '#')
+		return;
 
 	split_argv(argv, s);
 	
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/setup/postshell.c?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list