[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Running background process using KSH

Posted on 1998-07-24
1
Medium Priority
?
614 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

656 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