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
F102652484: D35357.diff
Fri, Nov 15, 9:17 AM
Unknown Object (File)
Fri, Nov 8, 8:29 PM
Unknown Object (File)
Fri, Nov 8, 8:11 PM
Unknown Object (File)
Thu, Nov 7, 9:25 PM
Unknown Object (File)
Sep 27 2024, 12:33 PM
Unknown Object (File)
Sep 24 2024, 5:24 PM
Unknown Object (File)
Sep 8 2024, 9:34 AM
Unknown Object (File)
Sep 8 2024, 1:34 AM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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