46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
|
From afd1fd8d412aa6f99ef9afa30ab15ae5d3314e1e Mon Sep 17 00:00:00 2001
|
||
|
From: Harald Hoyer <harald@redhat.com>
|
||
|
Date: Wed, 16 May 2012 11:28:42 +0200
|
||
|
Subject: [PATCH] Makefile: install dracut service files from systemd dracut
|
||
|
module
|
||
|
|
||
|
---
|
||
|
Makefile | 11 ++++++++++-
|
||
|
dracut.spec | 1 +
|
||
|
2 files changed, 11 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/Makefile b/Makefile
|
||
|
index bf51b51..d9068c5 100644
|
||
|
--- a/Makefile
|
||
|
+++ b/Makefile
|
||
|
@@ -56,7 +56,16 @@ install: doc
|
||
|
ln -s dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7
|
||
|
if [ -n "$(systemdsystemunitdir)" ]; then \
|
||
|
mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
|
||
|
- install -m 0644 dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir); \
|
||
|
+ for i in \
|
||
|
+ modules.d/98systemd/dracut-initqueue.service \
|
||
|
+ modules.d/98systemd/dracut-pre-pivot.service \
|
||
|
+ modules.d/98systemd/dracut-pre-trigger.service \
|
||
|
+ modules.d/98systemd/dracut-pre-udev.service \
|
||
|
+ modules.d/98systemd/switch-root.service \
|
||
|
+ modules.d/98systemd/switch-root.target \
|
||
|
+ dracut-shutdown.service; do \
|
||
|
+ install -m 0644 $$i $(DESTDIR)$(systemdsystemunitdir); \
|
||
|
+ done; \
|
||
|
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \
|
||
|
ln -s ../dracut-shutdown.service \
|
||
|
$(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \
|
||
|
diff --git a/dracut.spec b/dracut.spec
|
||
|
index 73c66b5..201da0d 100644
|
||
|
--- a/dracut.spec
|
||
|
+++ b/dracut.spec
|
||
|
@@ -301,6 +301,7 @@ rm -rf $RPM_BUILD_ROOT
|
||
|
%dir %{_sharedstatedir}/initramfs
|
||
|
%if %{defined _unitdir}
|
||
|
%{_unitdir}/*.service
|
||
|
+%{_unitdir}/*.target
|
||
|
%{_unitdir}/*/*.service
|
||
|
%endif
|
||
|
|