Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Linux script assumes default shell is compatible (bash) #60

Open
mojibake-umd opened this issue Feb 11, 2019 · 0 comments
Open

Linux script assumes default shell is compatible (bash) #60

mojibake-umd opened this issue Feb 11, 2019 · 0 comments

Comments

@mojibake-umd
Copy link

When using SU at lines 565 and 614 SU will use the default shell, which if it is not bash (maybe sh also works) it is likely to fail. In our case default shell is tsch which fails with errors like "Missing name for redirect. " during the setup part of the script...

A work around for us was to explicitly set the shell for SU like
'su -s /usr/bin/bash -c "set -a && source <(cat ${confwild}) .....' on lines 565 and 614.

Suggested fix is detecting compatible shells, and passing to su -s, or write script in more portable fashion.

su -c "set -a && source <(cat ${confwild}) && ${install_dir}/packages/customer-bin.${version_string}/tsm ${tabadminArgs} -u \"${tsm_admin_user}\" -s https://$(hostname):${controller_port}" "${running_username}" <<<"${escaped_tsm_admin_pass}"

su -c "set -a && source <(cat ${confwild}) && ${install_dir}/packages/customer-bin.${version_string}/tabcmd initialuser --server \"localhost:${gateway_port}\" --username \"${tableau_server_admin_user}\" --password-file \"${temporary_password_file}\"" "${running_username}"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant