This is how it works for me.

I have created a dummy service called site/a

# svccfg -s svc:/site/a setenv CATALINA_OPTS \"-Xms256m -Xmx256m\"
# svccfg -s svc:/site/a setprop start/exec = astring: env
# svcadm refresh svc:/site/a
# svcadm restart svc:/site/a
# tail /var/svc/log/site-a:default.log
[ Feb 21 18:53:48 Executing stop method (null) ]
[ Feb 21 18:53:48 Executing start method ("env") ]
CATALINA_OPTS="-Xms256m -Xmx256m"
PATH=/usr/sbin:/usr/bin
SMF_FMRI=svc:/site/a:default
SMF_METHOD=env
SMF_RESTARTER=svc:/system/svc/restarter:default
SMF_ZONENAME=global
TZ=Europe/Paris
[ Feb 21 18:53:48 Method "start" exited with status 0 ]
#

The new env variable isn't ignored.

-- Renaud





-------- Original Message  --------
Subject: [smf-discuss] Re: Passing multiple startup parameters via svccfg
From: Chris Jackson <cjack...@data-integrity.net>
To: smf-discuss at opensolaris.org
Date: Tue Feb 20 2007 21:48:09 GMT+0100 (CET)

> --------------
> 
> You should use the 'setenv' subcommand of svccfg(1M).
> 
> eg.
> 
> svccfg -s setenv CATALINA_OPTS "Xms256m -Xmx256m"
> svccfg -s setenv JAVA_OPTS -Dcom.sun.management.jmxremote
> svccfg -s setenv JAVA_HOME /usr/java/jre
> 
> -- Renaud
> ---------------
> 
> This doesn't work for me. When I use svccfg -s setenv CATALINA_OPTS "Xms256m 
> -Xmx256m" the properties as displayed via svccfg's listprop are so:
> 
> [b]method_context              framework
> method_context/environment  astring  "CATALINA_OPTS=\"-Xms256m -Xmx256m\""[/b]
> 
> This is ignored when svcadm restarts the tomcat process. I've gone in via 
> editprop and removed the backslashes and extra quotes so it looks like this:
> 
> [b]method_context              framework
> method_context/environment  astring  "CATALINA_OPTS=-Xms256m -Xmx256m"[/b]
> 
> but that parameter seems to be ignored during startup and restart.
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> smf-discuss mailing list
> smf-discuss at opensolaris.org


Reply via email to