Skip to content

Commit

Permalink
lkp-bootstrap: run arbitrary job script
Browse files Browse the repository at this point in the history
Signed-off-by: Fengguang Wu <[email protected]>
  • Loading branch information
Fengguang Wu committed Nov 10, 2017
1 parent 5d8db2f commit fcb47cc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions rootfs/addon/etc/init.d/lkp-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,19 @@ read_kernel_cmdline_vars
# The job file is contained in the initrd -- no need to download it here.

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

if [ "$job" != "${job%.sh}" ]; then
. $job
if [ ${job%.yaml} != $job ]; then
job_script=${job%.yaml}.sh
else
. ${job%.yaml}.sh
job_script=$job
fi

[ -e "$job_script" ] || {
echo $job_script does not exist, quit from LKP
exit 0 # to work with non-LKP boots
}

. $job_script
export_top_env

: ${user:=lkp}
Expand Down

0 comments on commit fcb47cc

Please sign in to comment.