Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-upgrade syntax in default installer script broken #31914

Closed
WilliamLoy opened this issue Sep 14, 2023 · 3 comments
Closed

auto-upgrade syntax in default installer script broken #31914

WilliamLoy opened this issue Sep 14, 2023 · 3 comments

Comments

@WilliamLoy
Copy link
Contributor

Expected behavior:
default-installer should install teleport-ent-updater package if set to true
Current behavior:
This logic is ignored because the double = and double { fail in sh, which the script uses in its shebang #!/bin/sh.

if [[ \"{{ .AutomaticUpgrades }}\" == \"true\" ]];

This does however work in bash.

Bug details:

  • Teleport version: 13.3.9
  • Recreation steps: test double brackets and double equal signs in sh
  • Debug logs
@WilliamLoy WilliamLoy added the bug label Sep 14, 2023
@marcoandredinis
Copy link
Contributor

I don't think the double { is the issue here. It is filled by some variable before being evaluated by a shell.
The double = should not be an issue as well 🤔

sh-3.2$ if [[ "x" == "x" ]]; then echo "a"; fi
a
sh-3.2$

Do you have an error we can look at? Or the sh version in use? Maybe some older version did not accept this syntax.

Anyway, I think we should use the same shebang as agentless-installer.sh.tmpl:

#!/usr/bin/env bash

@zmb3
Copy link
Collaborator

zmb3 commented Sep 27, 2023

@WilliamLoy friendly ping on this one

@WilliamLoy
Copy link
Contributor Author

I'm still waiting to get the error back on this and I haven't yet reproduced it myself. I'll update you when I have the additional needed details.

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

No branches or pull requests

3 participants