7066137 after 7060689 is pushed, AI creates an empty <destination/> entry which crashes zones installs
authorDrew Fisher <drew.fisher@oracle.com>
Wed, 13 Jul 2011 07:29:38 -0600
changeset 1276 663decbf8cb1
parent 1275 a1022e164e5e
child 1277 b2ac3a6ed76b
7066137 after 7060689 is pushed, AI creates an empty <destination/> entry which crashes zones installs
usr/src/cmd/auto-install/auto_install.py
--- a/usr/src/cmd/auto-install/auto_install.py	Wed Jul 13 06:22:25 2011 -0700
+++ b/usr/src/cmd/auto-install/auto_install.py	Wed Jul 13 07:29:38 2011 -0600
@@ -985,6 +985,7 @@
                     image = dst.get_first_child(class_type=Image)
                     if image is None:
                         image = Image(self.installed_root_dir, image_action)
+                        dst.insert_children(image)
                     else:
                         if image.img_root is not None:
                             self.logger.error(
@@ -995,7 +996,6 @@
 
                         image.img_root = self.installed_root_dir
                         image.action = image_action
-                        dst.insert_children(image)
 
                     # Delete any existing children of ImType
                     image.delete_children(class_type=ImType)