Lines Matching defs:service
118 static int add_symlink(const char *service, const char *where) {
122 assert(service);
125 from = strjoina(arg_dest, "/", service);
126 to = strjoina(arg_dest, "/", where, ".wants/", service);
141 static int add_alias(const char *service, const char *alias) {
145 assert(service);
150 r = symlink(service, link);
178 log_warning("Overwriting existing symlink %s with real service.", unit);
313 * out whether something is a target or a service alias. */
336 /* Everything else we assume to be normal service names */
377 * service are pulled in by the services, as
378 * an indication that the generic service is
752 _cleanup_(free_sysvstubp) SysvStub *service = NULL;
786 service = new0(SysvStub, 1);
787 if (!service)
790 service->sysv_start_priority = -1;
791 service->name = name;
792 service->path = fpath;
795 r = hashmap_put(all_services, service->name, service);
799 service = NULL;
809 SysvStub *service;
866 service = hashmap_get(all_services, name);
867 if (!service){
875 service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority);
883 r = set_put(runlevel_services[i], service);
898 r = set_put(shutdown_services, service);
910 SET_FOREACH(service, runlevel_services[i], j) {
911 r = strv_extend(&service->before, rcnd_table[i].target);
916 r = strv_extend(&service->wanted_by, rcnd_table[i].target);
923 SET_FOREACH(service, shutdown_services, j) {
924 r = strv_extend(&service->before, SPECIAL_SHUTDOWN_TARGET);
929 r = strv_extend(&service->conflicts, SPECIAL_SHUTDOWN_TARGET);
948 SysvStub *service;
986 HASHMAP_FOREACH(service, all_services, j)
987 (void) load_sysv(service);
989 HASHMAP_FOREACH(service, all_services, j) {
990 (void) fix_order(service, all_services);
991 (void) generate_unit_file(service);