]> git.ipfire.org Git - thirdparty/systemd.git/blob - units/systemd-random-seed.service.in
d57b2d12693a2e76daf139e156716d4a99b4c381
[thirdparty/systemd.git] / units / systemd-random-seed.service.in
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=Load/Save OS Random Seed
12 Documentation=man:systemd-random-seed.service(8) man:random(4)
13
14 DefaultDependencies=no
15 RequiresMountsFor={{RANDOM_SEED}}
16 Conflicts=shutdown.target
17 After=systemd-remount-fs.service
18 Before=first-boot-complete.target shutdown.target
19 Wants=first-boot-complete.target
20
21 ConditionVirtualization=!container
22 ConditionPathExists=!/etc/initrd-release
23
24 [Service]
25 Type=oneshot
26 RemainAfterExit=yes
27 ExecStart={{ROOTLIBEXECDIR}}/systemd-random-seed load
28 ExecStop={{ROOTLIBEXECDIR}}/systemd-random-seed save
29
30 # This service waits until the kernel's entropy pool is initialized, and may be
31 # used as ordering barrier for service that require an initialized entropy
32 # pool. Since initialization can take a while on entropy-starved systems, let's
33 # increase the timeout substantially here.
34 TimeoutSec=10min