7028790 textui install fails with latest install nightly on 3/17 on m3000
authorJan Damborsky <dambi@opensolaris.org>
Mon, 21 Mar 2011 18:52:04 +0100
changeset 1036 ac49858aef0c
parent 1035 1e474a025ef9
child 1037 31ccd91ad041
7028790 textui install fails with latest install nightly on 3/17 on m3000
usr/src/cmd/system-config/profile/system_info.py
--- a/usr/src/cmd/system-config/profile/system_info.py	Mon Mar 21 11:31:59 2011 +0100
+++ b/usr/src/cmd/system-config/profile/system_info.py	Mon Mar 21 18:52:04 2011 +0100
@@ -283,19 +283,29 @@
                               eeprom_err)
                 return term_type
 
+            #
             # pylint: disable-msg=E1103
-            # parse returned name-value property pair. Strip new line first.
-            odevice_prop = odevice_prop.rstrip().split('=')[1]
-            if odevice_prop:
-                LOGGER().info("output-device property is set to %s",
+            # output-device property does not exist on some Sparc machines.
+            # Since in that case eeprom(1m) neither returns error nor emits
+            # error message to stderr, we need to check if returned string
+            # really carries property value.
+            #
+            if odevice_prop.startswith('output-device='):
+                #
+                # parse returned name-value property pair.
+                # Strip new line first.
+                #
+                odevice_prop = odevice_prop.rstrip().split('=')[1]
+                LOGGER().info("output-device property is set to <%s>",
                               odevice_prop)
+
+                if odevice_prop == "screen":
+                    term_type = "sun"
             else:
                 LOGGER().info("output-device property is not set")
 
-            if odevice_prop == "screen":
-                term_type = "sun"
+        return term_type
 
-        return term_type
 
     def determine_locale(self):
         '''Read in the language set during boot.'''