firstboot: add new component to query basic system settings on first boot, or when creating OS images offline

System Internals / systemd - Lennart Poettering [poettering.net] - 7 July 2014 08:25 UTC

A new tool "systemd-firstboot" can be used either interactively on boot, where it will query basic locale, timezone, hostname, root password information and set it. Or it can be used non-interactively from the command line when prepareing disk images for booting. When used non-inertactively the tool can either copy settings from the host, or take settings on the command line.

$ systemd-firstboot --root=/path/to/my/new/root --copy-locale --copy-root-password --hostname=waldi

The tool will be automatically invoked (interactively) now on first boot if /etc is found unpopulated.

This also creates the infrastructure for generators to be notified via an environment variable whether they are running on the first boot, or not.

418b9be firstboot: add new component to query basic system settings on first boot, or when creating OS images offline
.gitignore | 2 +
Makefile.am | 34 ++
configure.ac | 9 +
src/core/execute.c | 2 +-
src/core/main.c | 1 +
src/core/manager.c | 12 +-
src/core/manager.h | 1 +
src/core/shutdown.c | 2 +-
src/firstboot/Makefile | 1 +
src/firstboot/firstboot-generator.c | 71 +++
src/firstboot/firstboot.c | 930 +++++++++++++++++++++++++++++++++++
src/shared/util.c | 58 ++-
src/shared/util.h | 2 +-
src/sleep/sleep.c | 4 +-
units/.gitignore | 1 +
units/systemd-firstboot.service.in | 23 +
16 files changed, 1144 insertions(+), 9 deletions(-)

Upstream: github.com


  • Share