Fix info-drop scripts

Change-Id: I8506f37390ad7078f1ce8bc9023a6f40cb1d73d0
diff --git a/common/ubuntu_cleanup_salt.sh b/common/ubuntu_cleanup_salt.sh
index db140a5..69509b5 100644
--- a/common/ubuntu_cleanup_salt.sh
+++ b/common/ubuntu_cleanup_salt.sh
@@ -1,5 +1,18 @@
 #!/bin/bash -xe
 
+# Duplicate of ubuntu_info.sh
+mkdir -p /var/log/bootstrap_logs/
+pushd /var/log/bootstrap_logs/
+  dpkg-query -W -f='${Package}=${Version}\n' | sort -u |tee -a vcp_initial_pkgs.log
+  # Drop some reclass info,if available
+  if [[ $(which salt-key) ]] ; then
+    for node in $(salt-key -l acc | grep -v 'Accepted Keys:') ; do
+     salt ${node} pillar.data --out=json > ${node}.pillardata.json || true
+     reclass -n  ${node} -o json > ${node}.reclass.json || true
+    done
+  fi
+popd
+
 apt-get purge -y salt-formula-*
 
 salt-call saltutil.clear_cache || true
diff --git a/common/ubuntu_info.sh b/common/ubuntu_info.sh
index ca2d8dc..3fc2cf9 100644
--- a/common/ubuntu_info.sh
+++ b/common/ubuntu_info.sh
@@ -4,13 +4,8 @@
 
 mkdir -p /var/log/bootstrap_logs/
 pushd /var/log/bootstrap_logs/
-  dpkg-query -W -f='${Package}=${Version}\n' | sort -u >> vcp_initial_pkgs.log
-  cat vcp_initial_pkgs.log
-  # Drop some reclass info,if avaible
-  if [[ $(which salt-key) ]] ; then
-    for node in $(salt-key -l acc | grep -v 'Accepted Keys:') ; do
-     salt ${node} pillar.data --out=json > ${node}.pillardata.json || true
-     reclass -n  ${node} -o json > ${node}.reclass.json || true
-    done
-  fi
+  dpkg-query -W -f='${Package}=${Version}\n' | sort -u |tee -a vcp_initial_pkgs.log
+  # In case, salt_cleanup or other have been processed
+  sort -u vcp_initial_pkgs.log >> vcp_initial_pkgs.log_tmp
+  mv -v vcp_initial_pkgs.log_tmp vcp_initial_pkgs.log
 popd