Set Content-Type header when rendering Unattended Install scripts
Foreman currently uses a default content-type header of text/html when rendering unattended install scripts (Kickstart, Preseed, Jumpstart). This makes viewing them in a browser irritating (need to 'View Source').
Attached is a minor patch against unattended_controller.rb to return the output as text/plain - making it easier to view in a browser, and ensuring the Content-Type header actually matches what gets returned.
My Ruby is appallingly poor, so I apologise now for the state of the patch ;)
fixes #238 - Set Content-Type HTTP header when rendering nattended install scripts
Improve systemd.timer integration
- Change service name to systemd-run
- Add SuccessExitStatus=2 to the service unit
- Use Array().join instead of a more complex method
- Add the ability to change the systemd service name
- Add the ability to specify different commands for systemd and cron
- Isolate systemctl-daemon-reload by adding a -puppet suffix
- Do not duplicate systemctl-daemon-reload exec definition
- Only use the systemd magic on Linux.
- Fix tests
#1 Updated by Jon Fautley over 10 years ago
- File 0001-Set-Content-Type-HTTP-header-when-rendering-unattend.patch 0001-Set-Content-Type-HTTP-header-when-rendering-unattend.patch added
First time with Git, please be gentle ;)