LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 06-07-2008, 09:02 AM   #1
yosato_uk
LQ Newbie
 
Registered: Aug 2006
Location: London
Distribution: fedora, gentoo, openSuse
Posts: 13

Rep: Reputation: 0
initialisation log


Hi,

I use Fedora 8 and just wonder where the messages on the initialisation scripts are recorded that appear when you boot up. That is stuff like

nfsd... [OK]
sshd... [fail]
...
etc

I can't locate this in the /var/log/ directory. Would you need to change syslog.conf etc?

Your help would be very much appreciated.

Yo
 
Old 06-08-2008, 10:42 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,954
Blog Entries: 5

Rep: Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755Reputation: 755
Haven't done this myself but on researching the question because I was curious. I found that you basically need to add a logger line to the start and stop sections of each init script.

Examples I see in /etc/init.d/diskdump:

Code:
start_device() {
        local dev=$1

        errmsg=$($DISKDUMPCTL $dev 2>&1)
        ret=$?
        if [ $ret -ne 0 ]; then
                logger -p info -t $SERVICE_NAME "$errmsg"
        fi
}

stop_device() {
        local dev=$1

        errmsg=$($DISKDUMPCTL -u $dev 2>&1)
        if [ $? -ne 0 ]; then
                logger -p info -t $SERVICE_NAME "$errmsg"
        fi
}
In the above basicaly it is saying to only log the information if there is a non-zero exit status (meaning it failed). You'd want to simply get rid of the if, then, fi so that it logged everything.

The OK/FAILED actually comes from the functions (see the file invoked at start of init scripts) so to actually see the OK/FAILED itself you'd likely have to modify that function script.

Unfortunately I didn't find any examples of anyone doing this.

Interestingly on HP-UX they have it setup to go to an rc.log by default but they do it differently than Linux.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Kerberos initialisation error cov Linux - Server 3 02-26-2008 01:43 AM
Initialisation script The Godfather Linux - Newbie 5 05-01-2006 11:55 AM
Init running before other initialisation? fatzo Linux - General 2 02-26-2004 05:51 AM
Is there something like rc.local for system initialisation? brian-e Debian 3 01-20-2004 07:56 AM
Initialisation string C8H10N4O2 Linux - Newbie 2 03-17-2003 07:29 AM


All times are GMT -5. The time now is 12:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration