summaryrefslogtreecommitdiffstats
path: root/bin/cephfs-snap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-02 18:44:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-03-02 18:45:06 +0000
commit5329166169b4686720970b63ae1e7326ee4bb047 (patch)
treee041fabbef0975b6861f848391bdc8323318bbde /bin/cephfs-snap
parentReleasing debian version 20180915-3. (diff)
downloadopen-infrastructure-storage-tools-5329166169b4686720970b63ae1e7326ee4bb047.tar.xz
open-infrastructure-storage-tools-5329166169b4686720970b63ae1e7326ee4bb047.zip
Merging upstream version 20190301.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/cephfs-snap')
-rwxr-xr-xbin/cephfs-snap14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/cephfs-snap b/bin/cephfs-snap
index d6bb96d..5d20726 100755
--- a/bin/cephfs-snap
+++ b/bin/cephfs-snap
@@ -1,7 +1,6 @@
#!/bin/sh
-# storage-tools - Additional utilities to manage storage related tasks
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -20,6 +19,7 @@
set -e
+PROJECT="open-infrastructure"
SOFTWARE="storage-tools"
PROGRAM="cephfs-snap"
@@ -31,9 +31,9 @@ Usage ()
exit 1
}
-if [ -e "/etc/default/${SOFTWARE}" ]
+if [ -e "/etc/${PROJECT}/ceph-tools.conf" ]
then
- . "/etc/default/${SOFTWARE}"
+ . "/etc/${PROJECT}/ceph-tools.conf"
fi
case "${CEPHFS_SNAP}" in
@@ -47,7 +47,7 @@ esac
if [ -z "${CEPHFS_SNAP_DIRECTORIES}" ]
then
- echo "E: no cephfs directories defined in /etc/default/${SOFTWARE}" >&2
+ echo "E: no cephfs directories defined in /etc/${PROJECT}/ceph-tools.conf" >&2
exit 1
fi
@@ -57,7 +57,7 @@ case "${ACTION}" in
if [ -z "${ROTATION}" ]
then
- echo "E: no cephfs snapshot rotation for ${ACTION} defined in /etc/default/${SOFTWARE}" >&2
+ echo "E: no cephfs snapshot rotation for ${ACTION} defined in /etc/${PROJECT}/ceph-tools.conf" >&2
exit 1
fi
;;
@@ -106,7 +106,7 @@ mkdir -p "/var/log/${SOFTWARE}/${PROGRAM}"
echo "${DATE} ${HOST} ${PROGRAM} creating ${ACTION} snapshots" >> "/var/log/${SOFTWARE}/${PROGRAM}/${PROGRAM}.log"
# irc
-if [ -e /usr/bin/irk ] && [ -e "/etc/default/${SOFTWARE}" ]
+if [ -e /usr/bin/irk ] && [ -e "/etc/${PROJECT}/ceph-tools.conf" ]
then
if [ -n "${IRK_TARGETS}" ]
then