mirror of
https://github.com/floci-io/floci.git
synced 2026-11-29 08:31:53 -05:00
EC2 user data now appends each part's stdout and stderr to /var/log/cloud-init-output.log in the guest, as cloud-init does on AWS. The guest log keeps the full output; Floci's own 2048-byte summary line is unchanged. The script still runs as a command, so its shebang selects the interpreter. A POSIX shell wrapper merges stderr into stdout, tees both into the log, and carries the script's exit status on a dedicated file descriptor, so Floci reports the script's code rather than tee's. The script runs with those descriptors closed, so a background service it starts cannot keep the status pipe or the exec stream open. If the guest has no tee or a read-only /var/log, the wrapper falls back to running the script directly and warns on stderr. The EKS caller of the shared UserDataPipeline keeps its current path. Closes #9386