File: nut-udev-settle.service

package info (click to toggle)
nut 2.8.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,356 kB
  • sloc: ansic: 123,904; sh: 14,718; cpp: 12,558; makefile: 5,212; python: 1,114; perl: 855; xml: 47
file content (47 lines) | stat: -rw-r--r-- 1,868 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Network UPS Tools (NUT) systemd integration
# Copyright (C) 2025- by NUT contributors
# Distributed under the terms of GPLv2+
# See https://networkupstools.org/
# and https://github.com/networkupstools/nut/
#
# This file was adapted from systemd-udev-settle.service provided as part of
# systemd. The original service is no longer recommended for general use in
# recent distributions (does not guarantee reliable detection, and delays
# system readiness for log-in), but waiting for udev to settle its currently
# running operations has proven useful in some cases for NUT practice.
#
# Original file's terms:
#
#  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.

# This service can dynamically be pulled-in by legacy services which
# cannot reliably cope with dynamic device configurations, and wrongfully
# expect a populated /dev during bootup.

[Unit]
Description=Wait for udev To Complete Device Initialization before USB-capable NUT drivers start
Documentation=man:systemd-udev-settle.service(8)
DefaultDependencies=no
Wants=systemd-udevd.service
After=systemd-udev-trigger.service
ConditionPathIsReadWrite=/sys

# Used when/if requested by specific nut-driver@.service instances.
# No auto-start or dependency otherwise.

[Service]
Type=oneshot
TimeoutSec=180
# We want to re-trigger this service during NUT driver restarts
# (maybe several at once) as we reconnect after e.g. USB bus reset,
# for changes in USB/Serial/... devices that may need permissions
# for NUT to be applied. So we do not want it to remain "active".
#RemainAfterExit=yes
ExecStart=udevadm settle