- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- Re: how to add the startup script in hp-ux 11.11
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP