Arch Linux

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#54286 - [shadow] pwck exit code ignored in shadow.service

Attached to Project: Arch Linux
Opened by Alexandr (disarmer) - Saturday, 03 June 2017, 13:25 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 02 December 2017, 16:47 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Now, shadow.service looks like this:
ExecStart=/bin/sh -c '/usr/bin/pwck -r ; /usr/bin/grpck -r'

The pwck exit code is not taken into account here. So service just prints warnings and exit with grpck exit code. So, user does not know about the error if pwck fails.

Next, shadow service is just one-time check, activated by timer, but it have Type=simple for some reason.
I believe, this service should look like this:
[Service]
Type=oneshot
ExecStart=/usr/bin/pwck -r
ExecStart=/usr/bin/grpck -r
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 02 December 2017, 16:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in SVN
Comment by Dave Reisner (falconindy) - Saturday, 02 December 2017, 16:47 GMT
No, this is still wrong. Type=simple is intended such that the server doesn't block bootup.

This would be better:

ExecStart=/bin/sh -c '/usr/bin/pwck -r || r=1; /usr/bin/grpck -r && exit $r'

Loading...