diff --git a/policycoreutils/mcstrans/src/Makefile b/policycoreutils/mcstrans/src/Makefile index fb444909..907a1f1b 100644 --- a/policycoreutils/mcstrans/src/Makefile +++ b/policycoreutils/mcstrans/src/Makefile @@ -17,6 +17,7 @@ endif PREFIX ?= $(DESTDIR)/usr SBINDIR ?= $(DESTDIR)/sbin INITDIR ?= $(DESTDIR)/etc/rc.d/init.d +SYSTEMDDIR ?= $(DESTDIR)/usr/lib/systemd PROG_SRC=mcstrans.c mcscolor.c mcstransd.c mls_level.c PROG_OBJS= $(patsubst %.c,%.o,$(PROG_SRC)) @@ -38,6 +39,8 @@ install: all install -m 755 $(PROG) $(SBINDIR) test -d $(INITDIR) || install -m 755 -d $(INITDIR) install -m 755 $(INITSCRIPT).init $(INITDIR)/$(INITSCRIPT) + test -d $(SYSTEMDDIR)/system || install -m 755 -d $(SYSTEMDDIR)/system + install -m 644 mcstrans.service $(SYSTEMDDIR)/system/ clean: -rm -f $(OBJS) $(LOBJS) $(TARGET) $(PROG) $(PROG_OBJS) *~ \#* diff --git a/policycoreutils/mcstrans/src/mcstrans.service b/policycoreutils/mcstrans/src/mcstrans.service new file mode 100644 index 00000000..64bb3613 --- /dev/null +++ b/policycoreutils/mcstrans/src/mcstrans.service @@ -0,0 +1,9 @@ +[Unit] +Description=Translates SELinux MCS/MLS labels to human readable form +ConditionSecurity=selinux + +[Service] +ExecStart=/sbin/mcstransd -f + +[Install] +WantedBy=multi-user.target