Hi Robert, this problem was exactly one of the reason we created the GDS creation template long ago.
Please download the template and the presentation from http://opensolaris.org/os/community/ha-clusters/ohac/GDS-template/ Here you get your newtask command assembled by the srm_function. It extracts the project from its resource or resource group property. You still have to define the extra script. If you want a living example have a look at the postgres agent. I know not optimal, but it provides the additional scripting you need. BTW I would not use su -, because one could incorporate a read statement in the users profile, which would hang your script. I would use su instead and set necessary variables with env. Detlef Robert Milkowski wrote: > Hello ha-clusters-discuss, > > Currently if I want a given program to be started by GDS from a > specific user other than root I need to create another script > and then do su - user -c start_script. Now the problem is that > the script will end up with default project for that user - but > I have several projects and depending on resource I would like > to end up in a specific project, so I can't make a default one a > different project. > > Ideally if one could provide a context for start and stop > commands for GDS where one could specify a user/group the script > is supposed to run from it would simplify some deployment and > fix the project issue. Even better if one could specify more > options in a context of stop/start scripts like set of > privileges, etc. similar to what we can do with SMF. > > I know one could workaround it by using newtask inside a script > - but it's kind of ugly and requires more scripting that needed > > > ps. I know I could use SMF but I don't want to in this case > > > -- ***************************************************************************** Detlef Ulherr Staff Engineer Tel: (++49 6103) 752-248 Availability Engineering Fax: (++49 6103) 752-167 Sun Microsystems GmbH Amperestr. 6 mailto:detlef.ulherr at sun.com 63225 Langen http://www.sun.de/ ***************************************************************************** Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering *****************************************************************************