- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- startup script not working
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
Discussions
Discussions
Discussions
Forums
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
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
тАО01-20-2004 06:15 AM
тАО01-20-2004 06:15 AM
I have a startup script I attempted to use over the weekend. I made the links to the exe in rc3.d and rc2.d for S and K symlinks. The file is executable...
However, it didnt start up upon a reboot. Must I have the exe in /sbin? b/c of the system reading into memory the startup scripts at boot time before the system has mounted my other filesystems?
Here is what I have... I think I just answered my own question! hehe...
root:/root
#ll /appl/finapps/applmgr/local/bin/run_Xvfb.sh
-rwxr-xr-x 1 applmgr fin 206 Jan 15 13:17 /appl/finapps/applmgr/
local/bin/run_Xvfb.sh
root:/var/adm/sa
# ll /sbin/rc3.d/S888run_Xvfb.sh
lrwx--x--x 1 root sys 43 Jan 15 14:26 /sbin/rc3.d/S888run_Xv
fb.sh -> /appl/finapps/applmgr/local/bin/run_Xvfb.sh
root:/var/adm/sa
# ll /sbin/rc2.d/K888run_Xvfb.sh
lrwx--x--x 1 root sys 43 Jan 15 14:27 /sbin/rc2.d/K888run_Xv
fb.sh -> /appl/finapps/applmgr/local/bin/run_Xvfb.sh
I am guessing I need to do:
mv /appl/finapps/applmgr/local/bin/run_Xvfb.sh /sbin/init.d/run_Xvfb.sh
And relink my S and K scripts...
PS. I went ahead and posted this for anyone else who may be wondering how to do this...
I had to talk this out to get it right. I just haven't had to do this in a long while, so my brain is in recovery mode!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 06:20 AM
тАО01-20-2004 06:20 AM
Re: startup script not working
Give yourself a bunny - you've got it!!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 06:23 AM
тАО01-20-2004 06:23 AM
Re: startup script not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 06:34 AM
тАО01-20-2004 06:34 AM
Re: startup script not working
I will have my DBA modify his script...for stop/start input.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 06:38 AM
тАО01-20-2004 06:38 AM
Re: startup script not working
A very typical problem occurs with
su - oracle ... commands
instead of su oracle ... command. The "-" causes su to execute oracle's .profile which contains commands like tput, stty, tabs, ... that will probably hang when not attached to a terminal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 06:49 AM
тАО01-20-2004 06:49 AM
SolutionDon't forget to setup a config file to easily toggle auto-start on/off
Create a file in /etc/rc.config.d & name it Xvfbconf
In it place
XVFB_START=1 #for auto-start
XVFB_START_COMMAND="/appl/finapps/applmgr/local/bin/run_Xvfb.sh"
Then place logic in the /sbin/init.d/run_Xvfb.sh file
like the following examples:
if [ -f /etc/rc.config.d/Xvfbconf ]
then . /etc/rc.config.d/Xvfbconf
else echo "ERROR /etc/rc.config.d/Xvfbconf file MISSING"
fi
In the 'start') section add the following to check the conf value & check whether the start script is executable:
if ["$XVFB_START != 1 ]
then rval=2
else
if [-x /appl/finapps/applmgr/local/bin/run_Xvfb.sh ]
then
if [ "$XVFB_START_COMMAND != "" ]
then eval $XVFB_START_COMMAND
else /appl/finapps/applmgr/local/bin/run_Xvfb.sh
fi
fi
fi
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 06:52 AM
тАО01-20-2004 06:52 AM
Re: startup script not working
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 07:00 AM
тАО01-20-2004 07:00 AM
Re: startup script not working
I just saw your post RE not having atrt/stop/start_msg/stop_msg sections & I *highly* recommend you do add these.
Have whomever's writing it just use /sbin/init.d/template as the actual template & just fill in what you need & save it with appropriate filename.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 07:10 AM
тАО01-20-2004 07:10 AM
Re: startup script not working
I am editing it now.
My question is about the start section... I have this so far...
# cat /sbin/init.d/run_Xvfb.sh
#!/bin/ksh
# setup virtual x server for Oracle ERP 11i graphical display
# Read /etc/rc.config.d/Xvfbconf for start toggle upon boot time.
# XVFB_START=1 is for start... XVFB_START=0 is for dont start
if [ -f /etc/rc.config.d/Xvfbconf ]
then . /etc/rc.config.d/Xvfbconf
else echo "ERROR /etc/rc.config.d/Xvfbconf file MISSING"
fi
PATH=/usr/sbin:/usr/bin:/sbin; export PATH
mode=$1
case "$mode" in
'start_msg')
echo "Start Xvfb"
exit 0
;;
'stop_msg')
echo "Stop Xvfb"
exit 0
;;
'start')
if ["$XVFB_START != 1 ]
then rval=2
else
if [-x /sbin/init.d/run_Xvfb.sh ]
then
if [ "$XVFB_START_COMMAND != "" ]
then eval $XVFB_START_COMMAND
else /sbin/init.d/run_Xvfb.sh
fi
fi
fi
nohup /usr/bin/X11/Xvfb :4 -screen 0 1024x800x8 -pn -fp /usr/lib/X11/fon
ts/misc -sp /etc/X11/SecurityPolicy &
;;
'stop')
PIDS=`ps -aef |grep -v grep|grep Xvfb |awk '{ print $2 }'`
kill $PIDS
;;
*)
echo "Usage: \$0 { start | stop }"
exit 1
;;
esac
exit 0
Where do I put my command line in there? is it fine at the end of the start section? or is that bad coding?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 07:15 AM
тАО01-20-2004 07:15 AM
Re: startup script not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 07:30 AM
тАО01-20-2004 07:30 AM
Re: startup script not working
Thanks for everyone's help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 07:46 AM
тАО01-20-2004 07:46 AM
Re: startup script not working
Actual startup command follows the final else in that script. I guess I didn't understand what your actual startup command was - it wasn't in the org post. So change the conf file as well as all calls to the actual startup command to your actual startup
I also noticed a missing double quote in the test for whether the start command is null - the var needs an ending double quote. The double double-quote is the actual null.
The template does not have this error & they keep the fi with each if-then section - I just put them all at the end & I also test to make sure the startup is executable whereas the template does not.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 08:18 AM
тАО01-20-2004 08:18 AM
Re: startup script not working
Okay I got it except for one small error.
On line 34 where the test for the var is:
if ["$XVFB_START" != 1 ]
I get a [1: not found error
---------------------------------------------------
# cat run_Xvfb.sh
# setup virtual x server for Oracle ERP 11i graphical display
# Steve Wang 1/12/04
#### OLD LINE EDITED
#nohup /usr/bin/X11/Xvfb :4 -screen 0 1024x800x8 -pn -fp /usr/lib/X11/fonts/misc
-sp /etc/X11/SecurityPolicy &
# Read /etc/rc.config.d/Xvfbconf for start toggle upon boot time.
# XVFB_START=1 is for start... XVFB_START=0 is for dont start
if [ -f /etc/rc.config.d/Xvfbconf ]
then . /etc/rc.config.d/Xvfbconf
else echo "ERROR /etc/rc.config.d/Xvfbconf file MISSING"
fi
####
## New script changed 01-20-2004 Todd McDaniel...
PATH=/usr/sbin:/usr/bin:/sbin; export PATH
mode=$1
case "$mode" in
"start_msg")
echo "Start Xvfb"
exit 0
;;
"stop_msg")
echo "Stop Xvfb"
exit 0
;;
"start")
if ["$XVFB_START" != 1 ]
then rval=2
else
if [ -x/sbin/init.d/run_Xvfb.sh ]
then
if [ "$XVFB_START_COMMAND" != "" ]
then eval $XVFB_START_COMMAND
else /sbin/init.d/run_Xvfb.sh
nohup /usr/bin/X11/Xvfb :4 -screen 0 1024x800x8 -pn -fp /usr/lib/X11/fon
ts/misc -sp /etc/X11/SecurityPolicy &
fi
fi
fi
;;
"stop")
PIDS=`ps -aef |grep -v grep|grep Xvfb |awk '{ print $2 }'`
kill $PIDS
;;
*)
echo "Usage: \$0 { start | stop }"
exit 1
;;
esac
exit 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 08:34 AM
тАО01-20-2004 08:34 AM
Re: startup script not working
Don'r worry about mine - it works.
That wasn't a copy/paste - I typed it freehand - hence the typos.
Glad to hear you got yours going now.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2004 05:16 PM
тАО01-20-2004 05:16 PM