Deprecate positional args for os-svc-daemon
We advertise supporting passthrough arguments in os-svc-daemon by using '--' followed by extra params. This does not work if using the undocumented old-style positional arguments and fixing this is a non-trivial parsing problem. Lets just deprecate this old behaviour so we can remove it. Change-Id: I0e75f7f975325b5f199daf697004628461a20075
This commit is contained in:
parent
4369880848
commit
57dd108fd0
|
@ -78,12 +78,28 @@ if [ -z "$SERVICENAME" ] || [ -z "$RUNAS" ] ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
function deprecated_posarg_warning {
|
||||
echo "WARNING: Setting $1 via positional argument is deprecated and will be removed in a future release."
|
||||
}
|
||||
|
||||
# Compatibility with old style passing w/o switches
|
||||
[ -n "$SERVICENAME" ] || { SERVICENAME=$1 ; shift; }
|
||||
[ -n "$RUNAS" ] || { RUNAS=$1 ; shift; }
|
||||
if [ -z "$SERVICENAME" ]; then
|
||||
SERVICENAME=$1
|
||||
shift
|
||||
deprecated_posarg_warning "SERVICENAME"
|
||||
fi
|
||||
if [ -z "$RUNAS" ]; then
|
||||
RUNAS=$1
|
||||
shift
|
||||
deprecated_posarg_warning "RUNAS"
|
||||
fi
|
||||
if [ -z "$RUNCMD" ]; then
|
||||
CHECK=${1:-""}
|
||||
[ -n "$CHECK" ] && { RUNCMD=$1 ; shift; }
|
||||
if [ -n "$CHECK" ]; then
|
||||
RUNCMD=$1
|
||||
shift
|
||||
deprecated_posarg_warning "CHECK"
|
||||
fi
|
||||
fi
|
||||
|
||||
# if INSTALLDIR isn't set use /opt/stack/venvs/RUNAS
|
||||
|
|
Loading…
Reference in New Issue