2020-11-09 12:23:58 +08:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2017-11-19 00:35:03 +08:00
|
|
|
#
|
2010-08-15 01:17:37 +08:00
|
|
|
# This file is part of systemd.
|
|
|
|
#
|
|
|
|
# systemd is free software; you can redistribute it and/or modify it
|
2012-04-12 06:20:58 +08:00
|
|
|
# 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
|
2010-08-15 01:17:37 +08:00
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
[Unit]
|
2022-12-21 00:16:47 +08:00
|
|
|
Description=Load/Save OS Random Seed
|
2013-09-23 02:38:24 +08:00
|
|
|
Documentation=man:systemd-random-seed.service(8) man:random(4)
|
2022-12-21 00:16:47 +08:00
|
|
|
|
2022-09-15 21:54:18 +08:00
|
|
|
ConditionVirtualization=!container
|
|
|
|
ConditionPathExists=!/etc/initrd-release
|
|
|
|
|
2010-08-15 01:17:37 +08:00
|
|
|
DefaultDependencies=no
|
2014-08-27 03:17:22 +08:00
|
|
|
After=systemd-remount-fs.service
|
2022-09-15 21:54:18 +08:00
|
|
|
Before=first-boot-complete.target
|
|
|
|
RequiresMountsFor={{RANDOM_SEED}}
|
2020-09-07 03:43:57 +08:00
|
|
|
Wants=first-boot-complete.target
|
2022-09-15 21:54:18 +08:00
|
|
|
Conflicts=shutdown.target
|
|
|
|
Before=shutdown.target
|
2010-08-15 01:17:37 +08:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
2013-05-16 04:38:51 +08:00
|
|
|
RemainAfterExit=yes
|
2023-06-12 09:15:19 +08:00
|
|
|
ExecStart={{LIBEXECDIR}}/systemd-random-seed load
|
|
|
|
ExecStop={{LIBEXECDIR}}/systemd-random-seed save
|
2019-07-22 19:51:30 +08:00
|
|
|
|
|
|
|
# This service waits until the kernel's entropy pool is initialized, and may be
|
|
|
|
# used as ordering barrier for service that require an initialized entropy
|
|
|
|
# pool. Since initialization can take a while on entropy-starved systems, let's
|
2020-05-22 15:39:36 +08:00
|
|
|
# increase the timeout substantially here.
|
2019-07-22 19:51:30 +08:00
|
|
|
TimeoutSec=10min
|