- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cntl script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 12:41 AM
тАО03-19-2010 12:41 AM
cntl script
i need to put two scripts under the function customer_defined_run_cmds
i have two scripts each one should run with different user
one begin with su - ora (user ora ) and the other after the first one su -esc (user esc)
but when finishing the first script , it could ask for the password of the second user ,
how can i eliminate the need to ask for the password of esc user
could the command exit between these two scripts do this task ?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 12:48 AM
тАО03-19-2010 12:48 AM
Re: cntl script
uncomment the customized script and try tu start the cluster, and them execute the scripts manually.
if you run as the root the second script from command line, is the password required ???
because id you are root, and use su - the password will be ignored.
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 01:12 AM
тАО03-19-2010 01:12 AM
Re: cntl script
su - user1 -c "/script1"
su - user2 -c "/script2"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 02:16 AM
тАО03-19-2010 02:16 AM
Re: cntl script
but what i want is to integrate them in the package cntl file of the cluster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2010 06:10 AM
тАО03-19-2010 06:10 AM
Re: cntl script
Edi you pakage control script in oredr to define a new function pkg_start.sh
function customer_defined_run_cmds
{
/etc/cmcluster/pkg_start.sh
test_return 51
}
/etc/cmcluster/pkg_start.sh will run as root, so su will not ask for a password.
(Of course you can use any path you would like, not only /etc/cmcluster)
Edit pkg_start.sh to run the commands as required:
su - ora -c "/path_to/youscript1.sh"
su - esc -c "/path_to/youscript2.sh"
Horia.
Horia.