From dfba10779b30ee4373b13a9610fe695c1a30213655fb2becf30a1f4a775c7138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojtek=20Dziewi=C4=99cki?= Date: Fri, 10 Jan 2014 13:58:57 +0000 Subject: [PATCH] Accepting request 213467 from home:LPechacek:branches:Base:System There were messages like the following in system log after at daemon was disabled: 2014-01-03T09:19:51.172618+01:00 fmn systemd-sleep[13167]: /usr/lib/systemd/system-sleep/atd.sh exited with exit status 1. These are a result of the atd.sh script leaking the exit code of systemctl. This change to at.sleep prevents leaking systemctl exit code as well as simplifies the script. OBS-URL: https://build.opensuse.org/request/show/213467 OBS-URL: https://build.opensuse.org/package/show/Base:System/at?expand=0&rev=74 --- at.sleep | 19 +++++++++++-------- at.spec | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) 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