Skip to content

Commit

Permalink
make: Install systemd targets in systemd unit dir
Browse files Browse the repository at this point in the history
Install the agent systemd targets after evaluating the systemd
unitdir configured for the systemd package.
We were initially assuming this as "/usr/lib/systemd/system/"
but this is not the case for all distros such as debian and ubuntu.

Fixes kata-containers#498

Signed-off-by: Archana Shinde <[email protected]>
  • Loading branch information
amshinde committed Mar 21, 2019
1 parent a41f322 commit 0bf9d1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ TRACE_DEV_MODE := no
# Path to systemd unit directory if installed as not init.
UNIT_DIR := /usr/lib/systemd/system

HAVE_SYSTEMD := $(shell pkg-config --exists systemd 2>/dev/null && echo 'yes')

ifeq ($(HAVE_SYSTEMD),yes)
UNIT_DIR := $(shell pkg-config --variable=systemdsystemunitdir systemd)
endif

# Path to systemd drop-in snippet directory used to override the agent's
# service without having to modify the pristine agent service file.
SNIPPET_DIR := /etc/systemd/system/$(AGENT_SERVICE).d/
Expand Down

0 comments on commit 0bf9d1e

Please sign in to comment.