Skip to content

Commit fcb47cc

Browse files
author
Fengguang Wu
committed
lkp-bootstrap: run arbitrary job script
Signed-off-by: Fengguang Wu <[email protected]>
1 parent 5d8db2f commit fcb47cc

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

rootfs/addon/etc/init.d/lkp-bootstrap

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,19 @@ read_kernel_cmdline_vars
4747
# The job file is contained in the initrd -- no need to download it here.
4848

4949
[ -n "$job" ] || job=$(echo /lkp/scheduled/*/*.yaml) # in case CONFIG_PROC_FS is not set
50-
[ -e "$job" -o -e ${job%.yaml}.sh ] || {
51-
echo $job does not exist, quit from LKP
52-
exit 0 # to work with non-LKP boots
53-
}
5450

55-
if [ "$job" != "${job%.sh}" ]; then
56-
. $job
51+
if [ ${job%.yaml} != $job ]; then
52+
job_script=${job%.yaml}.sh
5753
else
58-
. ${job%.yaml}.sh
54+
job_script=$job
5955
fi
56+
57+
[ -e "$job_script" ] || {
58+
echo $job_script does not exist, quit from LKP
59+
exit 0 # to work with non-LKP boots
60+
}
61+
62+
. $job_script
6063
export_top_env
6164

6265
: ${user:=lkp}

0 commit comments

Comments
 (0)