- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: startup script works fine from command promt, ...
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
03-14-2002 09:16 AM
03-14-2002 09:16 AM
startup script works fine from command promt, but nor during boot
I have a script and the links, I need, to start Radius Server during boot.
The script works, but the Server doesn't start:
-> /etc/rc.log:
Starting NavisRadius
Output from "/sbin/rc3.d/S400NavisRadius start":
----------------------------
Starting the RMI Registry Server...
The RMI Registry Server failed to start.
Starting the State Server...
The State Server failed to start.
Starting the Radius Server.....
It does with the same command at the prompt:
$/sbin/rc3.d/S400NavisRadius start
Starting the RMI Registry Server...
The RMI Registry Server has been started.
Starting the State Server...
The State Server has been started.
Starting ....
Anybody any idea? The Script ist attached.
Thanks
Gisela
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2002 09:25 AM
03-14-2002 09:25 AM
Re: startup script works fine from command promt, but nor during boot
'start')
nohup /opt/NavisRadius/bin/nr start
;;
'stop')
nohup /opt/NavisRadius/bin/nr stop
;;
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2002 09:29 AM
03-14-2002 09:29 AM
Re: startup script works fine from command promt, but nor during boot
Why not use the 'template' script in /sbin/init.d and stick in your commands there ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2002 09:41 AM
03-14-2002 09:41 AM
Re: startup script works fine from command promt, but nor during boot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2002 09:47 AM
03-14-2002 09:47 AM
Re: startup script works fine from command promt, but nor during boot
you could do:
set -x
as the first line after setting the shell
then see what you get in the rc.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 04:43 AM
03-15-2002 04:43 AM
Re: startup script works fine from command promt, but nor during boot
Iput set -x in the script and now I see the the executed commands in the /etc/rc.log, there is no problem.
The part of the log ist attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 04:55 AM
03-15-2002 04:55 AM
Re: startup script works fine from command promt, but nor during boot
When you run the "/sbin/rc3.d/S400NavisRadius start" manually, does the script *finish*, i.e. do you get a prompt?
In any case, change the "/opt/NavisRadius/bin/nr start" (and "... stop") lines to:
/usr/bin/nohup /opt/NavisRadius/bin/nr start &1 >>/tmp/NavisRadius.log &
sleep 10
Please carefully note *all* the 'funny' characters in the above command. They are there for a purpose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 05:12 AM
03-15-2002 05:12 AM
Re: startup script works fine from command promt, but nor during boot
Your startupscript in each runlevel has a certain sequence number. Yours is 400 (S400xxxxx).
It seems that some other programs are loaded between the S400 startup and the actual loginprompt. Try to move your script to the end of the sequence: like S400xxxx to S999xxxx.
If this solves your problem, it was just a matter of the startup-sequence.
Succes, Rgds, Ceesjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 07:06 AM
03-15-2002 07:06 AM
Re: startup script works fine from command promt, but nor during boot
If so check it out and make sure it is set to start at boot.
Start=1
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 08:23 AM
03-15-2002 08:23 AM
Re: startup script works fine from command promt, but nor during boot
Look at the lines below from your script.I just copy and pasted these line and added line number for easy explanation.
1 'start')
2 /opt/NavisRadius/bin/nr start
3 ;;
4 'stop')
5 /opt/NavisRadius/bin/nr stop
6 ;;
MAke changes as below and your script should work then.
1. In line 2 remove the start argument at last.
so your new line 2 will become as below
/opt/NavisRadius/bin/nr
2. In line 5 remove the stop argument
your new line 5 will become as below
/opt/NavisRadius/bin/nr
I think you are all set now.
check the script using following command.
#/sbin/sh -xv /sbin/init.d/SCRIPTNAME start
#/sbin/sh -xv /sbin/init.d/SCRIPTNAME stop
This will give you any errors and exit status of your script. If it is 0 you are done.
Thanks,
-Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 08:27 AM
03-15-2002 08:27 AM
Re: startup script works fine from command promt, but nor during boot
for that you have to delete the link and re establish it.
-Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 01:19 PM
03-15-2002 01:19 PM
Re: startup script works fine from command promt, but nor during boot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 02:03 PM
03-15-2002 02:03 PM
Re: startup script works fine from command promt, but nor during boot
I have a similar problem with a script that won't run at boot. The vendor said it can't be done (but what do they know?).
My application is the server side of a client / server product. I believe my problem is rpc related but I don't know.
Not finding a solution, I came up with a work-around. Instead of trying to start my application at boot, I would schedule an "at" job to run the start script 5 minutes after booting. Works like a charm.
The attached is a scrubbed copy of my /sbin/rc3.d script. I have it as S999... so that it is the last rc script to run when booting (into normal run level 3).
It may not help you but try it if you like. If so, you need to verify root is in /var/adm/cron/at.allow.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 03:36 PM
03-15-2002 03:36 PM
Re: startup script works fine from command promt, but nor during boot
Thanks.
-Piyush.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2002 06:30 PM
03-15-2002 06:30 PM
Re: startup script works fine from command promt, but nor during boot
Try to start it with the same userid that can run the script from the command prompt,
'start')
/opt/NavisRadius/bin/nr start
;;
Change this to,
'start')
su - user_name -c "/opt/NavisRadius/bin/nr start"
;;
Or you can also check if this script needs a prerequisite, like for example, it may need that some other appliction / database should be up before this script can run properly.
We have an application which starts in the startup script and needs the oracle database to be available. If it does not find the oracle database available, it shut's itself down withour starting properly. The same starts properly if it finds the oracle database is up.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2002 09:14 AM
03-18-2002 09:14 AM
Re: startup script works fine from command promt, but nor during boot
I tried everything, but it still doesn't work. I found a problem with the path and solved that - now I get no errors anymore, but it just does't start.
The suggestion of Darrell Allens with the "at" job seems to be a very good idea. How do I schedule
that shortly after boot?
Thanks
Gisela
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2002 09:43 AM
03-18-2002 09:43 AM
Re: startup script works fine from command promt, but nor during boot
Here's a brief explanation of my previously attached script.
In the "start" case statement, I check to see if the script is being executed during boot by using ps to see if /sbin/rc is running. If /sbin/rc is running, I use the "echo ... | at + 5 minutes" command to schedule the "at" job for 5 minutes in the future. I then exit.
If /sbin/rc is not running, I continue the script and run the start.xxx script.
Since this is the last rc script I have defined in rc3.d, I know that the system should be completely booted in the next few seconds. I chose 5 minutes as my delay simply because this app didn't have to be available immediately upon booting.
So basically the only part I added to allow this to schedule an "at" job instead of running immediately was:
# If called at boot time schedule an at job because the XXX
# daemons start then die at boot time
res=`/usr/bin/ps -ef | grep "/sbin/rc" | grep -v grep`
if [ X"$res" != X ]
then
echo "/xxx/start.xxx >>/var/local/logs/xxx.out 2>&1" | at now + 5 minutes
exit
fi
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2002 06:47 AM
03-19-2002 06:47 AM
Re: startup script works fine from command promt, but nor during boot
I changed my script with the "at" command and it works perfectly!
Gisela