RcLocalHowto

Differences between revisions 1 and 12 (spanning 11 versions)
Revision 1 as of 2006-03-01 09:41:23
Size: 960
Editor: 107
Comment:
Revision 12 as of 2006-03-11 12:04:05
Size: 1441
Editor: 159
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
=An rc.local equivalent for Debian/Ubuntu= ||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">'''Contents'''[[BR]][[TableOfContents]]||
= An rc.local equivalent for Debian/Ubuntu =
Line 4: Line 5:
In many distributions you can add commands to run certain programs at the end of the boot process after all system services have been started. For this purpose various distribution uses various method. For example in Redhat based distributions we can add our own scripts or programs into the /etc/rc.d/rc.local file, however there is no such file in a Debian based system. Here is the way to accomplish the same thing the debian way: In many distributions you can add commands to run certain programs at the end of the boot process after all system services have been started. For this purpose various distribution uses various methods. For example in Redhat based distributions we can add our own scripts or programs into the /etc/rc.d/rc.local file, however there is no such file in a Debian based system. Here is the way to accomplish the same thing the debian way:
Line 20: Line 21:
 chmod +x /etc/init.d/local  sudo chmod +x /etc/init.d/local
Line 23: Line 24:
==link the new local file with Init== == link the new local file with Init ==
Line 26: Line 27:
{{{
sudo update-rc.d local defaults 80
}}}
== An Example ==
Line 27: Line 32:
  update-rc.d local defaults 80 Now you can call your scripts or pograms using this file. For example, to mount a NFS directry at boot time add the following line to /etc/init.d/rc.local
Line 29: Line 34:
{{{
mount server.fossedu.org:/data /data
}}}
Line 31: Line 39:

Howto created by: ChinthakaDeshapriya.
----
CategoryDocumentation

An rc.local equivalent for Debian/Ubuntu

In many distributions you can add commands to run certain programs at the end of the boot process after all system services have been started. For this purpose various distribution uses various methods. For example in Redhat based distributions we can add our own scripts or programs into the /etc/rc.d/rc.local file, however there is no such file in a Debian based system. Here is the way to accomplish the same thing the debian way:

Creatting /etc/ini.d/local

sudo vi /etc/init.d/local

This file is a shell script and it should start with:

Making the file executable

Make this file executable with:

 sudo chmod +x /etc/init.d/local

We are going to use this script a System V init script using:

sudo update-rc.d local defaults 80

An Example

Now you can call your scripts or pograms using this file. For example, to mount a NFS directry at boot time add the following line to /etc/init.d/rc.local

mount server.fossedu.org:/data /data

Thanks to: http://plope.com/Members/chrism/debian_rc_local_equiv

Howto created by: ChinthakaDeshapriya.


CategoryDocumentation

RcLocalHowto (last edited 2008-08-06 16:37:47 by localhost)