From a259e71858ba80af89b192a34275fb0048f30ef1 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Wed, 8 Aug 2018 23:13:59 -0400 Subject: Add systemd units, DESTDIR support --- random-seed.service | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 random-seed.service (limited to 'random-seed.service') diff --git a/random-seed.service b/random-seed.service new file mode 100644 index 0000000..04b2ef5 --- /dev/null +++ b/random-seed.service @@ -0,0 +1,28 @@ +[Unit] +Description=Random seed load/save +Documentation=man:random-seed(8) man:random(4) +DefaultDependencies=no +RequiresMountsFor=/var/lib +Conflicts=shutdown.target +After=systemd-remount-fs.service +Before=sysinit.target shutdown.target +ConditionVirtualization=!container + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/local/sbin/random-seed load +ExecStop=/usr/local/sbin/random-seed save +CapabilityBoundingSet=CAP_SYS_ADMIN +NoNewPrivileges=yes +PrivateDevices=yes +PrivateNetwork=yes +ProtectKernelTunables=yes +ProtectKernelModules=yes +LockPersonality=yes +TemporaryFileSystem=/:ro +BindPaths=/var/lib +TimeoutSec=30s + +[Install] +WantedBy=sysinit.target -- cgit v1.2.3-70-g09d2