Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#46624 - [rng-tools] Avoid service type forking and evironment files

Attached to Project: Community Packages
Opened by Stefan Tatschner (rumpelsepp) - Friday, 09 October 2015, 11:43 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Tuesday, 13 October 2015, 16:22 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Massimiliano Torromeo (mtorromeo)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The systemd.service file of rngd [1] can be improved. It is discouraged to use environment files and the service type forking. So I suggest:

* remove the environment file stuff completely. That can be configured via systemd dropins
* change the service type to "simple"
* adding the flag "-f" to ExecStart to avoid forking

[1]: https://projects.archlinux.org/svntogit/community.git/tree/trunk/rngd.service?h=packages/rng-tools
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Tuesday, 13 October 2015, 16:22 GMT
Reason for closing:  Implemented
Additional comments about closing:  rng-tools-5-4
Comment by Massimiliano Torromeo (mtorromeo) - Monday, 12 October 2015, 08:24 GMT
I don't know where you got the idea that Type=simple is better than Type=forking because it's exactly the other way around.

Type=simple just executes the process and considers the service as started immediately while Type=forking at least waits for the process to have finished, at least partially, it's internal initialization and only if it forks with a return code of 0 it is considered started.

Of course, the best Type is "notify" but that is an option only if it's supported by the daemon itself.

As for the environment file, you are right that it can be expressed as systemd drop-ins but it's not really a better way to do it when you have to replace the whole ExecStart line (which is the only meaningful line in rngd.service).
Comment by Stefan Tatschner (rumpelsepp) - Tuesday, 13 October 2015, 11:46 GMT Comment by Massimiliano Torromeo (mtorromeo) - Tuesday, 13 October 2015, 13:11 GMT
Type=simple is usually too "simple" and can be problematic for ordering services. In this case, though, using forking CAN be avoided so I may change it but I will leave the EnvironmentFile in place given that the daemon can only be configured via command line options.

Loading...