fix: recognize real GRUB rescue menuentry
This commit is contained in:
parent
e832dc6ad7
commit
9c8fc5046a
2 changed files with 7 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ verify_machine() {
|
||||||
}
|
}
|
||||||
|
|
||||||
verify_rescue() {
|
verify_rescue() {
|
||||||
grep -Fq -- "--id '${rescue_slot_id}'" "${grub_cfg}" ||
|
grep -F -- 'menuentry ' "${grub_cfg}" | grep -Fq -- "'${rescue_slot_id}'" ||
|
||||||
die "independent Linux rescue slot is unavailable"
|
die "independent Linux rescue slot is unavailable"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,4 +104,10 @@ if "${adapter}" wake jd-linux-on-demand; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf '%s\n' 'set default="gnulinux-simple-9e4550a0-452b-4f28-b5a5-d5364aa450f6"' >"${fixture}/grub.cfg"
|
||||||
|
if "${adapter}" preflight jd-linux-on-demand; then
|
||||||
|
echo "a default reference without a rescue menuentry was accepted" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "GUANGHU_LINUX_SUBCONTROL_DOCKER_BACKEND_OK"
|
echo "GUANGHU_LINUX_SUBCONTROL_DOCKER_BACKEND_OK"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue