From 30c4d8526ad0c7ed4bf9c8fa05372312a13994e6 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Wed, 29 Oct 2014 15:59:43 -0400 Subject: [PATCH] Make openafs-client start succeed silently when already running This is what we have to do, since we use dh_installinit -r. --- debian/changelog | 2 ++ debian/openafs-client-precheck | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index d7396da70..4355a77c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ openafs (1.6.10-2) UNRELEASED; urgency=medium * Some shell quoting and similar cleanups in openafs-client-precheck from Anders Kaseorg. + * Make the openafs-client unit silently succeed when it is already + running, to match the behavior of the sysV script. (Closes: #767056) -- Benjamin Kaduk Tue, 28 Oct 2014 18:52:47 -0400 diff --git a/debian/openafs-client-precheck b/debian/openafs-client-precheck index 877140e17..60299893c 100755 --- a/debian/openafs-client-precheck +++ b/debian/openafs-client-precheck @@ -9,6 +9,15 @@ fi CACHEINFO=${CACHEINFO:-/etc/openafs/cacheinfo} MODULEROOT=${MODULEROOT:-/lib/modules/`uname -r`} +do_nothing_env() { + cat > /var/cache/openafs-client/openafs-client.env <&2 - exit 1 + echo "afsd is already running, continuing" >&2 + do_nothing_env + exit 0 fi # Ensure that the kernel module is loaded. @@ -38,12 +48,7 @@ if ! /sbin/lsmod | grep -Fq openafs; then if grep -q openafs "$MODULEROOT/modules.dep"; then exit $status else - cat > /var/cache/openafs-client/openafs-client.env <