LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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



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

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

All times are GMT -5. The time now is 02:20 PM.

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