From 365a93bd3fe62369d33d07993dd246e9b4dd63fd Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Mon, 7 Oct 2019 12:49:33 +0200 Subject: [PATCH] ceph-backport.sh: add deprecation warning The script is not maintained in the stable versions of Ceph. This commit is not a cherry-pick from master, because the script is maintained in master. It is unmaintained only in the stable versions, like "nautilus". Also add a --version option which, in this case, will also indicate to the user that this is an outdated, deprecated version of the script. Fixes: https://tracker.ceph.com/issues/42194 Signed-off-by: Nathan Cutler --- src/script/ceph-backport.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh index 8e62a310f75e..cf1b7f266d7e 100755 --- a/src/script/ceph-backport.sh +++ b/src/script/ceph-backport.sh @@ -43,6 +43,31 @@ # filesystem, etc.). Without correct values for these four variables, this # script will not work! # +# + +function deprecation_warning { + echo "*******************" + echo "DEPRECATION WARNING" + echo "*******************" + echo + echo "This is an outdated, unmaintained version of ceph-backport.sh. Using this" + echo "version can have unpredictable results. It is recommended to use the" + echo "version from the \"master\" branch, instead. In other words, use this:" + echo + echo "https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh" + echo +} + +if [[ "$@" =~ "--version" ]] ; then + deprecation_warning + echo "$0: version 14.2.0 (DEPRECATED - DO NOT USE)" + exit 0 +fi + +deprecation_warning +echo "Sleeping for 5 seconds to give you time to hit CTRL-C..." +sleep 5 + source $HOME/bin/backport_common.sh function failed_required_variable_check () { -- 2.47.3