[systemd-devel] [PATCH 2/2] kernel-install: add compat with 'installkernel'

Harald Hoyer harald at redhat.com
Tue Oct 1 08:45:23 PDT 2013


On 09/26/2013 12:38 AM, Tom Gundersen wrote:
> 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).
> ---
>  src/kernel-install/kernel-install | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install
> index fb2ee57..3f112c4 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 [[ `basename $0` == 'installkernel' ]]; then
> +    COMMAND='add'
> +    KERNEL_VERSION="$1"
> +    KERNEL_IMAGE="$2"
> +else
> +    COMMAND="$1"
> +    KERNEL_VERSION="$2"
> +    KERNEL_IMAGE="$3"
> +fi
>  
>  if [[ -f /etc/machine-id ]]; then
>      read MACHINE_ID < /etc/machine-id
> 

committed and modified slightly :)


More information about the systemd-devel mailing list