- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to display message of service being loaded...
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
Forums
Discussions
Discussions
Discussions
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
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
06-06-2003 07:01 AM
06-06-2003 07:01 AM
I have created a Script called S942sysperm.sh and I have placed it in rc3.d
The script executes no problem, it's just that I was wondering how to have a message displayed when it's executing. You know where it's going through all it's rc's (rc1.d rc2.d rc3.d) and you see OK, DONE, OK done, FAIL... Well, because my script is there you don't see anything just what's below
[ ] OK/DONE
If you guys need more explaination, please do not hesitate to let me know.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2003 07:06 AM
06-06-2003 07:06 AM
Re: How to display message of service being loaded with rc3.d ??
actually, if you look in /sbin/init.d, you'll find a script called template that actually includes a start_msg and a stop_msg portion in the script. It is those message that you see at boot up and shut down of your server.
I would also recommend following HP standards in placing your script in /sbin/init.d and linking your script in the rc3.d, or other levels.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2003 07:09 AM
06-06-2003 07:09 AM
Re: How to display message of service being loaded with rc3.d ??
In addition to the stand "start" and "stop" code sections, HP-UX adds "start_msg" and "stop_msg" sections and that is were your messages go. Pay attention to the return code values as descripbed in the template file for the "OK" and "FAIL" messages.
The other HP-UX convention is to have a config file in /etc/rc.config.d that is used to setup any needed variables. Typically a variable is set to 1 to allow the start/stop actions to occur and 0 to ignore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2003 07:10 AM
06-06-2003 07:10 AM
Re: How to display message of service being loaded with rc3.d ??
Firts off you should place the script in /sbin/init.d & create a link from /sbin/rc3.d to the file in /sbin/init.d. You should also have a stop function in this script & link from /sbin/rc2.d to the same script.
Now to the question:
Normally you'll have a case statement in the script with four parts - EX:
case "$1" in
start_msg)
echo "Starting whatever daemon"
;;
stop_msg)
echo "Stopping whatever daemon"
;;
'start')
/command/to/start/the/daemon
;;
'stop')
/command/to/stop/the/daemon
Take a look at some of the scripts already in /sbin/init.d & you'll get a feel for this. It's not that difficult.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2003 07:16 AM
06-06-2003 07:16 AM
Re: How to display message of service being loaded with rc3.d ??
In addition, the /sbin/rc & /sbin/rc.utils script interface to the startup checklist on the console.
rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2003 07:17 AM
06-06-2003 07:17 AM
Re: How to display message of service being loaded with rc3.d ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2003 11:36 AM
06-06-2003 11:36 AM
SolutionAdd to your script in the case part:
start_msg)
echo "THE WANTED START MSG"
;;
stop_msg)
echo "THE WANTED STOP MSG"
;;
And you will see it will work, you can check
by running: S942sysperm.sh start_msg
you will see the start msg
The OK/DONE/FAIL are depend on the return value that return by your script.
Caesar