<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace">Forgot again to change the To. :'-{<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>Van: <b class="gmail_sendername" dir="auto">Cecil Westerhof</b> <span dir="auto"><<a href="mailto:cldwesterhof@gmail.com">cldwesterhof@gmail.com</a>></span><br>Date: ma 28 aug 2023 om 13:56<br>Subject: Re: [systemd-devel] Systemctl thinks a service file exists that does not<br>To: Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>><br></div><br><br><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op ma 28 aug 2023 om 13:30 schreef Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com" target="_blank">arvidjaar@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Aug 28, 2023 at 1:50 PM Cecil Westerhof <<a href="mailto:cldwesterhof@gmail.com" target="_blank">cldwesterhof@gmail.com</a>> wrote:<br>
><br>
> Op ma 28 aug 2023 om 11:55 schreef Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com" target="_blank">arvidjaar@gmail.com</a>>:<br>
>><br>
>> On Mon, Aug 28, 2023 at 12:27 PM Cecil Westerhof <<a href="mailto:cldwesterhof@gmail.com" target="_blank">cldwesterhof@gmail.com</a>> wrote:<br>
>> ><br>
>> > On debian 12, when Itype:<br>
>> > systemctl status spam<br>
>> ><br>
>> > and giving a tab I get:<br>
>> > spamassassin-maintenance.service spamassassin.service<br>
>> > spamassassin-maintenance.timer spamd.service<br>
>> ><br>
>> > Still:<br>
>> > systemctl start spamassassin.service<br>
>> ><br>
>> > keeps giving not found.<br>
>> ><br>
>><br>
>> Those units are probably listed as dependencies somewhere. Units<br>
>> listed in Wants or After/Before are not required to exist.<br>
>><br>
>> > So systemctl thinks there is a spamassassin.service file, but when<br>
>> > starting it does not find it.<br>
>> ><br>
>> > I do not find a spamassassin.service file on my system. The other<br>
>> > three I do find.<br>
>> ><br>
>> > When using:<br>
>> > find / -name spamassassin.service<br>
>> ><br>
>> > it does not find spamassassin.service.<br>
>> > So why does systemctl think there is a spamassassin.service?<br>
>><br>
>> It is not the systemctl, it is your shell completion of the systemctl.<br>
>> Just look at the output of "systemctl list-units --all" for<br>
>> "not-found".<br>
><br>
><br>
> I have to clean up my system: there are 25 not-found services, 3 not-found targets, 2 not-found mounts and 1 not-found socket.<br>
><br>
> For spamassassin.service I see:<br>
> ● spamassassin.service not-found inactive dead spamassassin.service<br>
><br>
> But when I give:<br>
> systemctl list-dependencies spamassassin.service<br>
><br>
> I get:<br>
> spamassassin.service<br>
><br>
> I looked into:<br>
> /etc/systemd/system<br>
> /run/systemd/system<br>
> /lib/systemd/system<br>
> But I do not find dependencies.<br>
><br>
> Where else should I look?<br>
><br>
<br>
Look at "systemctl show spamassassin.service".<br></blockquote><div><br></div><div style="font-family:courier new,monospace">That gave:</div><div style="font-family:courier new,monospace"> Before=exim4.service</div><div style="font-family:courier new,monospace"><br></div><div style="font-family:courier new,monospace">Exim4 was not installed, but there was a /etc/init.d/exim4. After removing that it was OK. Tab does not produce spamassassin.service anymore.<br></div><div><br></div><div style="font-family:courier new,monospace">Now I have to do the same work for the other unit files that give a not-found.</div><div style="font-family:courier new,monospace"><br></div><div style="font-family:courier new,monospace">Thanks.</div><div style="font-family:courier new,monospace"><br></div><div style="font-family:courier new,monospace"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
><br>
>> Maybe completion should skip missing units. At least for such actions<br>
>> as "status" this does not look useful.<br>
>><br>
>> > And how do I make it forget it?<br>
>> ><br>
>><br>
>> systemd cannot forget them as long as units depending on them are still loaded.<br clear="all"></blockquote></div></div></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Cecil Westerhof</div></div>