Sponsored Content
Operating Systems Solaris How to auto start a service on rebooting a Solaris 5.10 x86 machine? Post 302764661 by zazzybob on Thursday 31st of January 2013 05:55:25 PM
Old 01-31-2013
Quote:
Originally Posted by achenle
Just write an init script. It's simple, understandable, and even more important easily maintainable for someone in the future.

SMF services are none of that.

SMF services are great when you have complex dependencies between various services and events. But just because you have a hammer doesn't make every problem a nail.
Sun and now Oracle have insisted that init scripts are "legacy" and will be removed in a later Solaris release. Also, they no longer guarantee the order in which they'll be started or stopped, as the init scripts are themselves executed by an SMF service.

So - you should be using SMF, even for simple things. It's the way Solaris has evolved and is evolving. It's not hard to write an SMF manifest for a simple service once you've read the documentation.
This User Gave Thanks to zazzybob For This Post:
 

9 More Discussions You Might Find Interesting

1. Solaris

How to supress a UI popup at the time of Service start up in solaris-10

Hi, I have written a service script(service.sh) for my application which will add my application(BTINM) as service and start the service. Internally inside the script i will call the sh script which will start my application server. When my application server starts a UI opens saying that the... (5 Replies)
Discussion started by: krevathi1912
5 Replies

2. Solaris

Auto Start/Stop Didnt Work in Solaris 10

Hi...all database - 10g Rs 2 with ASM platform - Sun Solaris V890 64bit This is the step i use to auto start the database n ASM: (auto start can start but need to kill lsvcrun first) 1 dbora---script 2 start_shutdown_asm.ksh---script 3. Dbora file must be put under /etc/init.d directory... (0 Replies)
Discussion started by: adzuanamir
0 Replies

3. UNIX for Dummies Questions & Answers

How can I install Solaris 10 x86 on a machine without a DVD drive?

How can I install Solaris 10 x86 on a machine without a DVD drive? Is there a way to boot from a flash stick or install it through a network? Any help will be appreciated. (1 Reply)
Discussion started by: Bradj47
1 Replies

4. Solaris

x86 Sun Machine and Solaris Soft Mirror

Hi everyone, Normally it always easier in Sparc machine, i can set or manually use the boot-device in NVram to boot the mirrored disk. However I have a big trouble about x86 mirror for a long time. I have been doing anything i can: search document, google, ask the others. Recently i did as... (5 Replies)
Discussion started by: tien86
5 Replies

5. Solaris

How to auto start MySQL server on Opensolaris after rebooting the machine?

Hi, In Linux, I will do it by editing the /etc/rc.d/rc.local . However, I can't find a rc.local file in Opensolaris. So, how can I do it in Opensolaris? I am new to opensolaris, so please teach me step by step. Thanks in advance. (4 Replies)
Discussion started by: AlexCheung
4 Replies

6. Solaris

is there an veritas volume manager version compatible with solaris x86 machine?

i heard some where veritas volume manager wont work on solaris x86. i have installed vmware into my 32bit xp machine. i am planning to learn veritas.. is there an veritas volume manager version compatible with solaris x86 machine? (2 Replies)
Discussion started by: chidori
2 Replies

7. Red Hat

Disable xen machine to auto start on reboot

Hello Guys - I need to disable xen server not to start when the server is rebooted. 1) What is the parameter to be used to do this..below is the entry in my config file... on_reboot = "restart" 2) What is the default behaviors of the xen on reboot ? in case we comment this line from config... (0 Replies)
Discussion started by: saurabh84g
0 Replies

8. Solaris

Not able to start cron service in Solaris 10

Hi, This is Solaris-10 x86. I am not able to start cron service, configured in FMRI. It is in maintenance and when I clear it, it seems like calling and failing on /etc/init.d/tcs-rtm script. I am not able to figure out, why cron is calling that script, if this failure is because of that. Cron... (5 Replies)
Discussion started by: ron323232
5 Replies

9. UNIX for Beginners Questions & Answers

Howto auto boot SPARC | How to auto supply "start /SYS" and "start /SP/console" commands

When I power ON my T4-1, I got a prompt -> where I have to start /SYS and start /SP/console. How can I auto supply these two commands ? (3 Replies)
Discussion started by: z_haseeb
3 Replies
inittab(4)							   File Formats 							inittab(4)

