Solved

Running background process using KSH

Posted on 1998-07-24
1
581 Views
Last Modified: 2013-12-16
I am new with solaris 2.5.1. so , I would like to know how to run process ( file) automatically when the system booting or reboting using KSH . and how and where to put the script
that running the process.
0
Comment
Question by:mahadir
1 Comment
 
LVL 4

Accepted Solution

by:
jlms earned 50 total points
Comment Utility
I would not recommend to use ksh (I have never tried myself). The standard shell to do this is the Bourne shell (/bin/sh).

Now, there is a series of directories in /etc called rc0.d, rc1.d, rc2.d, rcS.d and so on. Each directory has a series of file whose names are Knnsomething or Snnsomething.

When the machine boots, it executes the scripts begining with S in ascending order and gives the start parameter to each one of them. If you pay attention, most of these scripts are in reality links to the real thing under /etc/init.d

So you should put your script in /etc/init.d and then make a link in /etc/rc2.d pointing to your script. The link should be called Snn<something sensible> where nn is a number (choose a high one so your script executes at the end). Your script should be able to deal with the start parameter properly, but if it just executes is ok.


0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now