- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: rc3.d script preventing server from rebooting ...
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
11-18-2003 03:37 AM
11-18-2003 03:37 AM
rc3.d script preventing server from rebooting ?
Following script was created few months ago to add some kind of date stamp in dmesg output and runs fine.
Looping program is as follow :
#!/bin/ksh
while true
/usr/bin/sleep 60
/usr/bin/date
/usr/sbin/dmesg -
echo
done >> /var/adm/syslog/dated_dmesg.log
What happened yesterday is that this script in rc3.d would prevent server from booting to
default inittab level 3.
Why does the script cause server not to at least go to run level 1 and 2 (enabling network access).
Server reboot process would completely freeze
the server.
Solution was to boot single user, then init 2 then remove script in rc3.d and manually run init 3.
I presume I have to run script in nohup mode now but still I don't understand why server was not even running lower 1 and 2 rc levels.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 03:58 AM
11-18-2003 03:58 AM
Re: rc3.d script preventing server from rebooting ?
I think, you have to run the script in background. So put the lines in another file and call it from the script in rc3.d
like
nohup timestamp > /dev/null 2>&1
There is also a do missing.
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 04:03 AM
11-18-2003 04:03 AM
Re: rc3.d script preventing server from rebooting ?
This is something you would be better off running as a cron job on a schedule.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 04:37 AM
11-18-2003 04:37 AM
Re: rc3.d script preventing server from rebooting ?
The admin who wrote it is probably more familiar with other flavors of Unix. Remove the file completely and put this one line in crontab:
05,10,15,20,25,30,35,40,45,50,55 * * * * /sbin/dmesg - >> /var/adm/dmesg.log
Now to emulate what the script was doing, you could change the entry to:
* * * * * /sbin/dmesg - >> /var/adm/dmesg.log
so that dmesg runs every minute but I find that 5 mins is a reasonably small interval. Note that in the script above, your dated_dmesg.log file will have hundreds of dates but no text since dmesg is mostly silent. However, dmesg - already sends a date (mon, day, hr:min) with the messages but only when there is something to display. Thus, dmesg - already timestamps the output (dmesg without - does not).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 04:43 AM
11-18-2003 04:43 AM
Re: rc3.d script preventing server from rebooting ?
In particular, they should be able to process the arguments start|stop|start_msg|stop_mesg.
rc calls all relevant scripts with the argument 'start_msg' to get the list of actions that it will perform at bootup.
I suspect that rc called
You must either amend your script to accept those arguments or (better in my opinion) scedule it to run every minute from cron.
Regards,
John