Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[freebsd-*] Improve DRYness, correctness, & speed of FreeBSD templates. #403

Merged
merged 1 commit into from
Jul 12, 2015

Conversation

fnichol
Copy link
Contributor

@fnichol fnichol commented Jul 12, 2015

The following improvements are made in this commit:

  • Ensure that all related provisioner shell scripts are written using
    more conservative bourne code idioms
  • Call all provisioner scripts with sh -eux which will (e) exit
    immediately if a command exits with a non-zero exit status, (u) treats
    unset variables as an error, and (x) outputs the command and its
    expanded arguments or associated word list
  • Use the template user variable to replace repetition of "freebsd-*"
    style strings throughout
  • Support a HOME_DIR environment variable for provisioner scripts to
    use
  • Remove now-unused user variable arch
  • Extract the iso_checksum and iso_checksum_type values into user
    variables and reference them in the templates
  • Construct the iso_url value from the mirror, mirror_directory,
    and iso_name user variables
  • Add an install_path user variable and use it throughout the
    templates
  • Add an iso_name user variable and use it throughout the templates
  • Use the http_proxy, https_proxy, and no_proxy environment
    variables if set on the workstation and make them available to the
    provisioner shell scripts to speed up package installations, etc.
  • Fix shutdown_command value to not output a file as a side effect

The following improvements are made in this commit:

* Ensure that all related provisioner shell scripts are written using
  more conservative bourne code idioms
* Call all provisioner scripts with `sh -eux` which will (e) exit
  immediately if a command exits with a non-zero exit status, (u) treats
  unset variables as an error, and (x) outputs the command and its
  expanded arguments or associated word list
* Use the `template` user variable to replace repetition of `"freebsd-*"`
  style strings throughout
* Support a `HOME_DIR` environment variable for provisioner scripts to
  use
* Remove now-unused user variable `arch`
* Extract the `iso_checksum` and `iso_checksum_type` values into user
  variables and reference them in the templates
* Construct the `iso_url` value from the `mirror`, `mirror_directory`,
  and `iso_name` user variables
* Add an `install_path` user variable and use it throughout the
  templates
* Add an `iso_name` user variable and use it throughout the templates
* Use the `http_proxy`, `https_proxy`, and `no_proxy` environment
  variables if set on the workstation and make them available to the
  provisioner shell scripts to speed up package installations, etc.
* Fix `shutdown_command` value to not output a file as a side effect
@fnichol fnichol self-assigned this Jul 12, 2015
fnichol added a commit that referenced this pull request Jul 12, 2015
[freebsd-*] Improve DRYness, correctness, & speed of FreeBSD templates.
@fnichol fnichol merged commit 5764967 into master Jul 12, 2015
@fnichol fnichol removed the Reviewing label Jul 12, 2015
@fnichol fnichol deleted the refactor-freebsd-templates branch July 12, 2015 20:02
@fnichol fnichol removed their assignment Jul 13, 2015
@tas50 tas50 added Type: Enhancement Adds new functionality. and removed Improvement labels Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants