[systemd-devel] Systemctl thinks a service file exists that does not
Andrei Borzenkov
arvidjaar at gmail.com
Mon Aug 28 09:46:01 UTC 2023
On Mon, Aug 28, 2023 at 12:27 PM Cecil Westerhof <cldwesterhof at gmail.com> wrote:
>
> On debian 12, when Itype:
> systemctl status spam
>
> and giving a tab I get:
> spamassassin-maintenance.service spamassassin.service
> spamassassin-maintenance.timer spamd.service
>
> Still:
> systemctl start spamassassin.service
>
> keeps giving not found.
>
Those units are probably listed as dependencies somewhere. Units
listed in Wants or After/Before are not required to exist.
> So systemctl thinks there is a spamassassin.service file, but when
> starting it does not find it.
>
> I do not find a spamassassin.service file on my system. The other
> three I do find.
>
> When using:
> find / -name spamassassin.service
>
> it does not find spamassassin.service.
> So why does systemctl think there is a spamassassin.service?
It is not the systemctl, it is your shell completion of the systemctl.
Just look at the output of "systemctl list-units --all" for
"not-found".
Maybe completion should skip missing units. At least for such actions
as "status" this does not look useful.
> And how do I make it forget it?
>
systemd cannot forget them as long as units depending on them are still loaded.
More information about the systemd-devel
mailing list