diff --git a/images/linux/scripts/installers/rndgenerator.sh b/images/linux/scripts/installers/rndgenerator.sh new file mode 100644 index 00000000..c2575989 --- /dev/null +++ b/images/linux/scripts/installers/rndgenerator.sh @@ -0,0 +1,24 @@ +#!/bin/bash +################################################################################ +## File: rndgenerator.sh +## Desc: Install random number generator +################################################################################ + +# Source the helpers for use with the script +source $HELPER_SCRIPTS/document.sh + +# Install haveged +apt-get -y install haveged + +# Run tests to determine that the software installed as expected +echo "Testing to make sure that script performed as expected, and basic scenarios work" +for cmd in haveged; do + if ! command -v $cmd; then + echo "$cmd was not installed or not found on PATH" + exit 1 + fi +done + +# Document what was added to the image +echo "Lastly, documenting what we added to the metadata file" +DocumentInstalledItem "Haveged $(dpkg-query --showformat='${Version}' --show haveged)" \ No newline at end of file diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 5b1e2688..95ddc8cd 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -189,7 +189,8 @@ "{{template_dir}}/scripts/installers/zeit-now.sh", "{{template_dir}}/scripts/installers/updatepath.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh", - "{{template_dir}}/scripts/installers/mongodb.sh" + "{{template_dir}}/scripts/installers/mongodb.sh", + "{{template_dir}}/scripts/installers/rndgenerator.sh" ], "environment_vars": [ diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index cb7e8819..89871ce0 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -192,7 +192,8 @@ "{{template_dir}}/scripts/installers/zeit-now.sh", "{{template_dir}}/scripts/installers/updatepath.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh", - "{{template_dir}}/scripts/installers/mongodb.sh" + "{{template_dir}}/scripts/installers/mongodb.sh", + "{{template_dir}}/scripts/installers/rndgenerator.sh" ], "environment_vars": [ "METADATA_FILE={{user `metadata_file`}}",