Skip to content

Commit af7925d

Browse files
xtexxmasahir0y
authored andcommitted
kbuild: Abort make on install failures
Setting '-e' flag tells shells to exit with error exit code immediately after any of commands fails, and causes make(1) to regard recipes as failed. Before this, make will still continue to succeed even after the installation failed, for example, for insufficient permission or directory does not exist. Signed-off-by: Zhang Bingwu <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 3c2f84c commit af7925d

File tree

9 files changed

+18
-0
lines changed

9 files changed

+18
-0
lines changed

arch/arm/boot/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
# $3 - kernel map file
1818
# $4 - default install path (blank if root directory)
1919

20+
set -e
21+
2022
if [ "$(basename $2)" = "zImage" ]; then
2123
# Compressed install
2224
echo "Installing compressed kernel"

arch/arm64/boot/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
# $3 - kernel map file
1818
# $4 - default install path (blank if root directory)
1919

20+
set -e
21+
2022
if [ "$(basename $2)" = "Image.gz" ] || [ "$(basename $2)" = "vmlinuz.efi" ]
2123
then
2224
# Compressed install

arch/m68k/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
# $3 - kernel map file
1717
# $4 - default install path (blank if root directory)
1818

19+
set -e
20+
1921
if [ -f $4/vmlinuz ]; then
2022
mv $4/vmlinuz $4/vmlinuz.old
2123
fi

arch/nios2/boot/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
# $3 - kernel map file
1717
# $4 - default install path (blank if root directory)
1818

19+
set -e
20+
1921
if [ -f $4/vmlinuz ]; then
2022
mv $4/vmlinuz $4/vmlinuz.old
2123
fi

arch/parisc/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
# $3 - kernel map file
1717
# $4 - default install path (blank if root directory)
1818

19+
set -e
20+
1921
if [ "$(basename $2)" = "vmlinuz" ]; then
2022
# Compressed install
2123
echo "Installing compressed kernel"

arch/riscv/boot/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
# $3 - kernel map file
1818
# $4 - default install path (blank if root directory)
1919

20+
set -e
21+
2022
case "${2##*/}" in
2123
# Compressed install
2224
Image.*|vmlinuz.efi)

arch/s390/boot/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# $3 - kernel map file
1616
# $4 - default install path (blank if root directory)
1717

18+
set -e
19+
1820
echo "Warning: '${INSTALLKERNEL}' command not available - additional " \
1921
"bootloader config required" >&2
2022
if [ -f "$4/vmlinuz-$1" ]; then mv -- "$4/vmlinuz-$1" "$4/vmlinuz-$1.old"; fi

arch/sparc/boot/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
# $3 - kernel map file
1717
# $4 - default install path (blank if root directory)
1818

19+
set -e
20+
1921
if [ -f $4/vmlinuz ]; then
2022
mv $4/vmlinuz $4/vmlinuz.old
2123
fi

arch/x86/boot/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
# $3 - kernel map file
1717
# $4 - default install path (blank if root directory)
1818

19+
set -e
20+
1921
if [ -f $4/vmlinuz ]; then
2022
mv $4/vmlinuz $4/vmlinuz.old
2123
fi

0 commit comments

Comments
 (0)