[Initng-svn] r3841 - initng/trunk/src
svn at initng.thinktux.net
svn at initng.thinktux.net
Wed Apr 19 10:58:18 CEST 2006
Author: jimmy
Date: Wed Apr 19 10:58:08 2006
New Revision: 3841
Modified:
initng/trunk/src/initng_common.c
Log:
Now ngc -u /root/test.i works.
Modified: initng/trunk/src/initng_common.c
==============================================================================
--- initng/trunk/src/initng_common.c (original)
+++ initng/trunk/src/initng_common.c Wed Apr 19 10:58:08 2006
@@ -199,6 +199,8 @@
D_("get_service(%s): Can't get source.. \n", service->name);
return (FALSE);
}
+
+ /* set some standard pointers */
service->type = service->from_service->type;
service->data.res = &service->from_service->data;
@@ -207,6 +209,30 @@
/* will continue here only, if initng_modules_parse did succeed */
+ /* if the name of service is starting on a / chars, its a full filename
+ * and the service name cant be that name
+ */
+ if(service->name[0]=='/')
+ {
+ /*
+ * <jimmy.wennlund at gmail.com>
+ * TODO: we have to check all tese possible senarios!
+ *
+ * example 1, An i file containing a service.
+ * service->name == "/etc/initng/test.i" and service->from_service->name == "test"
+ *
+ * example 2, An i file containing multible services.
+ * service->name == "/etc/initng/system/coldplug.i" and service->from_service->name == "system/coldplug/pci"
+ *
+ * example 3, An i file containing a variable service.
+ * service->name == "/etc/initng/net.i" and servce->from_service->name == "net/ *"
+ */
+
+ /* Right now youst rip the from_service name right off */
+ free(service->name);
+ service->name=strdup(service->from_service->name);
+ }
+
/*
* if service->name is "samba", and service->from_service->name is "daemon/samba"
* we have to update service->name.
More information about the Initng-svn
mailing list