Bug#803373: systemd: fail to enable/disable services that have no LSB init script

Luca Bruno lethalman88 at gmail.com
Thu Oct 29 13:13:20 GMT 2015


On 29/10/2015 14:05, Martin Pitt wrote:
> Control: tag -1 moreinfo unreproducible
>
> Hello Luca,
>
> Luca Bruno [2015-10-29 12:29 +0100]:
>> I've put a simple service in /lib/systemd/system. Doing systemctl
>> start/stop on this service works correctly, however enable/disable
>> doesn't work: "Failed to execute operation: No such file or directory".
> Did you systemctl daemon-reload after placing the file there? What's
> the exact file name you are adding and which command do you run? Does
> this involve Alias= or templates? Does your file perhaps refer to a
> nonexisting WantedBy= or RequiredBy=?
>
> I tried to reproduce this here:
>
> # cat << EOF > /lib/systemd/system/foo.service
> [Unit]
> Description=test
> [Service]
> Type=oneshot
> ExecStart=/bin/echo hello
> [Install]
> WantedBy=multi-user.target
> EOF
> # systemctl daemon-reload
> # systemctl enable foo.service
> Created symlink from /etc/systemd/system/multi-user.target.wants/foo.service to /lib/systemd/system/foo.service.
>
> So all as expected. I'm afraid we need a more detailled reproducer.
Thanks for the quick reply.

I did exactly your steps and I get the error above. WantedBy only, no
Alias. Yes I did daemon-reload of course, start/stop works.
> Do you have a chance to try this under testing/unstable? The whole
> SysV init script handling got dramatically simplified there. Thanks,
> Martin 
I can try in some virtual machine I guess. So I fear this is only
related to jessie at the moment, if it works for you on sid.

Best regards,




More information about the Pkg-systemd-maintainers mailing list