Ńň C…#Wc @sĘdZddkZddkZddklZddklZddklZddk l Z l Z ddk l Z lZddklZdd klZdd klZdad e fd „ƒYZdS( s# Support for editing the hostname. i˙˙˙˙N(t InstallEngine(tINSTALL_LOGGER_NAME(tSystemConfiguration(t_tSCI_HELP(t BaseScreent UIMessage(t EditField(t textwidth(t WindowAreatIdentityScreencBsueZdZedƒZedƒZdZededƒfZdZ dZ d„Z d „Z d „Z d d „ZRS( s# Let the user set the hostname sňEnter a name for this computer that identifies it on the network. It can contain letters, numbers, periods (.) and minus signs (-). The name must start and end with an alphanumeric character and must contain at least one non-digit character.sComputer Name: is/%s/identity.txttIdentityitsolariscCsÚtdjotitdƒantt|ƒi|ƒtti ƒ|_ d|_ t dƒ|_ tiƒi|_|iidtdtƒd|_ytiƒ|i_Wn%tij oti|i_nXdS(Ns .sysconfigsSystem Identityt class_typetnot_found_is_erri(tLOGGERtNonetloggingt getLoggerRtsuperR t__init__Rt HOSTNAME_TEXTthostfield_offsetthostnameRt header_textRt get_instancetdoctget_descendantsRtTruetsctsockett gethostnamet sc_hostnameterrortDEFAULT_HOSTNAME(tselftmain_win((s../identity.pyR<s  c Csěd}||iiti|ƒ7}|d7}|iiti|ƒ|i|i}t|ti ƒ}ti d}t d|||id|ƒ}t |d|id|i id|id|iiƒ|_|iiƒ|ii|iƒdS(s7 Create an EditField for entering the hostname itscrollable_columnstwindowttexttvalidatet error_winN(t center_wint add_paragraphR t PARAGRAPHtadd_textRt win_size_xRtmintHOSTNAME_SCREEN_LENtMAX_HOSTNAME_LENR RRR R(R$t error_lineRt do_updatetactivate_object(R#ty_loctmax_colstcolsR%t hostname_area((s../identity.pyt_showVs         cCs|iiƒ|i_dS(s" Save hostname to the DOC N(Rtget_textRR (R#((s../identity.pyton_change_screenpscCs|d j o~|iƒ}|pd S|diƒpttdƒƒ‚n|iddƒiddƒiƒpttdƒƒ‚qnw|iiƒ}|pttdƒƒ‚n|diƒpttd ƒƒ‚n|iƒottd ƒƒ‚nd S( s/ Ensure hostname is valid per hosts(4) is6The Hostname must start with an alphanumeric characteru-tau.sInvalid charactersA Hostname is required.i˙˙˙˙s4The Hostname must end with an alphanumeric characters"The Hostname can not be all digitsN(RR:tisalnumRRtreplaceRtisdigit(R#t edit_fieldR((s../identity.pyR(vs  % N(t__name__t __module__t__doc__RR,RR0Rt HELP_DATAR1R"RR9R;RR((((s../identity.pyR +s     (RCRRtsolaris_install.engineRtsolaris_install.loggerRt!solaris_install.sysconfig.sc_specRtsolaris_install.sysconfig.utilRRt&solaris_install.terminalui.base_screenRRt%solaris_install.terminalui.edit_fieldRtsolaris_install.terminalui.i18nRt&solaris_install.terminalui.window_areaR RRR (((s../identity.pyts