summaryrefslogtreecommitdiff
path: root/arch/s390/boot
diff options
context:
space:
mode:
authorMarc Hartmayer <mhartmay@linux.ibm.com>2022-01-31 13:22:31 +0000
committerVasily Gorbik <gor@linux.ibm.com>2023-04-13 17:36:28 +0200
commitd24e18ef7e13c9cd580ebee771f7ccb9d3f6ee42 (patch)
treef0d9548ee27ba3563e7f31548ff8b1235ada95e6 /arch/s390/boot
parentc01f2a5fe4e3df4ab846fcba5435ca9fdee4f583 (diff)
downloadlinux-d24e18ef7e13c9cd580ebee771f7ccb9d3f6ee42.tar.gz
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>
Diffstat (limited to 'arch/s390/boot')
-rwxr-xr-xarch/s390/boot/install.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/s390/boot/install.sh b/arch/s390/boot/install.sh
index 616ba1660f08..a13dd2f2aa1c 100755
--- a/arch/s390/boot/install.sh
+++ b/arch/s390/boot/install.sh
@@ -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"