- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to add the startup script in hp-ux 11.11
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
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
тАО09-12-2012 11:10 PM
тАО09-12-2012 11:10 PM
how to add the startup script in hp-ux 11.11
i wan to add below command in hp-ux startup script , reson is when ever server reboot the license should start automatically
command
cd /usr/flex/112.8
./lmstat -c /usr/flex/112.8/license.dat
- Tags:
- rc(1M)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2012 11:24 PM
тАО09-12-2012 11:24 PM
Re: how to add the startup script in hp-ux 11.11
in /sbin/init.d/mystartupscript
#!/sbin/sh
#
# mystartup script
#
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
rval=0
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "EXIT CODE: $x"
rval=1
fi
}
case $1 in
start_msg)
echo "My ownstartup"
;;
'start')
if [ -f /usr/flex/112.8/license.dat ]; then
cd /usr/flex/112.8
./lmstat -c /usr/flex/112.8/license.dat
set_return
else
rval=2
fi
;;
*)
echo "usage: $0 {start}"
rval=1
;;
esac
exit $rval
Then
chmod +500 /sbin/init.d/mystartupscript
ln -s /sbin/init.d/mystartupscript/ /sbin/rc2.d/S995mystartupscript
just one thing, I supposed that lmstat is self demonizing, else you need to add a & on lmstat line
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2012 11:39 PM
тАО09-12-2012 11:39 PM
Re: how to add the startup script in hp-ux 11.11
ans--sorry i am not understand your question.
if /sbin/rc2.d folder is already exsists. so what can i do.
available foldersin /sbin/rc2.d , /sbin/rc3.d , /sbin/rc4.d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2012 01:43 AM
тАО09-13-2012 01:43 AM
Re: how to add the startup script in hp-ux 11.11
I just mean that if when you start lmstat it doesn'"t start in background then you need to replace
lmstat -c .... by lmstat -c ... &
For the run level, you can put it at rc3 ( in rc3.d) if you want, it is a g ood idea
rc4 is usually not used since initdefault is usually 3
I put it at rc2.d/S995 like that I was sure it was the last run at rc2
but indeed starting it at rc3.d is a good idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2012 03:17 AM
тАО09-13-2012 03:17 AM
Re: how to add the startup script in hp-ux 11.11
thanks for your replay.
why we not use below format
cd /sbin/init.d
vi licstart
cd /usr/flex/112.8
./lmstat -c /usr/flex/112.8/license.dat
:wq
once save the file
ln -s /sbin/init.d/licstart/ /sbin/rc.3/S800licstart
the above procedure is write or wrong. plesae explain below command
ln -s /sbin/init.d/licstart/ /sbin/rc.3/S800licstart - in this command s800licstart what is the meaning for S800
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2012 03:17 AM
тАО09-13-2012 03:17 AM
Re: how to add the startup script in hp-ux 11.11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2012 04:22 AM
тАО09-13-2012 04:22 AM
Re: how to add the startup script in hp-ux 11.11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2012 12:09 PM - edited тАО09-13-2012 10:59 PM
тАО09-13-2012 12:09 PM - edited тАО09-13-2012 10:59 PM
Re: how to add the startup script in HP-UX 11.11
>ln -s /sbin/init.d/licstart /sbin/rc.3/S800licstart - in this command S800licstart what is the meaning for S800?
>or else S800 is user defined.
Yes, S800 is a user defined sequencing number, S for start, K for kill. See rc(1m):
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c03220515/c03220515.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2012 01:27 PM
тАО09-13-2012 01:27 PM
Re: how to add the startup script in hp-ux 11.11
oops
ln -s /sbin/init.d/licstart /sbin/rc.3/S800licstart
I just put a / by error