summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-09-26 00:38:34 +0200
committerHarald Hoyer <harald@redhat.com>2013-10-01 17:40:30 +0200
commitea52e2aee8dd7b3f51e9a00e76a54ef12dc0e898 (patch)
treec2127f28bea5ebb2aec46e77e10c6553895c4db4 /src
parent4cc1fe69131bb5c79553b017f3c5bc42f7c0a599 (diff)
kernel-install: add compat with 'installkernel'
If 'kernel-install' is called as 'installkernel' it will be compatible with the syntax used by the kernel's build system. This means it can be called by doing 'make install' in a kernel build directory, if the correct symlink has been installed (which we don't do by default yet). [Edit harald@redhat.com: removed basename and use shift]
Diffstat (limited to 'src')
-rw-r--r--src/kernel-install/kernel-install12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
index fb2ee57b5b..9d3e75db08 100644
--- a/src/kernel-install/kernel-install
+++ b/src/kernel-install/kernel-install
@@ -54,9 +54,15 @@ dropindirs_sort()
export LC_COLLATE=C
-COMMAND="$1"
-KERNEL_VERSION="$2"
-KERNEL_IMAGE="$3"
+if [[ "${0##*/}" == 'installkernel' ]]; then
+ COMMAND='add'
+else
+ COMMAND="$1"
+ shift
+fi
+
+KERNEL_VERSION="$1"
+KERNEL_IMAGE="$2"
if [[ -f /etc/machine-id ]]; then
read MACHINE_ID < /etc/machine-id