diff --git a/at.changes b/at.changes index 492a4a9..a8f16b4 100644 --- a/at.changes +++ b/at.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 23 21:15:53 UTC 2014 - aj@ajaissle.de + +- Fixed leaking the exit code of systemctl in atd.sh. A change + to at.sleep prevents leaking systemctl exit code as well as + simplifies the script. + ------------------------------------------------------------------- Tue Nov 12 15:37:29 UTC 2013 - mvyskocil@suse.com diff --git a/at.sleep b/at.sleep index 56bd02e..9f99732 100644 --- a/at.sleep +++ b/at.sleep @@ -1,9 +1,12 @@ #!/bin/sh -case $1/$2 in - pre/*) - systemctl --quiet is-enabled atd && systemctl stop atd - ;; - post/*) - systemctl --quiet is-enabled atd && systemctl restart atd - ;; -esac + +if systemctl --quiet is-enabled atd; then + case $1/$2 in + pre/*) + systemctl stop atd + ;; + post/*) + systemctl restart atd + ;; + esac +fi diff --git a/at.spec b/at.spec index 6e1853b..d58b957 100644 --- a/at.spec +++ b/at.spec @@ -1,7 +1,7 @@ # # spec file for package at # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed