Convert Vagrant to Packer
[releng/builder.git] / packer / provision / baseline.sh
similarity index 97%
rename from vagrant/lib/baseline.sh
rename to packer/provision/baseline.sh
index 2cf8c8b3b11b6adefe56812bd0cc877696276975..ee87f00559b102bf8fd2b02e863a15e676538321 100644 (file)
@@ -46,6 +46,7 @@ EOF
 
     echo "---> Updating operating system"
     yum clean all -q
+    yum install -y -q deltarpm
     yum update -y -q
 
     # add in components we need or want on systems
@@ -165,10 +166,16 @@ all_systems() {
 
 echo "---> Attempting to detect OS"
 # upstream cloud images use the distro name as the initial user
-ORIGIN=$(logname)
+ORIGIN=$(if [ -e /etc/redhat-release ]
+    then
+        echo redhat
+    else
+        echo ubuntu
+    fi)
+#ORIGIN=$(logname)
 
 case "${ORIGIN}" in
-    fedora|centos)
+    fedora|centos|redhat)
         echo "---> RH type system detected"
         rh_systems
     ;;