From 373efa4427cda252a920755e048d4d63b07a25cd Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 13 Jun 2013 10:52:46 +0200 Subject: [PATCH] systemd: make unit files symlinks --- Makefile | 4 ++-- modules.d/98systemd/module-setup.sh | 34 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 90a4011..d1201d6 100644 --- 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 \ diff --git a/modules.d/98systemd/module-setup.sh b/modules.d/98systemd/module-setup.sh index 9183626..386dd4f 100755 --- a/modules.d/98systemd/module-setup.sh +++ b/modules.d/98systemd/module-setup.sh @@ -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]" -- 2.7.4