Changes

From SME Server
Jump to navigationJump to search
m
Line 416: Line 416:     
===== unitname.d/file.conf versus overwrite uniname.service =====
 
===== unitname.d/file.conf versus overwrite uniname.service =====
From reading and inspection of a few systems, a dot d folder could be created both in etc and lib .
+
:From reading and inspection of a few systems, a dot d folder could be created both in etc and lib.
   −
There are two methods of overriding vendor settings in unit files:  
+
:There are two methods of overriding vendor settings in unit files:  
   −
First, copying the unit file from    <code>/usr/lib/systemd/system</code> to  <code>/etc/systemd/system</code> and modifying the chosen settings.  
+
::First, copying the unit file from    <code>/usr/lib/systemd/system</code> to  <code>/etc/systemd/system</code> and modifying the chosen settings.  
   −
Second, one can create a directory named <code>''<code>unit</code>''.d/</code> within <code>/etc/systemd/system</code> and place a drop-in file <code>''<code>name</code>''.conf</code> there that only changes the specific settings one is interested in. Note that multiple such drop-in files are read if present, processed in lexicographic order of their filename.
+
::Second, one can create a directory named <code>''<code>unit</code>''.d/</code> within <code>/etc/systemd/system</code> and place a drop-in file <code>''<code>name</code>''.conf</code> there that only changes the specific settings one is interested in. Note that multiple such drop-in files are read if present, processed in lexicographic order of their filename.
   −
The advantage of the first method is that one easily overrides the complete unit, the vendor unit is not parsed at all anymore. It has the disadvantage that improvements to the unit file by the vendor are not automatically incorporated on updates.
+
:The advantage of the first method is that one easily overrides the complete unit, the vendor unit is not parsed at all anymore. It has the disadvantage that improvements to the unit file by the vendor are not automatically incorporated on updates.
   −
The advantage of the second method is that one only overrides the settings one specifically wants, where updates to the unit by the vendor automatically apply. This has the disadvantage that some future updates by the vendor might be incompatible with the local changes.<ref>https://www.freedesktop.org/software/systemd/man/systemd.unit.html</ref>
+
:The advantage of the second method is that one only overrides the settings one specifically wants, where updates to the unit by the vendor automatically apply. This has the disadvantage that some future updates by the vendor might be incompatible with the local changes.<ref>https://www.freedesktop.org/software/systemd/man/systemd.unit.html</ref>
    
==== uninstalling /masking unwanted/conflicting services: example of firewalld. ====
 
==== uninstalling /masking unwanted/conflicting services: example of firewalld. ====

Navigation menu