]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
systemd: make unit files symlinks
authorHarald Hoyer <harald@redhat.com>
Thu, 13 Jun 2013 08:52:46 +0000 (10:52 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 13 Jun 2013 09:08:03 +0000 (11:08 +0200)
Makefile
modules.d/98systemd/module-setup.sh

index 90a4011d58e775e9155b11b85715f7d192e8404b..d1201d607a5e4000b6493104bc6e5352d0e79d2a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -124,9 +124,9 @@ endif
                    dracut-pre-trigger.service \
                    dracut-pre-udev.service \
                    ; do \
-                       install -m 0644 modules.d/98systemd/$$i $(DESTDIR)$(systemdsystemunitdir); \
+                       ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98systemd/$$i $(DESTDIR)$(systemdsystemunitdir); \
                        ln -s ../$$i \
-                       $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants/$i; \
+                       $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants/$$i; \
                done \
        fi
        if [ -f install/dracut-install ]; then \
index 9183626426782fffac8cd89090493815e1713f58..386dd4f0efc20ee2aa930aab00d70b2a81a5b252 100755 (executable)
@@ -95,21 +95,6 @@ install() {
         $systemdsystemunitdir/sysinit.target.wants/systemd-udevd.service \
         $systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \
         \
-        $systemdsystemunitdir/dracut-cmdline.service \
-        $systemdsystemunitdir/dracut-initqueue.service \
-        $systemdsystemunitdir/dracut-mount.service \
-        $systemdsystemunitdir/dracut-pre-mount.service \
-        $systemdsystemunitdir/dracut-pre-pivot.service \
-        $systemdsystemunitdir/dracut-pre-trigger.service \
-        $systemdsystemunitdir/dracut-pre-udev.service \
-        $systemdsystemunitdir/initrd.target.wants/dracut-cmdline.service \
-        $systemdsystemunitdir/initrd.target.wants/dracut-initqueue.service \
-        $systemdsystemunitdir/initrd.target.wants/dracut-mount.service \
-        $systemdsystemunitdir/initrd.target.wants/dracut-pre-mount.service \
-        $systemdsystemunitdir/initrd.target.wants/dracut-pre-pivot.service \
-        $systemdsystemunitdir/initrd.target.wants/dracut-pre-trigger.service \
-        $systemdsystemunitdir/initrd.target.wants/dracut-pre-udev.service \
-        \
         $systemdsystemunitdir/ctrl-alt-del.target \
         $systemdsystemunitdir/syslog.socket \
         $systemdsystemunitdir/initrd-switch-root.target \
@@ -197,11 +182,26 @@ install() {
         systemd-ask-password-console.service \
         systemd-ask-password-plymouth.service \
         ; do
-        mkdir -p "${initdir}${systemdsystemconfdir}/${i}.wants"
+        mkdir -p "${initdir}${systemdsystemunitdir}/${i}.wants"
         ln_r "${systemdsystemunitdir}/systemd-vconsole-setup.service" \
-            "${systemdsystemconfdir}/${i}.wants/systemd-vconsole-setup.service"
+            "${systemdsystemunitdir}/${i}.wants/systemd-vconsole-setup.service"
+    done
+
+    mkdir -p "${initdir}/$systemdsystemunitdir/initrd.target.wants"
+    for i in \
+        dracut-cmdline.service \
+        dracut-initqueue.service \
+        dracut-mount.service \
+        dracut-pre-mount.service \
+        dracut-pre-pivot.service \
+        dracut-pre-trigger.service \
+        dracut-pre-udev.service \
+        ; do
+        inst_simple "$moddir/${i}" "$systemdsystemunitdir/${i}"
+        ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/initrd.target.wants/${i}"
     done
 
+
     # turn off RateLimit for journal
     {
         echo "[Journal]"