First implementation of io.systemd.StorageProvider, exposing all block devices known to udev (disks, partitions, dm nodes, …) as volumes of type "blk". Names are picked from stable /dev/mapper and /dev/disk/by-* symlinks; content-derived identifiers (by-uuid, by-label, …) are intentionally avoided for security. Volume creation is not supported by this backend. Socket-activated via /run/systemd/io.systemd.StorageProvider/block. Also adds shared storage-util.[ch] (VolumeType / CreateMode helpers) that subsequent providers reuse.
25 lines
686 B
SYSTEMD
25 lines
686 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=Simple Block Device Backed Storage Provider
|
|
Documentation=man:systemd-storage-block@..service(8)
|
|
DefaultDependencies=no
|
|
Before=sockets.target
|
|
|
|
[Socket]
|
|
ListenStream=/run/systemd/io.systemd.StorageProvider/block
|
|
FileDescriptorName=varlink
|
|
SocketMode=0666
|
|
Accept=yes
|
|
MaxConnectionsPerSource=16
|
|
|
|
[Install]
|
|
WantedBy=sockets.target
|