我正在制作Debian Jessie的图片。引导时,系统没有/etc/machine-id
文件。这会导致无法启动的日记记录出现一些问题。
我发现在systemd仓库中:
# 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(1)
DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-remount-fs.service
Before=systemd-sysusers.service sysinit.target shutdown.target
ConditionPathIsReadWrite=/etc
ConditionFirstBoot=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=@rootbindir@/systemd-firstboot --prompt-locale --prompt-timezone --prompt-root-password
StandardOutput=tty
StandardInput=tty
StandardError=tty
应该放置在什么地方才能运行?
在系统215中,ConditionFirstBoot不可用。怎么处理呢?
: > /etc/machine-id
)。也许这不再是真的,但从那以后我就学会了以极大的敬意和敬畏态度对待这个文件。