aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-07 15:05:37 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-07 15:25:55 +0200
commit418b9be50018303cde79b423d4701b7fd86ddbdc (patch)
tree9686495c5b3f975cbe8d2e2cfb5abb7e64b21ed3 /units/systemd-firstboot.service.in
parentarchitecture: add string table entries for mips-le archs which were missing (diff)
downloadsystemd-418b9be50018303cde79b423d4701b7fd86ddbdc.tar.gz
systemd-418b9be50018303cde79b423d4701b7fd86ddbdc.tar.bz2
systemd-418b9be50018303cde79b423d4701b7fd86ddbdc.zip
firstboot: add new component to query basic system settings on first boot, or when creating OS images offline
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.
Diffstat (limited to 'units/systemd-firstboot.service.in')
-rw-r--r--units/systemd-firstboot.service.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/units/systemd-firstboot.service.in b/units/systemd-firstboot.service.in
new file mode 100644
index 000000000..e7ae74556
--- /dev/null
+++ b/units/systemd-firstboot.service.in
@@ -0,0 +1,23 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=First Boot Wizard
+Documentation=man:systemd-firstboot(8)
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service systemd-sysusers.service
+Before=sysinit.target shutdown.target
+ConditionPathIsReadWrite=/etc
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@rootbindir@/systemd-firstboot --prompt-locale --prompt-timezone --prompt-root-password
+StandardOutput=tty
+StandardInput=tty
+StandardError=tty