s390/boot: improve install.sh script

Use proper quoting for the variables and explicitly distinguish between
command options and positional arguments.

Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Marc Hartmayer 2022-01-31 13:22:31 +00:00 committed by Vasily Gorbik
parent c01f2a5fe4
commit d24e18ef7e
1 changed files with 4 additions and 4 deletions

View File

@ -17,8 +17,8 @@
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-$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
cat $2 > $4/vmlinuz-$1
cp $3 $4/System.map-$1
cat -- "$2" > "$4/vmlinuz-$1"
cp -- "$3" "$4/System.map-$1"