[arch-commits] Commit in shadow/trunk (shadow.service)

Dave Reisner dreisner at archlinux.org
Sat Dec 2 16:46:54 UTC 2017


    Date: Saturday, December 2, 2017 @ 16:46:53
  Author: dreisner
Revision: 311488

Catch errors in pwck, not just grpck (FS#54286)

Modified:
  shadow/trunk/shadow.service

----------------+
 shadow.service |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Modified: shadow.service
===================================================================
--- shadow.service	2017-12-02 10:58:21 UTC (rev 311487)
+++ shadow.service	2017-12-02 16:46:53 UTC (rev 311488)
@@ -4,7 +4,8 @@
 
 [Service]
 Type=simple
-ExecStart=/bin/sh -c '/usr/bin/pwck -r ; /usr/bin/grpck -r'
+# Always run both checks, but fail the service if either fails
+ExecStart=/bin/sh -c '/usr/bin/pwck -r || r=1; /usr/bin/grpck -r && exit $r'
 Nice=19
 IOSchedulingClass=best-effort
 IOSchedulingPriority=7



More information about the arch-commits mailing list