Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

[Reviewer: Ellie] Add a new option to control whether Sprout should send to Ralf #1849

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion sprout-base.root/etc/init.d/sprout
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ get_settings()
signaling_dns_server=127.0.0.1
scscf_node_uri=""

# Should we send to Ralf? Y, N, or X => base on ralf hostname
sprout_ralf_enabled=X

# Enable no-ENUM TEL URI translation fallback by default for backwards compatibility
default_tel_uri_translation="Y"

Expand Down Expand Up @@ -131,7 +134,11 @@ get_daemon_args()
[ -z "$xdms_hostname" ] || xdms_hostname_arg="--xdms=$xdms_hostname"
fi

[ -z "$ralf_hostname" ] || ralf_arg="--ralf=$ralf_hostname"
if [ "$sprout_ralf_enabled" == "Y" ] || \
[ "$sprout_ralf_enabled" == "X" -a -n "$ralf_hostname" ]
then
ralf_arg="--ralf=$ralf_hostname"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, this will do odd things if sprout_ralf_enabled is set but ralf_hostname isn't.

Why not default sprout_ralf_enabled to Y, then only set ralf_arg if sprout_ralf_enabled is Y and ralf_hostname is set to something. This still works over upgrade and I think it's simpler (and we don't add a third value to an option that should be Y/N).

You've agreed to set sprout_ralf_enabled to N in shared config in systems that don't have ralf enabled.

fi

[ "$authentication" != "Y" ] || authentication_arg="--authentication"

Expand Down