[Initng-svn] r4379 - initng/trunk/plugins/bash_parser
svn at initng.thinktux.net
svn at initng.thinktux.net
Wed Jun 7 02:15:19 CEST 2006
Author: jimmy
Date: Wed Jun 7 02:15:18 2006
New Revision: 4379
Modified:
initng/trunk/plugins/bash_parser/initng_bash_parser.c
Log:
Make sure we get right files parsing.
Modified: initng/trunk/plugins/bash_parser/initng_bash_parser.c
==============================================================================
--- initng/trunk/plugins/bash_parser/initng_bash_parser.c (original)
+++ initng/trunk/plugins/bash_parser/initng_bash_parser.c Wed Jun 7 02:15:18 2006
@@ -707,12 +707,23 @@
pipe_h *current_pipe;
/*printf("create_new_active(%s);\n", name); */
-
- /* check if initfile exists */
- strncat(file, name, 1020 - strlen(SCRIPT_PATH));
+ /*printf("service \"%s\" ", name);*/
+
+ /* Make the filename, cutting on first '/' in name */
+ {
+ int i=0;
+ while(name[i] && i < 500 && name[i] != '/')
+ i++;
+ strncat(file, name, i);
+ }
+
+ /* printf(" parsing file \"%s\"\n", file); */
+
+ /* check so that file exists */
if (stat(file, &fstat) != 0)
{
-#if 0 /* Gentoo support disabled for now - doesn't work properly yet */
+#if 0
+ /* Gentoo support disabled for now - doesn't work properly yet */
strcpy(file, "/etc/init.d/");
strncat(file, name, 1020 - strlen("/etc/init.d/"));
More information about the Initng-svn
mailing list