* 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 <kaduk@mit.edu> Tue, 28 Oct 2014 18:52:47 -0400
CACHEINFO=${CACHEINFO:-/etc/openafs/cacheinfo}
MODULEROOT=${MODULEROOT:-/lib/modules/`uname -r`}
+do_nothing_env() {
+ cat > /var/cache/openafs-client/openafs-client.env <<EOF
+AFSD_ARGS=-exit
+AFS_SETCRYPT=-help
+AFS_SYSNAME=-help
+KMOD=--version
+EOF
+}
+
# Exit if the package is not installed.
[ -x /sbin/afsd ] || exit 1
exit 1
fi
if pidof /sbin/afsd || pidof /usr/sbin/afsd; then
- echo "afsd is already running?" >&2
- exit 1
+ echo "afsd is already running, continuing" >&2
+ do_nothing_env
+ exit 0
fi
# Ensure that the kernel module is loaded.
if grep -q openafs "$MODULEROOT/modules.dep"; then
exit $status
else
- cat > /var/cache/openafs-client/openafs-client.env <<EOF
-AFSD_ARGS=-exit
-AFS_SETCRYPT=-help
-AFS_SYSNAME=-help
-KMOD=--version
-EOF
+ do_nothing_env
exit 0
fi
fi