NAME
inittab - script for init DESCRIPTION
The /etc/inittab file controls process dispatching by init. The processes most typically dispatched by init are daemons. It is no longer necessary to edit the /etc/inittab file directly. Administrators should use the Solaris Service Management Facility (SMF) to define services instead. Refer to smf(5) and the System Administration Guide: Basic Administration for more information on SMF. To modify parameters passed to ttymon(1M), use svccfg(1M) to modify the SMF repository. See ttymon(1M) for details on the available SMF properties. The inittab file is composed of entries that are position dependent and have the following format: id:rstate:action:process Each entry is delimited by a newline; however, a backslash () preceding a newline indicates a continuation of the entry. Up to 512 charac- ters for each entry are permitted. Comments may be inserted in the process field using the convention for comments described in sh(1). There are no limits (other than maximum entry size) imposed on the number of entries in the inittab file. The entry fields are: id One to four characters used to uniquely identify an entry. Do not use the characters "r" or "t" as the first or only character in this field. These characters are reserved for the use of rlogin(1) and telnet(1). rstate Define the run level in which this entry is to be processed. Run-levels effectively correspond to a configuration of processes in the system. That is, each process spawned by init is assigned a run level(s) in which it is allowed to exist. The run levels are represented by a number ranging from 0 through 6. For example, if the system is in run level 1, only those entries having a 1 in the rstate field are processed. When init is requested to change run levels, all processes that do not have an entry in the rstate field for the target run level are sent the warning signal SIGTERM and allowed a 5-second grace period before being forcibly terminated by the kill sig- nal SIGKILL. The rstate field can define multiple run levels for a process by selecting more than one run level in any combina- tion from 0 through 6. If no run level is specified, then the process is assumed to be valid at all run levels 0 through 6. There are three other values, a, b and c, which can appear in the rstate field, even though they are not true run levels. Entries which have these characters in the rstate field are processed only when an init or telinit process requests them to be run (regardless of the current run level of the system). See init(1M). These differ from run levels in that init can never enter run level a, b or c. Also, a request for the execution of any of these processes does not change the current run level. Further- more, a process started by an a, b or c command is not killed when init changes levels. They are killed only if their line in inittab is marked off in the action field, their line is deleted entirely from inittab, or init goes into single-user state. action Key words in this field tell init how to treat the process specified in the process field. The actions recognized by init are as follows: respawn If the process does not exist, then start the process; do not wait for its termination (continue scanning the init- tab file), and when the process dies, restart the process. If the process currently exists, do nothing and continue scanning the inittab file. wait When init enters the run level that matches the entry's rstate, start the process and wait for its termination. All subsequent reads of the inittab file while init is in the same run level cause init to ignore this entry. once When init enters a run level that matches the entry's rstate, start the process, do not wait for its termination. When it dies, do not restart the process. If init enters a new run level and the process is still running from a previous run level change, the program is not restarted. boot The entry is to be processed only at init's boot-time read of the inittab file. init is to start the process and not wait for its termination; when it dies, it does not restart the process. In order for this instruction to be meaningful, the rstate should be the default or it must match init's run level at boot time. This action is useful for an initialization function following a hardware reboot of the system. bootwait The entry is to be processed the first time init goes from single-user to multi-user state after the system is booted. init starts the process, waits for its termination and, when it dies, does not restart the process. powerfail Execute the process associated with this entry only when init receives a power fail signal, SIGPWR (see sig- nal(3C)). powerwait Execute the process associated with this entry only when init receives a power fail signal, SIGPWR, and wait until it terminates before continuing any processing of inittab. off If the process associated with this entry is currently running, send the warning signal SIGTERM and wait 5 seconds before forcibly terminating the process with the kill signal SIGKILL. If the process is nonexistent, ignore the entry. ondemand This instruction is really a synonym for the respawn action. It is functionally identical to respawn but is given a different keyword in order to divorce its association with run levels. This instruction is used only with the a, b or c values described in the rstate field. sysinit Entries of this type are executed before init tries to access the console (that is, before the Console Login: prompt). It is expected that this entry will be used only to initialize devices that init might try to ask the run level question. These entries are executed and init waits for their completion before continuing. process Specify a command to be executed. The entire process field is prefixed with exec and passed to a forked sh as sh -c 'exec com- mand'. For this reason, any legal sh syntax can appear in the process field. SEE ALSO
sh(1), who(1), init(1M), svcadm(1M), svc.startd(1M), ttymon(1M), exec(2), open(2), signal(3C), smf(5) System Administration Guide: Basic Administration NOTES
With the introduction of the service management facility, the system-provided /etc/inittab file is greatly reduced from previous releases. The initdefault entry is not recognized in Solaris 10. See smf(5) for information on SMF milestones, and svcadm(1M), which describes the "svcadm milestone -d" command; this provides similar functionality to modifying the initdefault entry in previous versions of the Solaris OS. SunOS 5.11 9 Dec 2004 inittab(4)
All times are GMT -4. The time now is 12:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy