[PATCH 1/3] Add systemd unit file for mcstrans daemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Laurent Bigonville <bigon@xxxxxxxx>

---
 policycoreutils/mcstrans/src/Makefile         | 3 +++
 policycoreutils/mcstrans/src/mcstrans.service | 9 +++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 policycoreutils/mcstrans/src/mcstrans.service

diff --git a/policycoreutils/mcstrans/src/Makefile b/policycoreutils/mcstrans/src/Makefile
index fb44490..907a1f1 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 0000000..64bb361
--- /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
-- 
1.8.4.2


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux