Updated system_reseal script 98/26398/1
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 2 Sep 2015 14:31:43 +0000 (07:31 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Wed, 2 Sep 2015 14:31:43 +0000 (07:31 -0700)
After all the work on getting Ubuntu systems working correctly with the
lf-networking Vagrant defintion, this is the finalized system_reseal
script that needs to be used by all configurations. It will likely
correct some issues we may not even have realized we had.

Change-Id: Ie7804b71b8caa4a8fdbd0d78292feb1f8ef19d7b
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
vagrant/baseline/system_reseal.sh
vagrant/basic-builder/system_reseal.sh
vagrant/basic-java-node/system_reseal.sh
vagrant/basic-mininet-fedora-node/system_reseal.sh
vagrant/basic-mininet-node/system_reseal.sh
vagrant/integration-robotframework/system_reseal.sh
vagrant/ovsdb-devstack/system_reseal.sh
vagrant/ovsdb-docker/system_reseal.sh

index 0b2fb8d44de8e920e0a72e53c8acc8d972e0af6b..07a0531777d120e61a4d1fd83ac5a85009f86e2a 100644 (file)
@@ -21,6 +21,21 @@ 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 "********************************************"
index ba54ce2f19a883382d1a9d2ef9baf67ba77545ac..07a0531777d120e61a4d1fd83ac5a85009f86e2a 100644 (file)
@@ -1,5 +1,16 @@
 #!/bin/bash
 
+# vim: sw=2 ts=2 sts=2 et :
+
+if [ -f /.autorelabel ]; then
+  echo "**********************************************"
+  echo "* SYSTEM REQUIRES RELABELING SKIPPING RESEAL *"
+  echo "*     PLEASE RESTART SYSTEM AND RERUN        *"
+  echo "*           PROVISIONING SCRIPTS             *"
+  echo "**********************************************"
+  exit 1;
+fi
+
 # clean-up from any prior cloud-init networking
 rm -rf /etc/sysconfig/network-scripts/{ifcfg,route}-eth*
 
@@ -7,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 "********************************************"
index ba54ce2f19a883382d1a9d2ef9baf67ba77545ac..07a0531777d120e61a4d1fd83ac5a85009f86e2a 100644 (file)
@@ -1,5 +1,16 @@
 #!/bin/bash
 
+# vim: sw=2 ts=2 sts=2 et :
+
+if [ -f /.autorelabel ]; then
+  echo "**********************************************"
+  echo "* SYSTEM REQUIRES RELABELING SKIPPING RESEAL *"
+  echo "*     PLEASE RESTART SYSTEM AND RERUN        *"
+  echo "*           PROVISIONING SCRIPTS             *"
+  echo "**********************************************"
+  exit 1;
+fi
+
 # clean-up from any prior cloud-init networking
 rm -rf /etc/sysconfig/network-scripts/{ifcfg,route}-eth*
 
@@ -7,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 "********************************************"
index ba54ce2f19a883382d1a9d2ef9baf67ba77545ac..07a0531777d120e61a4d1fd83ac5a85009f86e2a 100644 (file)
@@ -1,5 +1,16 @@
 #!/bin/bash
 
+# vim: sw=2 ts=2 sts=2 et :
+
+if [ -f /.autorelabel ]; then
+  echo "**********************************************"
+  echo "* SYSTEM REQUIRES RELABELING SKIPPING RESEAL *"
+  echo "*     PLEASE RESTART SYSTEM AND RERUN        *"
+  echo "*           PROVISIONING SCRIPTS             *"
+  echo "**********************************************"
+  exit 1;
+fi
+
 # clean-up from any prior cloud-init networking
 rm -rf /etc/sysconfig/network-scripts/{ifcfg,route}-eth*
 
@@ -7,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 "********************************************"
index ba54ce2f19a883382d1a9d2ef9baf67ba77545ac..07a0531777d120e61a4d1fd83ac5a85009f86e2a 100644 (file)
@@ -1,5 +1,16 @@
 #!/bin/bash
 
+# vim: sw=2 ts=2 sts=2 et :
+
+if [ -f /.autorelabel ]; then
+  echo "**********************************************"
+  echo "* SYSTEM REQUIRES RELABELING SKIPPING RESEAL *"
+  echo "*     PLEASE RESTART SYSTEM AND RERUN        *"
+  echo "*           PROVISIONING SCRIPTS             *"
+  echo "**********************************************"
+  exit 1;
+fi
+
 # clean-up from any prior cloud-init networking
 rm -rf /etc/sysconfig/network-scripts/{ifcfg,route}-eth*
 
@@ -7,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 "********************************************"
index ba54ce2f19a883382d1a9d2ef9baf67ba77545ac..07a0531777d120e61a4d1fd83ac5a85009f86e2a 100644 (file)
@@ -1,5 +1,16 @@
 #!/bin/bash
 
+# vim: sw=2 ts=2 sts=2 et :
+
+if [ -f /.autorelabel ]; then
+  echo "**********************************************"
+  echo "* SYSTEM REQUIRES RELABELING SKIPPING RESEAL *"
+  echo "*     PLEASE RESTART SYSTEM AND RERUN        *"
+  echo "*           PROVISIONING SCRIPTS             *"
+  echo "**********************************************"
+  exit 1;
+fi
+
 # clean-up from any prior cloud-init networking
 rm -rf /etc/sysconfig/network-scripts/{ifcfg,route}-eth*
 
@@ -7,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 "********************************************"
index ba54ce2f19a883382d1a9d2ef9baf67ba77545ac..07a0531777d120e61a4d1fd83ac5a85009f86e2a 100644 (file)
@@ -1,5 +1,16 @@
 #!/bin/bash
 
+# vim: sw=2 ts=2 sts=2 et :
+
+if [ -f /.autorelabel ]; then
+  echo "**********************************************"
+  echo "* SYSTEM REQUIRES RELABELING SKIPPING RESEAL *"
+  echo "*     PLEASE RESTART SYSTEM AND RERUN        *"
+  echo "*           PROVISIONING SCRIPTS             *"
+  echo "**********************************************"
+  exit 1;
+fi
+
 # clean-up from any prior cloud-init networking
 rm -rf /etc/sysconfig/network-scripts/{ifcfg,route}-eth*
 
@@ -7,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 "********************************************"
index ba54ce2f19a883382d1a9d2ef9baf67ba77545ac..07a0531777d120e61a4d1fd83ac5a85009f86e2a 100644 (file)
@@ -1,5 +1,16 @@
 #!/bin/bash
 
+# vim: sw=2 ts=2 sts=2 et :
+
+if [ -f /.autorelabel ]; then
+  echo "**********************************************"
+  echo "* SYSTEM REQUIRES RELABELING SKIPPING RESEAL *"
+  echo "*     PLEASE RESTART SYSTEM AND RERUN        *"
+  echo "*           PROVISIONING SCRIPTS             *"
+  echo "**********************************************"
+  exit 1;
+fi
+
 # clean-up from any prior cloud-init networking
 rm -rf /etc/sysconfig/network-scripts/{ifcfg,route}-eth*
 
@@ -7,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 "********************************************"