Opened 6 years ago

Closed 6 years ago

#316 closed enhancement (fixed)

improvements for the systemd service file

Reported by: cadhalpun Owned by: Christian Franke
Priority: minor Milestone: Release 6.3
Component: smartd Version: 6.2
Keywords: Cc:

Description

I think the service file for smartmontools could be improved:

  • Add a reference to the documentation in the [Unit] section, e.g.:

Documentation=man:smartd(8) man:smartd.conf(5)

  • The 'EnvironmentFile?=-/usr/local/etc/sysconfig/smartmontools' line should not be in the unit file, as that contains only three configuration options, two of which (enable_smart, start_smartd) are completely ignored by the service file and the third (smartd_opts) is only for additional command line options, that should better be changed in the service file itself.

The second point has already been requested in ticket 194, but was not implemented. I think having the 'EnvironmentFile?=' line in the service file is more confusing than helpful, so please consider removing it.

http://sourceforge.net/ticket/194

Attachments (1)

smartd.service.in.patch (503 bytes) - added by cadhalpun 6 years ago.
patch to improve systemd service file

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by cadhalpun

Attachment: smartd.service.in.patch added

patch to improve systemd service file

comment:1 in reply to:  description Changed 6 years ago by Christian Franke

Milestone: Release 6.3
Owner: changed from somebody to Christian Franke
Status: newaccepted
  • The 'EnvironmentFile?=-/usr/local/etc/sysconfig/smartmontools' line should not be in the unit file, ... (smartd_opts) is only for additional command line options, that should better be changed in the service file itself.

Not in general. Packagers might want a R/O service file with reads smart_opts from a separate R/W file.
I will add a --with-systemdenvfile=[FILE|no] configure option to handle both use cases.

comment:2 Changed 6 years ago by Christian Franke

Resolution: fixed
Status: acceptedclosed

r3875, r3876. Please try --without-systemdenvfile configure option.

Note: See TracTickets for help on using tickets.