- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: startup scripts
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
07-23-2006 05:51 PM
07-23-2006 05:51 PM
i have posted a message regarding application startup scripts couple of weeks ago and got very good useful responses . With that ..i would like to discuss more on that.Actually i do have application start up script located at /sbin/init.d and appropriate link at /sbin/rc3.d in order to start up a application while system boots up.For some reason the app is not starting up while system boots up.I had to manually start up the application by running the script located at /sbin/init.d after system booted.Any idea wether it is an app problem or system related problem.I checked with permissions and ownerships ..of the script ,it looks everything is set up as it should be.Please advice.Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2006 06:24 PM
07-23-2006 06:24 PM
SolutionIf that works recheck your symlink.
The name it should point to in the runlevel subdir must begin with an S for the startup, and a K for the shutdown.
Also check if your script is setting some control variables like START_MY_APP=1 which are usually placed in /etc/rc.config.d/myscriptconf
Then you should check /etc/rc.log after a runlevel change to see what output and return code your script has produced.
You could temporarily set -x in your script to enhance debugging.
Your script must comply with the return code recommendations as commented in the /etc/init.d/template file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2006 07:20 PM
07-23-2006 07:20 PM
Re: startup scripts
Where is difference of running script at startup and in root shell. Unlike root shell, where are no difined environment variables during startup. So full paths and all necessary variables shold be used in the script's body. May be that's the reason.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2006 09:36 PM
07-23-2006 09:36 PM
Re: startup scripts
I would also advise to check the /etc/rc.log file, which may give you a clue on why your script is not being executed/fails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2006 11:35 PM
07-23-2006 11:35 PM
Re: startup scripts
I'd begin by examining the PATH variable in your startup script and particularly any environmental variables that you "normally" export to your login environment when your login profile runs. None of your '.profile' environmental variable will be present unless you have made provisions for them.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2006 11:54 PM
07-23-2006 11:54 PM
Re: startup scripts
1) see what variables it (and the scripts it calls) is using.
2) type env and see what your shell is using
3) set these values into your script
or
ensure that all paths are fully qualified in your script - and the scripts it calls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2006 04:41 AM
07-24-2006 04:41 AM
Re: startup scripts
thanks for the responses. when i checked on rc.log file..i have not seen any error messgae or startup message for the particular script. it looks like system has igored the script.and also the higher numbered system startup scripts like dtlogin , etc starting from S901.I'm sure it is not the limitation.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2006 04:44 AM
07-24-2006 04:44 AM
Re: startup scripts
1) running the script from the link works fine? ie /sbin/rc3.d/scriptlink
2) you're at the correct run level for the script? who -r will tell you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2006 05:03 AM
07-24-2006 05:03 AM
Re: startup scripts
i'm able to see the logs. the rc.log.old files has the old+current reboot messages.Is that true.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2006 05:20 AM
07-24-2006 05:20 AM
Re: startup scripts
Yes, 'etc/rc.log' has the startup messages from the last boot, while '/etc/rc.log.old' has the shutdown messages from the last reboot *plus* the previous boot's startup.
As noted, make sure that you transitted the runlevel you expected. That is, if your link is in '/sbin/rc3.d' then you must be at runlevel three (3) or greater to have started your script.
# who -r
...will tell you your current run-level.
Regards!
...JRF...