Operating System - HP-UX
1752795 Members
6101 Online
108789 Solutions
New Discussion юеВ

Need help in adding entries in inittab

 
Karthik Narayan
New Member

Need help in adding entries in inittab

Hi,

I am new to UNIX, i wanted automate a process to get started whenever system/server gets rebooted. below is command which i wanted to include in the initab file.

/sapmnt/tools/ccms//bin/sapccm4x -DCCMS pf=/sapmnt/tools/ccms//bin/ccms_profile

Please let me know who to include this entry and let me if you need more information on it.

Thanks,
Karthik
6 REPLIES 6
Aneesh Mohan
Honored Contributor

Re: Need help in adding entries in inittab

Hi Karthik,

>> i wanted automate a process to get started whenever system/server gets rebooted

Bascially you need to prepare startup/shutdown scripts and should linked in to the runlevel directories with "S" for startup and "K" for shutdown.

Run level directories
/sbin/rc1.d/
/sbin/rc2.d
/sbin/rc3.d/

For more information:-

man rc
man init

Aneesh
Karthik Narayan
New Member

Re: Need help in adding entries in inittab

Hi Aneesh,

Thanks for your response.

my request here is, i have an agent called CCMS, which needs to started manually whenever we restart the system. so i need to automate it by adding the the above mentioned start command in inittab file.

so, i need to know whether is any syntax or convention in adding the entries in the inittab file.

Thanks,
Karthik
SoorajCleris
Honored Contributor

Re: Need help in adding entries in inittab

Hi Karthik,

Welcome to HP forums. YOu are at right place.


As everyone suggested, go for an rc script.
Playing with inttab is little dangerous.

How to create the script for your application, its all there in above links.
Its very easy.

By the way, please go throug the link below
http://forums11.itrc.hp.com/service/forums/helptips.do?#28

Enjoy foruming ...

regards,
Sooraj

"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Shibin_2
Honored Contributor

Re: Need help in adding entries in inittab

Hi Karthik,

You haven't specified which UNIX you are using. Is it HP-UX or AIX?

Most production environment, default runlevel of HP-UX is 3.

You first create the command into a file and make it as executable. Then create a link file in /sbin/rc3.d/ with the following format

S<2or3 digit sequence number>

S stands for start.


If you are using AIX server, runlevel will be 2.

In the same way, you create an executable file and create a link file in /etc/rc.d/rc2.d/ pointing to your executable one.

In AIX, no sequence number required. Just mention S for startup and K for stop.
Regards
Shibin
Viktor Balogh
Honored Contributor

Re: Need help in adding entries in inittab

Hi Karthik,

I am not sure that you need to create that startup script. If you are on a clustered environment, the startup method should be incorporated inside of a package.

Please post the following output:

at first, let's see what kind of system do we have:

# uname -a

if we are on HP-UX, maybe ServiceGuard is there (cluster software), in this case we need to edit/create a package file:

# cmviewcl -v
# ll /etc/cmcluster


Regards,
Viktor
****
Unix operates with beer.