LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-04-2008, 03:21 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
rc.local fails to work


Hi folks,


Debian Etch


I have 3 commands on /etc/rc.local


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

#exit 0

/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"
They won't be activated at booting (previsously it worked)

I have to run them manually after booting up the server.


Please advise how to fix the problem? TIA


B.R.
satimis
 
Old 11-04-2008, 04:36 AM   #2
wificraig
Member
 
Registered: Jan 2008
Location: Southern Oregon
Distribution: Laptop: DesktopBSD1.6, openSuse11, Mandriva, Mepis7, BackTrack3....USB: Mandriva2009, Debian-Lenny,
Posts: 82

Rep: Reputation: 16
The way I've done it

I believe your last line needs exit 0 uncommented.
 
Old 11-04-2008, 05:10 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by wificraig View Post
I believe your last line needs exit 0 uncommented.
Edit /etc/rc.local accordingly.


# cat /etc/rc.local
Code:
/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.


/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

Reboot


# host linux.org 127.0.0.1
Code:
Nameserver localhost.localdomain not running
linux.org A record not found at localhost.localdomain, try again

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

No complaint


# host linux.org 127.0.0.1
Code:
linux.org               A       198.182.196.48

# /usr/local/sbin/clamd
No complaint


# su - amavis -c "/usr/local/sbin/amavisd"
Code:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
/usr/bin/perl: symbol lookup error: /usr/local/lib/perl/5.8.8/auto/BerkeleyDB/BerkeleyDB.so: undefined symbol: db_version
There is an error here.


Previously rc.local worked w/o problem. I don't know why it stops working now.


satimis
 
Old 11-15-2008, 05:51 PM   #4
yowi
Member
 
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209

Rep: Reputation: 55
does your /etc/rc2.d/S99rc.local link still exist?
 
Old 11-15-2008, 06:19 PM   #5
wificraig
Member
 
Registered: Jan 2008
Location: Southern Oregon
Distribution: Laptop: DesktopBSD1.6, openSuse11, Mandriva, Mepis7, BackTrack3....USB: Mandriva2009, Debian-Lenny,
Posts: 82

Rep: Reputation: 16
First line

Your first line in the rc.local should be commented:
Code:
#!/bin/sh -e
 
Old 11-15-2008, 06:26 PM   #6
yowi
Member
 
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209

Rep: Reputation: 55
well spotted!
 
Old 11-15-2008, 06:45 PM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Although there's a good chance it's just a copy error.
 
Old 11-16-2008, 09:43 AM   #8
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi folks,


Thanks for your advice.


Problem already solved. Unfortunately I can't recall exactly how to make it. I ran a command installing those commands on;

rc0.d
rc1.d
rc2.d
rc3.d
rc4.d
rc5.d
rc6.d

leaving out rcS.d. I put the solution somewhere but can't find it. I'm now searching around to find it. It is quite funny. Any hint?


rc.local is now an empty file.


B.R.
satimis
 
Old 11-16-2008, 11:07 AM   #9
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
update-rc.d
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting local settings fails scndsky Debian 1 06-11-2007 02:04 PM
wordpress install on local machine fails sharky Linux - Software 1 03-02-2007 12:48 PM
local repository fails robingazi Debian 2 08-21-2006 08:33 AM
Local authentication fails lshoemak Linux - Security 7 08-04-2006 02:03 PM
Local user authentication fails when eth0 is up... patapon Linux - Security 1 12-17-2001 04:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration