File tree Expand file tree Collapse file tree 7 files changed +57
-8
lines changed Expand file tree Collapse file tree 7 files changed +57
-8
lines changed Original file line number Diff line number Diff line change @@ -66,19 +66,23 @@ case "$1" in
66
66
;;
67
67
admin)
68
68
shift
69
- maybe_su ` which riak-admin` $*
69
+ # when we are called as `riak admin`, pass a flag to
70
+ # riak-admin script to suppress the deprecation warning (which
71
+ # would be printed if that script were called directly, i.e.,
72
+ # `riak-admin`)
73
+ maybe_su ` which riak-admin` --suppress-deprecation-warning $*
70
74
;;
71
75
chkconfig)
72
76
shift
73
- maybe_su ` which riak-chkconfig` $*
77
+ maybe_su ` which riak-chkconfig` --suppress-deprecation-warning $*
74
78
;;
75
79
repl)
76
80
shift
77
- maybe_su ` which riak-repl` $*
81
+ maybe_su ` which riak-repl` --suppress-deprecation-warning $*
78
82
;;
79
83
debug)
80
84
shift
81
- maybe_su ` which riak-debug` $*
85
+ maybe_su ` which riak-debug` --suppress-deprecation-warning $*
82
86
;;
83
87
* )
84
88
ESCAPED_ARGS=` echo " $@ " | sed -e ' s/\([\\\(\\\){}"\x27]\)/\\\\\1/g' `
Original file line number Diff line number Diff line change 2
2
# -*- tab-width:4;indent-tabs-mode:nil -*-
3
3
# ex: ts=4 sw=4 et
4
4
5
+ # suppress_hyphen_deprec_warning is defined in top-level vars.config
6
+ # but not in pkg/*/vars.config
7
+ SUPPRESS_HYPH_DEPREC_WARN={{suppress_hyphen_deprec_warning}}
8
+
9
+ # the --suppress-deprecation-warning flag is injected in riak launcher
10
+ # script, meaning that if riak-admin is invoked from riak (as `riak
11
+ # admin`), we should not print the warning.
12
+ if [ x$1 = x" --suppress-deprecation-warning" ]; then
13
+ shift
14
+ elif [ x${SUPPRESS_HYPH_DEPREC_WARN} != x" yes" ]; then
15
+ echo " The hyphenated form of this command is deprecated. \
16
+ Please fix your scripts to call \` riak admin\` instead.
17
+ "
18
+ fi
19
+
5
20
# Identify the script name
6
21
SCRIPT=" riak-admin"
7
22
Original file line number Diff line number Diff line change 2
2
# -*- tab-width:4;indent-tabs-mode:nil -*-
3
3
# ex: ts=4 sw=4 et
4
4
5
+ SUPPRESS_HYPH_DEPREC_WARN={{suppress_hyphen_deprec_warning}}
6
+ if [ x$1 = x" --suppress-deprecation-warning" ]; then
7
+ shift
8
+ elif [ x${SUPPRESS_HYPH_DEPREC_WARN} != x" yes" ]; then
9
+ echo " The hyphenated form of this command is deprecated. \
10
+ Please fix your scripts to call \` riak chkconfig\` instead.
11
+ "
12
+ fi
13
+
5
14
PLATFORM_BASE_DIR={{platform_base_dir}}
6
15
PLATFORM_BASE_DIR=${PLATFORM_BASE_DIR:- $(cd $(dirname " $0 " )/ .. && pwd -P)}
7
16
RPC_HOP=" ${PLATFORM_BASE_DIR} /bin/riak rpc"
Original file line number Diff line number Diff line change 22
22
# #
23
23
# # -------------------------------------------------------------------
24
24
25
+ SUPPRESS_HYPH_DEPREC_WARN={{suppress_hyphen_deprec_warning}}
26
+ if [ x$1 = x" --suppress-deprecation-warning" ]; then
27
+ shift
28
+ elif [ x${SUPPRESS_HYPH_DEPREC_WARN} != x" yes" ]; then
29
+ echo " The hyphenated form of this command is deprecated. \
30
+ Please fix your scripts to call \` riak debug\` instead.
31
+ "
32
+ fi
33
+
25
34
# If you start to think "We should execute some Erlang in here", then go work
26
35
# on Riaknostic, which is called with `riak admin diag` below.
27
36
Original file line number Diff line number Diff line change 2
2
# -*- tab-width:4;indent-tabs-mode:nil -*-
3
3
# ex: ts=4 sw=4 et
4
4
5
+ SUPPRESS_HYPH_DEPREC_WARN={{suppress_hyphen_deprec_warning}}
6
+ if [ x$1 = x" --suppress-deprecation-warning" ]; then
7
+ shift
8
+ elif [ x${SUPPRESS_HYPH_DEPREC_WARN} != x" yes" ]; then
9
+ echo " The hyphenated form of this command is deprecated. \
10
+ Please fix your scripts to call \` riak repl\` instead"
11
+ fi
12
+
5
13
# Identify the script name
6
14
SCRIPT=` basename $0 `
7
15
Original file line number Diff line number Diff line change @@ -39,19 +39,19 @@ case "$1" in
39
39
;;
40
40
admin)
41
41
shift
42
- riak-admin $*
42
+ riak-admin --suppress-deprecation-warning $*
43
43
;;
44
44
chkconfig)
45
45
shift
46
- riak-chkconfig $*
46
+ riak-chkconfig --suppress-deprecation-warning $*
47
47
;;
48
48
repl)
49
49
shift
50
- riak-repl $*
50
+ riak-repl --suppress-deprecation-warning $*
51
51
;;
52
52
debug)
53
53
shift
54
- riak-debug $*
54
+ riak-debug --suppress-deprecation-warning $*
55
55
;;
56
56
* )
57
57
ESCAPED_ARGS=` echo " $@ " | sed -e ' s/\([\\\(\\\){}"\x27]\)/\\\\\1/g' `
Original file line number Diff line number Diff line change 47
47
% %{pipe_dir, "$PLATFORM_BASE_DIR/tmp/riak"}.
48
48
% %{pid_dir, "$PLATFORM_BASE_DIR/var/run/riak"}.
49
49
50
+ % % suppress hyphenated form deprecation warning for releases made with
51
+ % % `make rel` (as opposed to releases made for packaging)
52
+ {suppress_hyphen_deprec_warning , " yes" }.
53
+
50
54
% %
51
55
% % cuttlefish
52
56
% %
You can’t perform that action at this time.
0 commit comments