Page MenuHomeFreeBSD

bsdinstall: add variables to allow skipping over some phases of the install
ClosedPublic

Authored by brd on May 30 2022, 5:46 PM.
Tags
None
Referenced Files
F81513504: D35357.diff
Wed, Apr 17, 9:57 AM
Unknown Object (File)
Mon, Apr 8, 7:22 PM
Unknown Object (File)
Jan 17 2024, 10:02 PM
Unknown Object (File)
Dec 26 2023, 11:49 PM
Unknown Object (File)
Dec 20 2023, 2:47 AM
Unknown Object (File)
Dec 12 2023, 10:19 AM
Unknown Object (File)
Nov 10 2023, 2:44 PM
Unknown Object (File)
Nov 3 2023, 4:53 PM
Subscribers

Details

Summary

Some phases of the installer are not always needed so allow setting the
following varibles to skip their respective phases:

BSDINSTALL_KEYMAP_SKIP
BSDINSTALL_TIME_SKIP
BSDINSTALL_SERVICES_SKIP
BSDINSTALL_HARDENING_SKIP
BSDINSTALL_USERS_SKIP
BSDINSTALL_MANUAL_SKIP

If this seems reasonable I have ideas for a few more

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45775
Build 42663: arc lint + arc unit

Event Timeline

brd requested review of this revision.May 30 2022, 5:46 PM
dteske requested changes to this revision.May 30 2022, 6:10 PM

Can we discuss perhaps using K&R style naming?

That is to say, BSDINSTALL_SKIP_* instead of BSDINSTALL_*_SKIP -- it would go a long way to being able to more-easily grep-out the skippable options and also open the prefix to being used in other parts of bsdinstall that are unrelated (read: other scripts/functions)

This revision now requires changes to proceed.May 30 2022, 6:10 PM

Can we discuss perhaps using K&R style naming?

That is to say, BSDINSTALL_SKIP_* instead of BSDINSTALL_*_SKIP -- it would go a long way to being able to more-easily grep-out the skippable options and also open the prefix to being used in other parts of bsdinstall that are unrelated (read: other scripts/functions)

I was thinking in a follow up commit about adding more variables, BSDINSTALL_TIME_NAME and BSDINSTALL_TIME_DESC to populate the menu in finalconfig(). Doing it that way seemed a bit nicer to me, but I don't feel strongly about it. So instead we could use BSDINSTALL_SKIP_*, BSDINSTALL_NAME_* and BSDINSTALL_DESC_*.

In D35357#801773, @brd wrote:

Can we discuss perhaps using K&R style naming?

That is to say, BSDINSTALL_SKIP_* instead of BSDINSTALL_*_SKIP -- it would go a long way to being able to more-easily grep-out the skippable options and also open the prefix to being used in other parts of bsdinstall that are unrelated (read: other scripts/functions)

I was thinking in a follow up commit about adding more variables, BSDINSTALL_TIME_NAME and BSDINSTALL_TIME_DESC to populate the menu in finalconfig(). Doing it that way seemed a bit nicer to me, but I don't feel strongly about it. So instead we could use BSDINSTALL_SKIP_*, BSDINSTALL_NAME_* and BSDINSTALL_DESC_*.

I would say that if BSDINSTALL_NAME_TIME is used outside of a "time" module then this would be proper, but if there is some "time" module (e.g., "bsdinstall time") then I would prefer that all module-specific variables be named "BSDINSTALL_{MODULE}_*" and reserve "BSDINSTALL_*" to properties that have scope outside of a single module or group of modules.

Swap the name of the variables

Great work. I gave it a thorough check, inside and out. Green-lit to go.

This revision is now accepted and ready to land.Aug 16 2022, 6:50 PM