[systemd-devel] Can't enable or start a new service

Lennart Poettering lennart at poettering.net
Mon Jun 20 12:29:22 PDT 2011


On Mon, 20.06.11 14:16, Dave Sill (de5-dated-1309025818.073465 at sws5.ornl.gov) wrote:

>   Unit name /usr/local/etc/svscan.service is not a valid unit name.
>   Cannot install unit /usr/local/etc/svscan.service: Invalid argument
> 
> Obviously it's not expecting a pathname on the command line, so how am
>
> I supposed to tell systemd that svscan.service is associated with
> /usr/local/etc/svscan.service?

Yupp, systemctl enable should probably deal with arbitrary path names
passed to it, and this has been requested before. I have now added this
to the todo list.

> I think the end result of the enable would be to create a symlink, so
> I manualy create one:
> 
>   ln -s /usr/local/etc/svscan.service /etc/systemd/system

Yum, this is actually the right thing to do.

> 
> And try to start it:
> 
>   systemctl start svscan.service
> 
> Which results in:
> 
>   Failed to issue method call: Unit svscan.service failed to load: No
>   such file or directory. See system logs and 'systemctl status' for
>   details.

I have now modified this message to show the full systemctl status
command line.

Hmm, I just tried a similar case here with an out-of-directory symlink
and this worked fine here.

My guess is that a "systemctl daemon-reload" is missing here, which
means that we never try to reload the configuration file after it failed
once. Does that fix it for you?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list