diff --git a/changes/33437-enable-scripts-err-msg b/changes/33437-enable-scripts-err-msg new file mode 100644 index 0000000000..5b8f30545b --- /dev/null +++ b/changes/33437-enable-scripts-err-msg @@ -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`). diff --git a/orbit/pkg/update/notifications.go b/orbit/pkg/update/notifications.go index 0f0647a7e1..4cfc877248 100644 --- a/orbit/pkg/update/notifications.go +++ b/orbit/pkg/update/notifications.go @@ -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() } diff --git a/server/fleet/software_installer.go b/server/fleet/software_installer.go index 666eb80077..e4cddad6e4 100644 --- a/server/fleet/software_installer.go +++ b/server/fleet/software_installer.go @@ -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"