Update packer config to work in Vexxhost
[releng/builder.git] / packer / provision / docker.sh
index cdd8cb051adf45da4cbceebdf5fb98361a5221ef..12814a6f213bccc1304aa95c1c227d6457b78a7b 100644 (file)
@@ -2,6 +2,9 @@
 
 # vim: sw=4 ts=4 sts=4 et :
 
+# force any errors to cause the script and job to end in failure
+set -xeu -o pipefail
+
 rh_changes() {
     echo "---> RH changes"
     # install docker and enable it
@@ -30,12 +33,12 @@ ubuntu_changes() {
     echo "---> Ubuntu changes"
 }
 
-OS=$(/usr/bin/facter operatingsystem)
+OS=$(/usr/bin/facter operatingsystem | tr '[:upper:]' '[:lower:]')
 case "$OS" in
-    CentOS|Fedora|RedHat)
+    centos|fedora|redhat)
         rh_changes
     ;;
-    Ubuntu)
+    ubuntu)
         ubuntu_changes
     ;;
     *)