From a5b48ce79834b5d377e0a82a0536e49428568f1f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 7 Mar 2013 09:43:42 +0100 Subject: [PATCH] add systemd-bootchart module --- dracut.spec | 9 +++++++++ modules.d/00systemd-bootchart/module-setup.sh | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 modules.d/00systemd-bootchart/module-setup.sh diff --git a/dracut.spec b/dracut.spec index a2c1a4a..d9733c4 100644 --- a/dracut.spec +++ b/dracut.spec @@ -196,6 +196,11 @@ rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/02fips-aesni %endif +%if %{defined _unitdir} +# for systemd, better use systemd-bootchart +rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart +%endif + # we do not support dash in the initramfs rm -fr $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash @@ -273,7 +278,11 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man7/dracut.kernel.7* %{_mandir}/man7/dracut.cmdline.7* %{_mandir}/man5/dracut.conf.5* +%if %{defined _unitdir} +%{dracutlibdir}/modules.d/00systemd-bootchart +%else %{dracutlibdir}/modules.d/00bootchart +%endif %{dracutlibdir}/modules.d/04watchdog %{dracutlibdir}/modules.d/05busybox %{dracutlibdir}/modules.d/10i18n diff --git a/modules.d/00systemd-bootchart/module-setup.sh b/modules.d/00systemd-bootchart/module-setup.sh new file mode 100755 index 0000000..74935a9 --- /dev/null +++ b/modules.d/00systemd-bootchart/module-setup.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +check() { + [[ "$mount_needs" ]] && return 1 + [ -x $systemdutildir/systemd-bootchart ] || return 1 + return 255 +} + +depends() { + return 0 +} + +install() { + inst_symlink /init /sbin/init + dracut_install $systemdutildir/systemd-bootchart +} -- 2.7.4