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