Files
ModemManager/data/ModemManager.service.in
Simon Deziel 8ce4555a79 systemd: don't run ModemManager in containers
This assumes the needed modem hardware is typically not available
inside containers. If however, the local admin configures the container
to get access to the hardware in question, ModemManager can be
instructed to run in that specific container by doing:

`sudo systemctl edit ModemManager.service`

Then entering the following text in the editor:

  [Unit]
  # Remove condition of "not container"
  ConditionVirtualization=

Upon saving/exiting, ModemManager can then be started with:

`sudo systemctl start ModemManager.service`

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2022-03-14 10:30:45 -04:00

24 lines
525 B
SYSTEMD

[Unit]
Description=Modem Manager
After=@MM_POLKIT_SERVICE@
Requires=@MM_POLKIT_SERVICE@
ConditionVirtualization=!container
[Service]
Type=dbus
BusName=org.freedesktop.ModemManager1
ExecStart=@sbindir@/ModemManager
StandardError=null
Restart=on-abort
CapabilityBoundingSet=CAP_SYS_ADMIN CAP_NET_ADMIN
ProtectSystem=true
ProtectHome=true
PrivateTmp=true
RestrictAddressFamilies=AF_NETLINK AF_UNIX AF_QIPCRTR
NoNewPrivileges=true
User=root
[Install]
WantedBy=multi-user.target
Alias=dbus-org.freedesktop.ModemManager1.service