2013-08-22 07:38:25 +00:00
|
|
|
From dd33348393551411885397ff7d88a3a908eeb018 Mon Sep 17 00:00:00 2001
|
2013-03-13 07:31:41 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
---
|
2013-08-22 07:38:25 +00:00
|
|
|
src/kernel-install/kernel-install | 21 +++++++++++++++++++++
|
|
|
|
1 file changed, 21 insertions(+)
|
2013-03-13 07:31:41 +00:00
|
|
|
|
|
|
|
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
|
2013-08-22 07:38:25 +00:00
|
|
|
index fb2ee57..31e988a 100644
|
2013-03-13 07:31:41 +00:00
|
|
|
--- a/src/kernel-install/kernel-install
|
|
|
|
+++ b/src/kernel-install/kernel-install
|
2013-08-22 07:38:25 +00:00
|
|
|
@@ -19,6 +19,27 @@
|
2013-05-07 08:38:15 +00:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
2013-03-13 07:31:41 +00:00
|
|
|
|
|
|
|
+if [[ -x /sbin/new-kernel-pkg ]]; then
|
2013-08-22 07:38:25 +00:00
|
|
|
+ [[ "$2" == *\+* ]] && flavor=-"${2##*+}"
|
2013-05-07 08:38:15 +00:00
|
|
|
+ case "$1" in
|
2013-03-13 07:31:41 +00:00
|
|
|
+ add)
|
2013-08-22 07:38:25 +00:00
|
|
|
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$2" || exit $?
|
|
|
|
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$2" || exit $?
|
|
|
|
+ /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$2" || exit $?
|
2013-03-13 07:31:41 +00:00
|
|
|
+ ;;
|
|
|
|
+ remove)
|
2013-08-22 07:38:25 +00:00
|
|
|
+ /sbin/new-kernel-pkg --package "kernel${flavor+-$flavor}" --rminitrd --rmmoddep --remove "$2" || exit $?
|
2013-03-13 07:31:41 +00:00
|
|
|
+ ;;
|
|
|
|
+ *)
|
|
|
|
+ ;;
|
|
|
|
+ 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
|
|
|
|
+
|
2013-05-07 08:38:15 +00:00
|
|
|
usage()
|
|
|
|
{
|
|
|
|
echo "Usage:" >&2
|
2013-03-13 07:31:41 +00:00
|
|
|
--
|
2013-08-22 07:38:25 +00:00
|
|
|
1.8.3.1
|
2013-03-13 07:31:41 +00:00
|
|
|
|