summaryrefslogtreecommitdiff
path: root/src/service.h
diff options
context:
space:
mode:
authorFabiano Fidencio <fidencio@profusion.mobi>2010-09-21 00:23:12 -0300
committerLennart Poettering <lennart@poettering.net>2010-09-27 03:25:05 +0200
commit07459bb6b92268beb2599f65cf195708d88c51cc (patch)
treef533168f2e656f3de37a53293b60b1a27b8580be /src/service.h
parent66d9b3b59551a33398b2201662af5c8c17a367c9 (diff)
sysv: optionally disable of SysV init/rcN.d support at compile time
This patch adds a cpp definition HAVE_SYSV_COMPAT that is used to isolate code dealing with /etc/init.d and /etc/rcN.d for systems where it does not make sense (one that does not use sysv or one that is fully systemd native). The patch tries to be as little intrusive as possible, however in order to minimize the number of #ifdef'ed regions I've reordered some code in path-lookup.c:lookup_paths_init() where all code dealing with sysv is now isolated under running_as == MANAGER_SYSTEM as well. Moreover, In struct Service, some fields were rearranged to reduce the number of ifdefs. Lennart's suggestions were fixed and squashed with the original patch, that was sent by Gustavo Sverzut Barbieri (barbieri@profusion.mobi).
Diffstat (limited to 'src/service.h')
-rw-r--r--src/service.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/service.h b/src/service.h
index f01906cad4..39bd1b3401 100644
--- a/src/service.h
+++ b/src/service.h
@@ -106,6 +106,7 @@ struct Service {
ExecCommand *control_command;
ServiceExecCommand control_command_id;
pid_t main_pid, control_pid;
+ int socket_fd;
bool permissions_start_only;
bool root_directory_start_only;
@@ -117,14 +118,14 @@ struct Service {
bool bus_name_good:1;
bool forbid_restart:1;
bool got_socket_fd:1;
+#ifdef HAVE_SYSV_COMPAT
bool sysv_has_lsb:1;
bool sysv_enabled:1;
-
- int socket_fd;
int sysv_start_priority;
char *sysv_path;
char *sysv_runlevels;
+#endif
char *bus_name;