Am 09.06.2016 um 12:02 schrieb Andrei Borzenkov:
On Thu, Jun 9, 2016 at 1:00 PM, Jóhann B. Guðmundsson
<johan...@gmail.com> wrote:
On 06/09/2016 09:02 AM, Ross Lagerwall wrote:

On Thu, Jun 9, 2016 at 9:55 AM, Bao Nguyen <bao...@gmail.com> wrote:
With a new enough systemd, you should be able to add a snippet to extend
the initscript like this:
$ cat /etc/systemd/system/my_lsb_service.service.d/local.conf
[Unit]
Requires=systemd_1.service
After=systemd_1.service


That's just silly and introduces another level of administrator headache.


It is not silly if you have third-party software that comes with
initscript and need to fix dependencies of this script locally. You
have no control of script itself in this case.

surely - a systemd-unit in /etc/systemd/system/ takes precedence

[root@srv-rhsoft:~]$ ls /etc/init.d/vmware
-rwxr-xr-x 1 root root 14K 2016-04-24 21:34 /etc/init.d/vmware

[root@srv-rhsoft:~]$ ls /etc/systemd/system/vmware.service
-rw-r--r-- 1 root root 465 2015-09-01 17:02 /etc/systemd/system/vmware.service

guess who wins

[root@srv-rhsoft:~]$ systemctl status vmware
vmware.service - VMware Workstation Service
Loaded: loaded (/etc/systemd/system/vmware.service; enabled; vendor preset: disabled)
   Active: active (exited) since Do 2016-06-09 01:29:04 CEST; 10h ago
Process: 1135 ExecStart=/usr/bin/systemctl start vmware.target (code=exited, status=0/SUCCESS)
 Main PID: 1135 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/vmware.service

But yes, if you are able to modify initscript it is really easier to
just add proper unit defnition

you don't need to touch it - just override it with a systemd-unit which in doubt does nothing else then call the /etc/init.d/script in ExecStart and ExecStop


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to