- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Startup my own program in init.d directory
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
05-09-2004 09:04 PM
05-09-2004 09:04 PM
I put my own program in /sbin/init.d/ so that it could start up automatically when the server reboot. But it failed to start.
What is the step of setup correctly to start up? The model is HP A500 with 11.00.
Thx
Alex
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 09:13 PM
05-09-2004 09:13 PM
Re: Startup my own program in init.d directory
Did you create a link in the /sbin/rc3.d ?
example below.
:/sbin/init.d# ls -la lis*
-r-xr-xr-x 1 bin bin 3249 Jun 22 2000 listener
Start script
# ls -la /sbin/rc3.d | grep lis
lrwxrwxrwx 1 root sys 21 Jun 22 2000 S950listener.rc -> /sbin/init.d/listener
Kill script
# ls -la /sbin/rc2.d | grep lis
lrwxrwxrwx 1 root sys 21 Jun 22 2000 K050listener.rc -> /sbin/init.d/listener
HTH,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 09:14 PM
05-09-2004 09:14 PM
Re: Startup my own program in init.d directory
Have you done the link in the rc3d directory ?
for example, the link must have this syntax :
S999program -> ../init.d/program
for the startup and,
K999program -> ../init.d/program for the stop.
The number is use to give the order in the statup/shutdown sequence.
Johan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 09:14 PM
05-09-2004 09:14 PM
Re: Startup my own program in init.d directory
If you want the script to be executed during startup you need to create a symbilic link to it from /etc/rc3.d ( run level 3) staring with a Kapital S folowed by a number ( start order) Ss
cd /sbin/rc3.d
ln -s /sbin/init.d/
and to stop it when the server halts do the same, just replace the S (start) with a K (kill) folowed by a number and a name. Make sure the number is the opposite of the start number. ( e.g. S99 = K01 ....)
Regards,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 09:15 PM
05-09-2004 09:15 PM
Re: Startup my own program in init.d directory
Made an error in prev. post.
The ln -s soure destionation, so it is the opposite.
Regards,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 09:37 PM
05-09-2004 09:37 PM
Re: Startup my own program in init.d directory
check the following doc:
A3937045 - SYS ADM: Adding a custom script to rc process
HTH.
Best regards,
Ettore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 09:55 PM
05-09-2004 09:55 PM
Re: Startup my own program in init.d directory
correct? I can't get it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 09:59 PM
05-09-2004 09:59 PM
Re: Startup my own program in init.d directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 10:04 PM
05-09-2004 10:04 PM
Re: Startup my own program in init.d directory
have you a support contract with HP?
Only with that you can see knowledge base of ITRC.
Anyway can you past the procedure that you used to create your rc script?
Best regards,
Ettore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 10:44 PM
05-09-2004 10:44 PM
Re: Startup my own program in init.d directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2004 10:48 PM
05-09-2004 10:48 PM
Re: Startup my own program in init.d directory
could you post
# ls -la /sbin/rc3.d/your_start_link
# ls -la /sbin/rc2.d/your_kill_link
# ls -la /sbin/init.d/your_script
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 01:19 PM
05-10-2004 01:19 PM
Re: Startup my own program in init.d directory
Here are my created link and my script:
/sbin/init.d # ls -l
-rwxrwxrwx 1 root sys 73 May 10 18:02 rund
-rwxrwxr-x 1 root sys 6132 May 10 18:02 rsic.conf.henry
/sbin/rc3.d # ls -l
lrwxrwxrwx 1 root sys 17 Oct 15 18:11 S666rsi -> /sbin/init.d/rund
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2004 08:53 PM
05-10-2004 08:53 PM
Solutionthe rsic.conf.henry file, is that a config file for your script?
If so, is the path to that config file given?
If not, the ling in the /sbin/rc3.d/ directory cannot find it.
Have you tried starting your script by starting the link in /sbin/rc3.d (not during startup, but while the system is up)
This might result in an error which might help you solving this problem.
Don't forget to assigng points to all those people trying to help you...
regards,
Bart
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 01:50 AM
05-11-2004 01:50 AM
Re: Startup my own program in init.d directory
Make sure you have the PATH variable in your script set so that all executables within your script are accessable. The default PATH variable is restricted.
Regards,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 02:02 AM
05-11-2004 02:02 AM
Re: Startup my own program in init.d directory
I've attached an example...
Also, do a man rc
Also - what's your default run level?
grep initdefault /etc/inittab
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 06:51 AM
05-11-2004 06:51 AM
Re: Startup my own program in init.d directory
Try running your rund script by hand as root.
rund start_msg
and
rund start
some snipets from oracle's start file
case $1 in
'start_msg')
# Emit a _short_ message relating to running this script with
# the "start" argument; this message appears as part of the checklist.
echo "Starting Oracle"
;;
'start')
# source the system configuration variables
if [ -f /etc/rc.config.d/oracle ] ; then
. /etc/rc.config.d/oracle
else
echo "ERROR: /etc/rc.config.d/oracle defaults file MISSING"
fi
#rting Oracle"
Check to see if this script is allowed to run...
if [ ${ORACLE_START} != 1 ]; then
rval=2
else
su - oracle -c dbstart
:
fi
;;
Running it by hand as root might give you a clue as to what the script is upset about.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2004 08:10 PM
05-12-2004 08:10 PM
Re: Startup my own program in init.d directory
I have solved it out
Cheers
Alex