s390/arch: install kernels with their proper version ID
authorStefan Raspl <raspl@linux.ibm.com>
Mon, 20 Jan 2020 12:10:37 +0000 (13:10 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 19 Feb 2020 16:27:24 +0000 (17:27 +0100)
In case $INSTALLKERNEL is not available, we should install the kernel
image with its version number, and save the previous one accordingly.
Also, we're adding a hint so users know that they still need to
perform one more configuration step (usually adjusting zipl config).

Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/boot/install.sh

index bed227f267ae52aab3a02ec5e8a0f01767896a10..515b27a996b36499315f8a1e468b482ba6a73079 100644 (file)
 if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
 if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 
-# Default install - same as make zlilo
+echo "Warning: '${INSTALLKERNEL}' command not available - additional " \
+     "bootloader config required" >&2
+if [ -f $4/vmlinuz-$1 ]; then mv $4/vmlinuz-$1 $4/vmlinuz-$1.old; fi
+if [ -f $4/System.map-$1 ]; then mv $4/System.map-$1 $4/System.map-$1.old; fi
 
-if [ -f $4/vmlinuz ]; then
-       mv $4/vmlinuz $4/vmlinuz.old
-fi
-
-if [ -f $4/System.map ]; then
-       mv $4/System.map $4/System.old
-fi
-
-cat $2 > $4/vmlinuz
-cp $3 $4/System.map
+cat $2 > $4/vmlinuz-$1
+cp $3 $4/System.map-$1