Automated Installer can now set hostname and time zone.

http://cr.opensolaris.org/~wmsch/bug-5554/
http://cr.opensolaris.org/~wmsch/bug-4629/
http://defect.opensolaris.org/bz/show_bug.cgi?id=4629

Hostname was not defined as a possible SC manifest entry.  Created SC 
element 'hostname' and struct element and replace default 'opensolaris' 
passed to Orchestrator in the TM attribute list. This was already 
handled correctly in Orchestrator.   ICT ict_set_host_node_name() was 
modified to stamp the target /etc/nodename with the new hostname 
unconditionally.  Parameter "transfer_mode" unnecessary and was removed.

Timezone required a call to om_set_time_zone() to set the timezone for 
the install in the local environment and /etc/default/init 
(TZ=<timezone>).  /etc/default/init, is copied from the microroot to the 
target during the ICT phase.

There is also a workaround for om_set_time_zone() writing to the 
microroot /etc/default/init on SPARC - the file is compressed by 
default, and cannot be written to.   A workaround for this disables 
compression for the file: consequently, it is somehow writable.  The 
code to perform this is in ai_sparc_image.xml
<base_include type="file" 
fiocompress="false">etc/default/init</base_include>

Added diagnostic message on SC parsing failure.

Tested (x86 and sparc):
date(1) shows correct timezone
/etc/default/init shows correct TZ
/etc/nodename correct
/etc/inet/hosts correct
unsupported SC manifest keywords (prevents installation)
absent hostname keyword (default opensolaris)
invalid timezone (generates message, but does not prevent installation)

Problems verifying fixes on SPARC due to LZMA decode bug preventing reboot.


Reply via email to