diff --git a/rootfs/addon/etc/init.d/lkp-bootstrap b/rootfs/addon/etc/init.d/lkp-bootstrap index be314c228..1e2825ed4 100755 --- a/rootfs/addon/etc/init.d/lkp-bootstrap +++ b/rootfs/addon/etc/init.d/lkp-bootstrap @@ -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}