The collection of facts is entirely unprivileged and has very little to do with PID1. PID1 is privileged and single-threaded and a point of contention, so we shouldn't put things in PID1 that don't need to be there. A separate service can be enabled/disabled/started/stopped at will, is easy to sandbox, etc. If it turns out to be necessary to collect some facts through PID1 in the future, we can always add a smaller facts endpoint to PID1 again.
23 lines
596 B
SYSTEMD
23 lines
596 B
SYSTEMD
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# 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=Report System Basic Facts Socket
|
|
DefaultDependencies=no
|
|
Before=sockets.target
|
|
|
|
[Socket]
|
|
ListenStream=/run/systemd/report/io.systemd.Basic
|
|
FileDescriptorName=varlink
|
|
SocketMode=0666
|
|
Accept=yes
|
|
RemoveOnStop=yes
|
|
|
|
[Install]
|
|
WantedBy=sockets.target
|