Fix references to enable-scripts flag in error messages and comments (#36340)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
- Updated error message when attempting to run software install script on host with scripts disabled
|
||||
to refer to `--enable-scripts` flag (instead of `--scripts-enabled`).
|
||||
@@ -276,7 +276,7 @@ type runScriptsConfigReceiver struct {
|
||||
// ScriptsExecutionEnabled indicates if this agent allows scripts execution.
|
||||
// If it doesn't, scripts are not executed, but a response is returned to the
|
||||
// Fleet server so it knows the agent processed the request. Note that this
|
||||
// should be set to the value of the --scripts-enabled command-line flag. An
|
||||
// should be set to the value of the --enable-scripts command-line flag. An
|
||||
// additional, dynamic check is done automatically by the
|
||||
// runScriptsConfigReceiver if this field is false to get the value from the
|
||||
// MDM configuration profile.
|
||||
@@ -404,7 +404,7 @@ func (h *runScriptsConfigReceiver) Run(cfg *fleet.OrbitConfig) error {
|
||||
|
||||
func (h *runScriptsConfigReceiver) scriptsEnabled() bool {
|
||||
// scripts are always enabled if the agent is started with the
|
||||
// --scripts-enabled flag. If it is not started with this flag, then
|
||||
// --enable-scripts flag. If it is not started with this flag, then
|
||||
// scripts are enabled only if the mdm profile says so.
|
||||
return h.ScriptsExecutionEnabled || h.dynamicScriptsEnabled.Load()
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ type HostSoftwareInstallerResult struct {
|
||||
const (
|
||||
SoftwareInstallerQueryFailCopy = "Query didn't return result or failed\nInstall stopped"
|
||||
SoftwareInstallerQuerySuccessCopy = "Query returned result\nProceeding to install..."
|
||||
SoftwareInstallerScriptsDisabledCopy = "Installing software...\nError: Scripts are disabled for this host. To run scripts, deploy the fleetd agent with --scripts-enabled."
|
||||
SoftwareInstallerScriptsDisabledCopy = "Installing software...\nError: Scripts are disabled for this host. To run scripts, deploy the fleetd agent with --enable-scripts."
|
||||
SoftwareInstallerInstallFailCopy = "Installing software...\nFailed\n%s"
|
||||
SoftwareInstallerInstallSuccessCopy = "Installing software...\nSuccess\n%s"
|
||||
SoftwareInstallerPostInstallSuccessCopy = "Running script...\nExit code: 0 (Success)\n%s"
|
||||
|
||||
Reference in New Issue
Block a user