?
Solved

Running background process using KSH

Posted on 1998-07-24
1
Medium Priority
?
605 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
jlms earned 150 total points
ID: 1812362
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

752 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