Bug 231610 - loader menu shown even with autoboot_delay=-1
Summary: loader menu shown even with autoboot_delay=-1
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-22 21:45 UTC by Edward Tomasz Napierala
Modified: 2018-11-22 23:27 UTC (History)
4 users (show)

See Also:


Attachments
Lift autoboot_delay handling up a level (1.16 KB, patch)
2018-10-02 13:11 UTC, Kyle Evans
no flags Details | Diff
Lift autoboot_delay processing up a level (1.30 KB, patch)
2018-10-02 15:27 UTC, Kyle Evans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Tomasz Napierala freebsd_committer 2018-09-22 21:45:58 UTC
In 12-ALPHA6 the boot menu is displayed even if autoboot_delay is set to -1 in /boot/loader.conf.   The menu is not usable, so it's not a security problem, just a cosmetic one.
Comment 1 Kyle Evans freebsd_committer 2018-09-22 22:21:29 UTC
Hi,

I'll try and make some time to look at this in the next day or so.
Comment 2 Kyle Evans freebsd_committer 2018-10-02 13:11:55 UTC
Created attachment 197710 [details]
Lift autoboot_delay handling up a level

Hi,

Apologies for the delay. How does the attached patch look for you?

Thanks,

Kyle Evans
Comment 3 Kyle Evans freebsd_committer 2018-10-02 15:27:28 UTC
Created attachment 197716 [details]
Lift autoboot_delay processing up a level

Revised patch- shouldn't affect this, but previous iteration broke the autoboot_delay="NO" case... invoking menu.autoboot with a nil delay will now do nothing, leaving the caller to come up with a reasonable default delay. This lines up with how I envision third-party usage (in, say, local.lua) to want to do things if they're invoking autoboot manually.
Comment 4 commit-hook freebsd_committer 2018-10-05 17:07:53 UTC
A commit references this bug:

Author: kevans
Date: Fri Oct  5 17:07:11 UTC 2018
New revision: 339200
URL: https://svnweb.freebsd.org/changeset/base/339200

Log:
  lualoader: Don't draw loader menu with autoboot_delay=-1

  This was mostly a cosmetic issue. autoboot_delay=-1 is documented to bypass
  the loader menu and immediately execute the boot command, but lualoader
  would draw the menu and immediately execute the boot command. No interaction
  was possible with the menu.

  The fix lifts autoboot_delay processing out of menu.autoboot, which now
  takes a delay and does nothing if no delay is specified. This lines up with
  my expectations of menu.autoboot's usage from a third party, which may
  want more control over the process than the default behavior.

  PR:		231610
  Approved by:	re (gjb)

Changes:
  head/stand/lua/menu.lua