Read more
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- Command execution at system startup
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
Command execution at system startup
SOLVED- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-30-2009 07:46 AM
04-30-2009 07:46 AM
I need to execute a command which starts a license deamon,as another user on startup of my HP UX system. How can i acheive this?
#uname -a
HP-UX unix1 B.11.11 U 9000/800 3654209165 unlimited-user license
Thanks in Advance,
Din
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-30-2009 07:53 AM
04-30-2009 07:53 AM
Re: Command execution at system startup
Re: Command execution at system startup
You can setup a statup 'rc' script. The manpages for 'rc(1M') and/or this (still) applicable whitepaper provide all the details you need:
http://docs.hp.com/en/934/startup.pdf
You can copy the '/sbin/init.d/template' file appropriately to form the basis for your script.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-30-2009 07:59 AM
04-30-2009 07:59 AM
Re: Command execution at system startup
Re: Command execution at system startup
Create a traditional script with something like
PATH=...
SHLIB_PATH=...
export PATH SHLIB_PATH
start(){
su user -c command_to_start_daemon
}
...
case "$1" in
start)
start;;
stop) the function for stopping/kill
;;
*) echo $"Usage :$0 (start|stop)
exit 1
;;
esac
and put it script on rc directory.
Hope it helps
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-30-2009 07:59 AM
04-30-2009 07:59 AM
SolutionThe easiest is to create a start/stop srcipt.
/sbin/init.d/template
Above is an example of a start/stop script, cp it your desired file name and customize the file.
You can use the "su - username -c /path/to_your_command" to execute as a specific user.
Create links to this script from the /etc/rc3.d where S is start and K is stop.
rc3 scripts will start at multiuser boot.
Hope this helps,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-30-2009 09:24 AM
04-30-2009 09:24 AM
Re: Command execution at system startup
Re: Command execution at system startup
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-30-2009 10:35 AM
04-30-2009 10:35 AM
Re: Command execution at system startup
Re: Command execution at system startup
I got an idea on this issue
Regards,
Din
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-30-2009 10:35 AM
04-30-2009 10:35 AM
Re: Command execution at system startup
Re: Command execution at system startup
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP