Hi John,

please see my comments below.

Thank you,
Jan


installadm.h
------------

#define HTTPDCONF               "/var/installadm/ai-webserver/ai-httpd.conf"

With this fix, we will have 4 places when this path is defined:

cmd/installadm/setup-image.sh
cmd/installadm/svc-install-server
cmd/installadm/installadm.h
cmd/installadm/installadm-common.sh

Thinking about how we might consolidate it, I am wondering if
we could

* specify that path as SMF property of install/server SMF service
* read that path from SMF property instead of having it hardcoded
   at several places
* deliver appropriate SMF profile to initialize that property
   when installadm(1M) tools are installed - profile might look like

<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type="profile" name="default">
     <service name="system/install/server" version="1" type="service">
         <instance name="default" enabled="false">
             <property_group name="http" type="application">
                 <propval name="httpd-conf-path" type="astring" 
value="/var/installadm/ai-webserver/ai-httpd.conf"/>
             </property_group>
         <instance>
     </service>
</service_bundle>


installadm_util.c
-----------------

520, 523
   - for better readability, could be 'goto'
     replaced with 'return(port)' ?

530 - It seems like 'while' loop is redundant, since we are searching
for the first occurence of 'Listen' substring.

installadm.c
------------

since 'port' is now type of 'int' (not 'string'),
format string should be changed accordingly:


857 "http://%s:%s/%s";, server_ip, port,
->
857 "http://%s:%d/%s";, server_ip, port,


860 "http://%s:%s%s";, server_ip, port,
->
860 "http://%s:%d%s";, server_ip, port,



On 02/26/10 01:01 AM, John Fischer wrote:
> All,
>
> Here is another webrev that I need reviewed:
>
>     http://cr.opensolaris.org/~johnfisc/6047-http_port/
>
> This is for:
>
>     http://defect.opensolaris.org/bz/show_bug.cgi?id=6047
>
> Essentially we used to hard code the port number to be
> 5555.  This code retrieves the port number from the
> ai-httpd.conf file.  The code defaults to 5555 if the
> port number can not be retrieved.
>
> Thanks,
>
> John
> _______________________________________________
> caiman-discuss mailing list
> caiman-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to