Steps used to implement Init script file for embedded Linux

   Init.d Script File

   

What is init directory ?

 Init  is  the  parent of all processes on the system, it is executed by the kernel and is responsible for    starting all other processes;  it  is the  parent  of all processes whose natural parents have died and it is responsible for reaping those when they die.
Steps used to make init script fie:


I. login to root user                                  
 command:    sudo su
 password:   system password give

2. Now go to the init.d directory.

Command : cd /etc/init.d








3. using vi /gedit editor write a script
    file with extension .sh.
          command  : vi anil.sh

 "WELCOME TO EmbeddedForus "
   







4. For use as script file do the
     following changes .
  

#!/bin/sh
    echo " "
  echo "WELCOME To EmbeddedForus "

  echo " "

5. Save the file

Command :   :wq

6. Execute the script file by using  reboot init module.

command:init 6
or
if you want to execute directly then you can use script command

command : ./anil.sh
After reboot of your system when you will  open the script-file anil.sh you will find the following output


.WWW.embeddedforuus.blogspot.in(Anil)

Comments