Page MenuHomeFreeBSD

enable firstboot configuration for arm images
Needs ReviewPublic

Authored by jmg on Oct 8 2020, 12:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 11:13 PM
Unknown Object (File)
Sun, May 5, 7:34 PM
Unknown Object (File)
Fri, May 3, 9:26 AM
Unknown Object (File)
Mon, Apr 29, 9:36 PM
Unknown Object (File)
Sat, Apr 27, 4:38 AM
Unknown Object (File)
Apr 9 2024, 3:22 PM
Unknown Object (File)
Apr 7 2024, 12:47 AM
Unknown Object (File)
Mar 31 2024, 5:35 AM

Details

Reviewers
imp
manu
ian
Summary

This revision has three changes.

  1. libexec/configinit -- this is an import of cperciva's ec2-scripts configinit w/ a minor change to use find -s -exec instead of | sort.
  1. libexec/rc/rc.d/fs_configinit -- firstboot script that will process a given file through (1). The default has the file at /boot/msdos/config.init, allowing users to drop a file there, which can do things like preload rc.conf for static IPs, install packages on first boot and more.

    The advantage of this is it allows people with Windows or MacOSX or Linux to more easily configure a FreeBSD for first boot. Allowing things like auto install of X or other setups via a single file drop.
  1. release/arm64/PINE64-LTS.conf -- a sample of how to enable (2) on an image.
Test Plan

I was going to attempt to do a complete release build, but that is just
not doable easily.

So I have made sure that make install or distribute works in a VM, and
verified that when the proper rc.conf variable is set, that the actions
are taken.

I have also manually installed these files into a proper PINE64-LTS image
and verified that it works.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34066
Build 31247: arc lint + arc unit

Event Timeline

jmg requested review of this revision.Oct 8 2020, 12:06 AM
release/release.sh
78 ↗(On Diff #78001)

shouldn't these be := to assign defaults?

I am planning on committing 1 and 2 individually.

the parts of release.sh can be ignored. That was some work to make things testable, but I've abandoned that work for now, since it's too cumbersome.

If I knew arc better (and the docs for arc were better), I would have excluded that change.

I think enabling fs_configinit for all arm images is safe, as if the file does not exist, nothing bad happens.

release/release.sh
78 ↗(On Diff #78001)

You can ignore these. I don't plan on committing them. As for the = vs := I just copied what worked from rc.d scripts. I don't even know how the bare = works, as it's not documented in sh(1), but it does.

  • minor spelling and grammar fixups. (was originally included)
  • revert this change... (release.sh)
  • remove whitespace at end of the copyright lines..