- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to run some commands automatically before ...
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
тАО05-20-2009 09:00 AM
тАО05-20-2009 09:00 AM
I am using redhat, suse and hpux.
in redhat there is a file called "/etc/rc.d/rc.local". where we can enter the commands. that will be executed whenever the server is booting.
Ex:
# vim /etc/rc.d/rc.local
touch /var/lock/subsys/local
so the file "/var/lock/subsys/local" will be created whenever we are starting the server.
But in suse and hp-ux we are not able to find a file like this.
is it available in suse and hpux?
or how to create this file?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 09:04 AM
тАО05-20-2009 09:04 AM
SolutionIn HP-UX there is no complement to '/var/lock/subsys/local. The HP-UX startup/shutdown paradign is similar to that of Linux (or conversely).
The details for HP-UX can be discovered by reading the manpages for 'rc(1M)' or this (still valid) whitepaper:
http://docs.hp.com/en/B2355-60130/rc.1M.html
http://docs.hp.com/en/934/startup.pdf
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 09:07 AM
тАО05-20-2009 09:07 AM
Re: how to run some commands automatically before getting login prompt in hp-ux and suse linux
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1339765
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 09:13 AM
тАО05-20-2009 09:13 AM
Re: how to run some commands automatically before getting login prompt in hp-ux and suse linux
create a script for this purpose in directory /sbin/init.d.
example : /sbin/init.d/localtasks
edit this file and put commands you want running into this newly created file. Make sure owner root has rwx permissions.
then place a symbollic link to the /sbin/rc3.d, pointing to your new script, with a number as high as possible to prevent conflict with other startup jobs.
example:
ln -s /sbin/init.d/localtasks /sbin/rc3.d/S999localtasks
Hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 03:37 PM
тАО05-20-2009 03:37 PM
Re: how to run some commands automatically before getting login prompt in hp-ux and suse linux
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 02:00 AM
тАО05-21-2009 02:00 AM
Re: how to run some commands automatically before getting login prompt in hp-ux and suse linux
You can create your own startup script, 1st you need to decide your script will run which run label according to run label go the directory /etc/rc.d/rc1.d or /etc/rc.d/rc2.d then create a file stat with S and a unique no like S2355 do ├в ls ├в l├в you can see other files but remember the no should be unique
Then link that file to your script or you can copy paste your contain or your script into this file save the file change the owner and permission as other files are having.
http://search.hp.com/redirect.html?url=http%3A//forums11.itrc.hp.com/service/forums/questionanswer.do%3FthreadId%3D520675&qt=%2B/etc/rc.d&hit=1
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 05:41 AM
тАО05-21-2009 05:41 AM
Re: how to run some commands automatically before getting login prompt in hp-ux and suse linux
I checked this with SUSE linux.
But it is not working.
I have done follwoings.
1) First created the file "create" in /etc/init.d.
# cd /etc/init.d
# vi create
#! /bin/sh
cd /root
mkdir soft
2)the permission of the file is
suse10tst:/etc/init.d # ll create
-rwxr-xr-x 1 root root 32 May 21 08:19 create
3) My default runlevel is 5. so i want to run this script in runlevel 5 (/etc/rc.d/rc5.d). so i have create the link in /etc/rc.d/rc5.d
# cd /etc/rc.d/rc5.d
#ln -s /etc/init.d/create S999create
4) The permissoin of the link file is
suse10tst:/etc/rc.d/rc5.d # ll S999*
lrwxrwxrwx 1 root root 20 May 20 14:24 S999create -> /etc/init.d/create
The i restarted the suse.
But The directory "/root/soft" is not created. i am using this script to do this.
Where is problem in my configuratoin.
How to solve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 05:46 AM
тАО05-21-2009 05:46 AM
Re: how to run some commands automatically before getting login prompt in hp-ux and suse linux
You realize that, you are asking the question in HPUX forum. Right ? Then the answers you will get will be based on HPUX OS. SUSE being a lesser spread Linux variant, may not have too many followers on this forum. You might want to ask this question in a SUse or any other slackware based Linux distro oriented forum. I personally do not know how to accomplish it on SuSE.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 06:35 AM
тАО05-21-2009 06:35 AM
Re: how to run some commands automatically before getting login prompt in hp-ux and suse linux
As said, the same concept will work in hp-ux?
Are you sure?
How to check this in hp-ux with out restarting the server.
Since i can't restart my hp-ux server.
So that i wanted to implement this in suse linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 06:41 AM
тАО05-21-2009 06:41 AM
Re: how to run some commands automatically before getting login prompt in hp-ux and suse linux
As Mel said, you will get better answers for Suse Linux in the Linux formum family:
http://forums11.itrc.hp.com/service/forums/familyhome.do?familyId=118
I suggest that you open a query there. You can reference this thread if you wish, too.
Regards!
...JRF...