[systemd-devel] "No such file or directory" when enabling a service
Dave Reisner
d at falconindy.com
Tue Jul 2 07:53:32 PDT 2013
On Thu, Jun 27, 2013 at 08:14:03PM +0000, Lars Kellogg-Stedman wrote:
> I'm running systemd 204 under Fedora 19 (beta). I have
> /etc/systemd/system/postfix-update-hook.service installed as a symlink
> to /etc/postfix/support/postfix-update-hook.service.
>
> I can start it:
>
> # systemctl start postfix-update-hook
>
> And check the status:
>
> # systemctl status postfix-update-hook
> postfix-update-hook.service
> Loaded: loaded (/etc/postfix/support/postfix-update-hook.service; linked)
> Active: active (running) since Thu 2013-06-27 19:59:28 UTC; 25s ago
> Main PID: 19276 (postfix-update-)
> CGroup: name=systemd:/system/postfix-update-hook.service
> └─19276 /bin/sh /etc/postfix/support/postfix-update-hook
>
> But I can't enable it:
>
> # systemctl enable postfix-update-hook
> Failed to issue method call: No such file or directory
>
> If I replace the symlink in /etc/systemd/system with an actual file,
> then it works just fine:
>
> # cd /etc/systemd/system
> # mv postfix-update-hook.service postfix-update-hook.service.symlink
> # cp postfix-update-hook.service.symlink postfix-update-hook.service
> # systemctl enable postfix-update-hook
> ln -s '/etc/systemd/system/postfix-update-hook.service' '/etc/systemd/system/multi-user.target.wants/postfix-update-hook.service'
>
> Is this expected behavior?
I suspect it is. 'systemctl link' does what you want if you're
interested in including unit files from outside the default unit search
path.
> Thanks,
>
> --
> Lars Kellogg-Stedman <lars at oddbit.com>
>
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
More information about the systemd-devel
mailing list