Solved

Running background process using KSH

Posted on 1998-07-24
1
595 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 50 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
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…

726 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