FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-05-2008, 12:10 AM
Stephen Liu
 
Default rc.local fails to work

Hi folks,


Debian Etch


I have 3 commands on /etc/rc.local


# cat /etc/rc.local
/bin/sh -e
#
# rc.local
#

/usr/local/bind/sbin/named -u named -t /usr/local/bind -c
/etc/named.conf

/usr/local/sbin/clamd

su - amavis -c "/usr/local/sbin/amavisd"

exit 0
* end *


# ls -l /etc/rc.local
-rwxr-xr-x 1 root root 444 Nov 4 11:00 /etc/rc.local


Previously rc.local worked without problem, commands executed at
booting. For unknown cause they stop working. I have to start them
manually after bootup.


Please advise where shall I check and how to fix the problem. TIA


B.R.
Stephen

Send instant messages to your online friends http://uk.messenger.yahoo.com


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-05-2008, 01:17 AM
"Douglas A. Tutty"
 
Default rc.local fails to work

On Wed, Nov 05, 2008 at 09:10:18AM +0800, Stephen Liu wrote:
> Debian Etch
>
>
> I have 3 commands on /etc/rc.local
>
>
> # cat /etc/rc.local
> /bin/sh -e

in my /etc/rc.local, this line is

#!/bin/sh -e

Note the pound-bang (#!) that makes this script run by sh rather than
running sh -e as a command (or doing nothing, I'm not sure which).

> #
> # rc.local
> #
>
> /usr/local/bind/sbin/named -u named -t /usr/local/bind -c
> /etc/named.conf
>
> /usr/local/sbin/clamd
>
> su - amavis -c "/usr/local/sbin/amavisd"
>
> exit 0
> * end *
>
>
> # ls -l /etc/rc.local
> -rwxr-xr-x 1 root root 444 Nov 4 11:00 /etc/rc.local
>
>
> Previously rc.local worked without problem, commands executed at
> booting. For unknown cause they stop working. I have to start them
> manually after bootup.


Doug.




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 11-05-2008, 05:19 PM
green
 
Default rc.local fails to work

On Wed, 2008.11.05, 310, Stephen Liu wrote:
> I have 3 commands on /etc/rc.local
>
>
> # cat /etc/rc.local
> /bin/sh -e
> #
> # rc.local
> #
>
> /usr/local/bind/sbin/named -u named -t /usr/local/bind -c
> /etc/named.conf
>
> /usr/local/sbin/clamd
>
> su - amavis -c "/usr/local/sbin/amavisd"
>
> exit 0
> * end *
>
>
> Previously rc.local worked without problem, commands executed at
> booting. For unknown cause they stop working. I have to start them
> manually after bootup.

The first line of /etc/rc.local should be "#!/bin/sh -e". Also, the '-e'
option causes the shell to stop processing the script if any command exits with
a non-zero status, so you may want to remove it.
 
Old 11-05-2008, 06:09 PM
Hugo Vanwoerkom
 
Default rc.local fails to work

Douglas A. Tutty wrote:

On Wed, Nov 05, 2008 at 09:10:18AM +0800, Stephen Liu wrote:

Debian Etch


I have 3 commands on /etc/rc.local


# cat /etc/rc.local
/bin/sh -e


in my /etc/rc.local, this line is

#!/bin/sh -e

Note the pound-bang (#!) that makes this script run by sh rather than
running sh -e as a command (or doing nothing, I'm not sure which).



Good job Doug. I missed that.

Hugo


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 09:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org