summaryrefslogtreecommitdiffstats
path: root/rc.c
diff options
context:
space:
mode:
Diffstat (limited to 'rc.c')
-rw-r--r--rc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/rc.c b/rc.c
index dcfd7eb..d80fb76 100644
--- a/rc.c
+++ b/rc.c
@@ -198,6 +198,17 @@ static int Pservices_in_state(lua_State *L)
rc_stringlist_free(list);
return 1;
}
+
+/** services_scheduled(service) - List the services shceduled to start when this one does */
+static int Pservices_scheduled(lua_State *L)
+{
+ const char *service = luaL_checkstring(L, 1);
+ RC_STRINGLIST *list = rc_services_scheduled(service);
+ push_stringlist(L, list);
+ rc_stringlist_free(list);
+ return 1;
+}
+
static const luaL_reg R[] =
@@ -217,6 +228,7 @@ static const luaL_reg R[] =
{"services_in_runlevel",Pservices_in_runlevel},
{"services_in_runlevel_stacked",Pservices_in_runlevel_stacked},
{"services_in_state", Pservices_in_state},
+ {"services_scheduled", Pservices_scheduled},
{NULL, NULL}
};