On Wed, May 05, 2021 at 12:07:29PM +0100, Joe wrote:
> On Tue, 4 May 2021 18:44:12 -0400
> Greg Wooledge <g...@wooledge.org> wrote:
> > 
> > Could you kindly tell us what "systemctl status exim4.service" says
> > on this buster machine of yours?  Perhaps your command is turning up
> > one of the automatically converted init.d scripts.  If so, this will
> > be made clear in the systemctl status report.
> 
> ● exim4.service - LSB: exim Mail Transport Agent
>    Loaded: loaded (/etc/init.d/exim4; generated)
>    Active: active (running) since Wed 2021-03-31 08:38:00 BST; 1 months
> 4 days ago Docs: man:systemd-sysv-generator(8)
>     Tasks: 1 (limit: 2062)
>    CGroup: /system.slice/exim4.service
>            └─6453 /usr/sbin/exim4 -bd -q30m

Yes, that's what I saw on my single buster exim4 system as well.  Note the
"Loaded:" line which shows that this is using a converted init.d script,
and not a native systemd unit.

It also tells you which man page to read, to learn more about the
automatic conversion of init.d scripts into systemd units.  Not that
this man page says very much, but at least it's there.

(Note that it also tells you the full name of the init.d script, in
this case "exim4".  Not "exim".)

> Probably worth mentioning that this is on a Raspberry Pi, the current
> version of RasPiOs (formerly Raspbian) with a default exim4
> installation.

Yes, thank you.  In this case it looks like they haven't changed the
startup configuration from the Debian packages, but you never know.

In the future, please refrain from calling non-Debian systems by
Debian release names.  It just adds another layer of confusion.

> all          configuration for the Exim MTA (v4) ii  exim4-daemon-light
>             4.92-8+deb10u5                        armhf
> lightweight Exim MTA (v4) daemon

Or they're literally using the Debian packages, and didn't even rebuild
them.

> I have the same service on my main server (stretch) where it is the
> network MTA and also on my sid workstation. Again, I didn't do anything
> to achieve this. Presumably it's using an init.d script, but it
> certainly works to start and stop exim4 via systemctl.

You're using a package that has not yet been converted to systemd.  It's
still using an old init.d script, and systemd is performing a conversion
on the fly.

The basic start and stop subcommands will work fine, but disable may
not work.  It's not clear from the systemd-sysv-generator man page, but my
guess is that the auto-generation of systemd units takes place in memory
at boot time, and applies to all the init.d scripts that systemd sees.
Doing a "disable" after this would only affect the generated services,
which are ephemeral and go away when you reboot.

To permanently disable the starting of this service, you'll need to
use the actual sysv-rc techniques (either removing or renaming symlinks,
or using Debian's weird update-rc.d tool which relies on parsing comments
inside the init.d script).

Reply via email to