From b3fdcc4f9a1331950f462e6bf43daa718a59dfe5 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 13 Mar 2013 07:57:53 +0100
Subject: [PATCH] kernel-install: add fedora specific callouts to
new-kernel-pkg
---
src/kernel-install/kernel-install | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
index fb2ee57..1b73def 100644
--- a/src/kernel-install/kernel-install
+++ b/src/kernel-install/kernel-install
@@ -19,6 +19,25 @@
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+if [[ -x /sbin/new-kernel-pkg ]]; then
+ case "$1" in
+ add)
+ /sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod --install "$2" || exit $?
+ /sbin/new-kernel-pkg --package kernel --rpmposttrans "$2" || exit $?
+ ;;
+ remove)
+ /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove "$2" || exit $?
+ ;;
+ *)
+ ;;
+ esac
+
+ # exit, if we can't find a boot loader spec conforming setup
+ if ! [[ -d /boot/loader/entries || -L /boot/loader/entries ]]; then
+ exit 0
+ fi
+fi
+
usage()
{
echo "Usage:" >&2
--
1.8.2.1