-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v15] Script oneoff: add optional command prefix (sudo) (#43465)
* Script oneoff: add optional command prefix (sudo) We are converting the installer script used for Server Auto Discover to use go instead of shell script. As an example, in EC2 Auto Discover, the script runs as `ssm-user` which has access to using `sudo`. This script is currently using `sudo` to change system wide configurations (adding repos, installing packages, create file locks, ....). In order to convert this script into go code, we must also run with elevated privileges. This PR changes the `oneoff` script to optionally run with a prefix. Only `sudo` can be used as a command prefix. * use t.cleanup and fix sudo usage when testing
- Loading branch information
1 parent
dffe0d8
commit 313cc26
Showing
3 changed files
with
119 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters