chiark / gitweb /
sysv: optionally disable of SysV init/rcN.d support at compile time
authorFabiano Fidencio <fidencio@profusion.mobi>
Tue, 21 Sep 2010 03:23:12 +0000 (00:23 -0300)
committerLennart Poettering <lennart@poettering.net>
Mon, 27 Sep 2010 01:25:05 +0000 (03:25 +0200)
commit07459bb6b92268beb2599f65cf195708d88c51cc
treef533168f2e656f3de37a53293b60b1a27b8580be
parent66d9b3b59551a33398b2201662af5c8c17a367c9
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).
12 files changed:
configure.ac
src/build.h
src/dbus-manager.c
src/dbus-service.c
src/load-fragment.c
src/main.c
src/manager.h
src/path-lookup.c
src/path-lookup.h
src/service.c
src/service.h
src/systemctl.c