fix: correct fmt.Sprintf argument alignment in PVE setup script
Critical bug fix: The setup script's format string had 33 placeholders but was only receiving 27 arguments, causing: - INSTALLER_URL to receive authToken instead of pulseURL - This made curl try to resolve the token value as a hostname - Error: 'curl: (6) Could not resolve host: N7AE3P' - Token ID showed '%!s(MISSING)' in manual setup instructions Fixed by: - Added missing tokenName at position 7 - Added literal '%s' strings for version_ge printf placeholders - Added authToken arguments for Authorization headers (positions 29, 31) - Ensured all 33 format placeholders have corresponding arguments Now generates correct URLs: - INSTALLER_URL: http://192.168.0.160:7655/api/install/install-sensor-proxy.sh - --pulse-server: http://192.168.0.160:7655 - Token ID: pulse-monitor@pam!pulse-192-168-0-160-[timestamp]
This commit is contained in:
parent
8faa9040fb
commit
d430efcecb
1 changed files with 4 additions and 2 deletions
|
|
@ -4343,11 +4343,13 @@ if [ "$AUTO_REG_SUCCESS" != true ]; then
|
|||
echo " Token Value: [See token output above]"
|
||||
fi
|
||||
echo " Host URL: YOUR_PROXMOX_HOST:8006"
|
||||
echo ""
|
||||
echo ""
|
||||
fi
|
||||
`, serverName, time.Now().Format("2006-01-02 15:04:05"), pulseIP,
|
||||
tokenName, tokenName, tokenName, tokenName, tokenName, tokenName,
|
||||
authToken, pulseURL, serverHost, tokenName, tokenName, storagePerms, sshKeys.ProxyPublicKey, sshKeys.SensorsPublicKey, minProxyReadyVersion, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, authToken, pulseURL, authToken, pulseURL, tokenName)
|
||||
authToken, pulseURL, serverHost, tokenName, tokenName, storagePerms,
|
||||
sshKeys.ProxyPublicKey, sshKeys.SensorsPublicKey, minProxyReadyVersion,
|
||||
pulseURL, "%s", "%s", pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, pulseURL, authToken, pulseURL, authToken, pulseURL, tokenName)
|
||||
|
||||
} else { // PBS
|
||||
script = fmt.Sprintf(`#!/bin/bash
|
||||
|
|
|
|||
Loading…
Reference in a new issue