In doing some testing I found that the following doesn't work: <pre> <exec_method name='start' type='method' exec='./testing %m %s %i' timeout_seconds='60'> <method_context working_directory="/home/benr/svn/smf/test/" /> </exec_method> </pre>
By all rights it should. The trick to getting it working is to specify a user and group via method_credential. Thus, the following _does_ work: <pre> <exec_method name='start' type='method' exec='./testing %m %s %i' timeout_seconds='60'> <method_context working_directory="/home/benr/svn/smf/test/"> <method_credential user="root" group="staff"/> </method_context> </exec_method> </pre> This seems like a bug to me. Nothing in the DTD or man pages suggests to me that I need to specify the user (beyond any obvious permissions issues potential) for a working directory to be set. The existing bugs that I see are fairly vague, so I'm not sure if this is covered by one of them or not. For reference, I'm doing this testing by calling the following transient method: <pre> # Include SMF convience library: . /lib/svc/share/smf_include.sh # This script is invoked thusly: # testing %m %s %i echo "Method: ${1}" echo "Service: ${2}" echo "Instance: ${3}" echo "PWD is: $PWD" echo "HOME is: $HOME" echo "UID is: $UID" env exit $SMF_EXIT_OK </pre> Thanks. benr. This message posted from opensolaris.org