Skip to content

Commit 9156493

Browse files
yuwatakeszybz
authored andcommitted
kernel-install: use exit instead of return (systemd#4565)
/bin/kernel-install: line 143: return: can only `return' from a function or sourced script https://bugzilla.redhat.com/show_bug.cgi?id=1391829
1 parent c4c5011 commit 9156493

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/kernel-install/kernel-install

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ case $COMMAND in
127127
"$f" add "$KERNEL_VERSION" "$BOOT_DIR_ABS" "$KERNEL_IMAGE"
128128
x=$?
129129
if [[ $x == $SKIP_REMAINING ]]; then
130-
return 0
130+
exit 0
131131
fi
132132
((ret+=$x))
133133
fi
@@ -140,7 +140,7 @@ case $COMMAND in
140140
"$f" remove "$KERNEL_VERSION" "$BOOT_DIR_ABS"
141141
x=$?
142142
if [[ $x == $SKIP_REMAINING ]]; then
143-
return 0
143+
exit 0
144144
fi
145145
((ret+=$x))
146146
fi

0 commit comments

Comments
 (0)