Sorry. I should have put this update directly into the bug... Will do 
that now.

Joe


Joseph J VLcek wrote:
> Alok Aggarwal wrote:
>> Hi Joe,
>>
>> On Fri, 13 Mar 2009, Joseph J VLcek wrote:
>>
>>> Alok,
>>>
>>>  Please advise Regarding bug 5554.
>>>
>>>  When I helped you merge the AI changes into ICT you had told me not 
>>> to alter the /etc/nodename when doing an AI install.
>>
>> At the time, we did not support changing the hostname
>> in AI (the AI SC manifest had no 'hostname' parameter)
>> and so there was no reason to be changing the nodename.
>>
>> Even if we did, it seems like a hack at best.
>>
>>>  It seems this may not have been the correct thing to do.
>>>
>>>  Please read William's comment #6 and advise.
>>
>> The correct thing to do here would be to infact not
>> copy /etc/nodename and /etc/inet/hosts from the
>> running system but to get it directly from IPS. And,
>> then alter it's contents as part of ict_set_host_node_name().
>>
>> Alok
> 
> 
> William,
> 
> I just spoke to Alok about this. (Thank you Alok.)
> 
> A summary:
> 
> /etc/inet/hosts is pull from pkg SUNWcs. So the code in ICT should work 
> just fine for this file.
> 
> /etc/nodename is put into the microroot (boot_archive) by DC in file: 
> cmd/distro_const/utils/bootroot_configure
> 
> # Set nodename to opensolaris
> echo "opensolaris" > $BR_BUILD/etc/nodename
> 
> Basically the DC creates the file then for GUI installs ICT modifies the 
> file.
> 
> The solution Alok and I came up with is to simply have ICT create the 
> file for both AI and GUI installs if a hostname is passed down to ICT, 
> which would happen if the user provided one.
> 
> So the following small change is needed in ICT:
> -----------------------------------------------
> 
> /usr/src/lib/libict/ict.c
> 
> Change from:
> ------------
>         /*
>          * Process nodename file.
>          *
>          * If transfer mode is IPS simply copy the existing file.
>          */
>         if (transfer_mode == OM_IPS_TRANSFER) {
>                 (void) snprintf(cmd, sizeof (cmd), "/bin/cp %s %s%s",
>                     NODENAME, target, NODENAME);
>                 redirect = B_TRUE;
>         } else {
>                 (void) snprintf(cmd, sizeof (cmd),
>                     "/bin/sed -e 's/%s/%s/g' %s >%s%s",
>                     DEFAULT_HOSTNAME, hostname, NODENAME, target, 
> NODENAME);
>                 redirect = B_FALSE;
>         }
> 
> Change To:
> ----------
>         /*
>          * Process nodename file.
>          *
>          * If transfer mode is IPS simply copy the existing file.
>          */
>         (void) snprintf(cmd, sizeof (cmd), "/bin/echo %s > %s%s",
>             hostname, target, NODENAME);
>         redirect = B_FALSE;
> 
> 
> 
> 
> Joe
> _______________________________________________
> caiman-discuss mailing list
> caiman-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss


Reply via email to