From: Harald Hoyer Date: Thu, 7 Mar 2013 08:49:29 +0000 (+0100) Subject: add 50-dracut.install X-Git-Tag: 026~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9dd9d81fc655c94d2d385158fadc4b435d30d11f;p=platform%2Fupstream%2Fdracut.git add 50-dracut.install --- diff --git a/50-dracut.install b/50-dracut.install new file mode 100755 index 0000000..9e99899 --- /dev/null +++ b/50-dracut.install @@ -0,0 +1,16 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +ret=0 +case "$1" in + add) + dracut "$3"/initrd "$2" + ret=$? + ;; + remove) + rm -f "$3"/initrd + ret=$? + ;; +esac +exit $ret diff --git a/Makefile b/Makefile index 7cdd35d..f601720 100644 --- a/Makefile +++ b/Makefile @@ -116,6 +116,8 @@ endif if [ -f install/dracut-install ]; then \ install -m 0755 install/dracut-install $(DESTDIR)$(pkglibdir)/dracut-install; \ fi + mkdir -p $(DESTDIR)${prefix}/lib/kernel/install.d + install -m 0755 50-dracut.install $(DESTDIR)${prefix}/lib/kernel/install.d/50-dracut.install dracut-version.sh: @echo "DRACUT_VERSION=$(VERSION)-$(GITVERSION)" > dracut-version.sh diff --git a/dracut.spec b/dracut.spec index d9733c4..707e66a 100644 --- a/dracut.spec +++ b/dracut.spec @@ -336,6 +336,9 @@ rm -rf $RPM_BUILD_ROOT %{_unitdir}/dracut-shutdown.service %{_unitdir}/shutdown.target.wants/dracut-shutdown.service %endif +%if 0%{?fedora} || 0%{?rhel} > 6 +%{_prefix}/lib/kernel/install.d/50-dracut.install +%endif %files network %defattr(-,root,root,0755)