Merge "Rename NIC feature"
[releng/builder.git] / vagrant / baseline / system_reseal.sh
index 95811fa7899c6370c0042183dfba9a3048856ae7..07a0531777d120e61a4d1fd83ac5a85009f86e2a 100644 (file)
@@ -18,6 +18,24 @@ rm -rf /etc/Pegasus/*.cnf /etc/Pegasus/*.crt /etc/Pegasus/*.csr /etc/Pegasus/*.p
 
 rm -rf ~/.viminfo /etc/ssh/ssh*key*
 
+# kill any cloud-init related bits
+rm -rf /var/lib/cloud/*
+
+if [ -e /usr/bin/facter ]
+then
+  if [ `/usr/bin/facter operatingsystem` = 'Ubuntu' ]
+  then
+    rm -rf /etc/hostname* /etc/hosts /etc/network/interfaces /etc/network/interfaces.*.bak~
+    cat <<EOINT >> /etc/network/interfaces
+# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
+# /usr/share/doc/ifupdown/examples for more information.
+# The loopback network interface
+auto lo
+iface lo inet loopback
+EOINT
+  fi
+fi
+
 echo "********************************************"
 echo "*   PLEASE SNAPSHOT IMAGE AT THIS TIME     *"
 echo "********************************************"