Drop-in Files for systemd
As an alternative to adding applications to the barrier file, you can use drop-in files to configure the secfs-fs-barrier.service
file for dependency management using systemd
. This eliminates the need to modify the service file for configuring dependencies.
All drop-in directory files with the suffix .conf
are merged in alphanumeric order and parsed after the main unit file has been parsed. Each drop-in file must contain appropriate section headers. Systemd
reads the .conf
files in the following order.
-
The instance
.d/
subdirectory -
The template
.d/
subdirectory
The drop-in .d/
directories for system services can be placed in the following directories:
-
/etc/systemd/system
-
/usr/lib/systemd/system
(Ubuntu only) -
/run/systemd/system
Drop-in files in /etc/
take precedence over those in the /run/
directory which, in turn, take precedence over those in the /usr/lib/
directory. Drop-in files in any of those directories take precedence over unit files wherever they are located. Multiple drop-in files with different names are applied in lexicographic order, regardless of which directories they reside in.
Following is an example of a drop-in file (dependencies.conf
) for the secfs-fs-barrier.service
:
cat /usr/lib/systemd/system/sec-fs-barrier.service.d/dependencies.conf
[Unit]
Before=mfetpd.service mfeespd.service
The above example displays a drop-in file which adds two McAfee related services in the Before= clause of the secfs-fs-barrier.service
file without modifying the service file itself. Eventually, systemd
detects the drop-in files and links them to the secfs-fs-barrier.service
file.