[BangPypers] how the file rc.local and command update-rc.d are related
anurag08priyam at gmail.com
Sun Feb 14 16:41:39 CET 2010
In Debian the apps that need to be started at the boot time have their
startup scripts in /etc/init.d . Have a look at few of the scripts(perhaps
mysql, apache2 or gdm) to make it more clear. Which apps are actually
started at the boot time depends on the runlevel you are starting in. For a
runlevel the startup scripts are actually run from /etc/rcX.d (X being the
name of runlevel). If you are starting in the runlevel 5, scripts will be
read of /etc/rc5.d .
The general concept is to put the startup script in /etc/init.d and put a
symlink in the corresponding rcX.d directory. Here steps the update-rc.d
command. It is used to manage the symlinks in the rcX.d directories. You may
like to read this small post
Another command that is used with the /etc/init.d startup sctipts is
invoke-rc.d . Read man page for update-rc.d and invoke-rc.d for more help.
I might be wrong in stating this: With rc.local make sure that the script
returns 0. This implies that any script you want to run from rc.local must
be started in background( perhaps script& ). Also putting a script in
rc.local guarantees execution in all the runlevels.
On Sat, Feb 13, 2010 at 6:57 PM, Shivaraj M S <shivraj.ms at gmail.com> wrote:
> On debian /etc/init.d is the directory for common user startups.
> View this message in context:
> Sent from the BangPypers - Bangalore Python Users Group mailing list
> archive at Nabble.com.
> BangPypers mailing list
> BangPypers at python.org
2nd Year,Mechanical Engineering,
More information about the BangPypers