| 1 |
# SPDX-License-Identifier: LGPL-2.1-or-later |
| 2 |
# |
| 3 |
# This file is part of systemd. |
| 4 |
# |
| 5 |
# systemd is free software; you can redistribute it and/or modify it |
| 6 |
# under the terms of the GNU Lesser General Public License as published by |
| 7 |
# the Free Software Foundation; either version 2.1 of the License, or |
| 8 |
# (at your option) any later version. |
| 9 |
|
| 10 |
[Unit] |
| 11 |
Description=Initial Setup |
| 12 |
Documentation=man:systemd-firstboot(1) |
| 13 |
|
| 14 |
ConditionPathIsReadWrite=/etc |
| 15 |
ConditionFirstBoot=yes |
| 16 |
|
| 17 |
DefaultDependencies=no |
| 18 |
# This service may need to write to the file system: |
| 19 |
After=systemd-remount-fs.service |
| 20 |
# Both systemd-sysusers and systemd-tmpfiles may create the root account |
| 21 |
# (via factory files or credentials), obviating the need for us to do that: |
| 22 |
After=systemd-sysusers.service systemd-tmpfiles-setup.service |
| 23 |
# Let vconsole-setup do its setup before starting user interaction: |
| 24 |
After=systemd-vconsole-setup.service |
| 25 |
After=systemd-mute-console.socket |
| 26 |
|
| 27 |
Wants=first-boot-complete.target |
| 28 |
Before=first-boot-complete.target sysinit.target |
| 29 |
Conflicts=shutdown.target |
| 30 |
Before=shutdown.target |
| 31 |
|
| 32 |
[Service] |
| 33 |
Type=oneshot |
| 34 |
RemainAfterExit=yes |
| 35 |
ExecStart=systemd-firstboot --prompt-locale --prompt-keymap-auto --prompt-timezone --prompt-root-password --mute-console=yes |
| 36 |
StandardOutput=tty |
| 37 |
StandardInput=tty |
| 38 |
StandardError=tty |
| 39 |
TTYReset=yes |
| 40 |
|
| 41 |
# Optionally, pick up basic fields from credentials passed to the service |
| 42 |
# manager. This is useful for importing this data from nspawn's |
| 43 |
# --set-credential= switch. |
| 44 |
ImportCredential=passwd.hashed-password.root |
| 45 |
ImportCredential=passwd.plaintext-password.root |
| 46 |
ImportCredential=passwd.shell.root |
| 47 |
ImportCredential=firstboot.* |