add 50-dracut.install

master
Harald Hoyer 2013-03-07 09:49:29 +01:00
parent a5b48ce798
commit 9dd9d81fc6
3 changed files with 21 additions and 0 deletions

16
50-dracut.install Executable file
View File

@ -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

View File

@ -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

View File

@ -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)