Results 1 to 4 of 4
Hi everybody,
I need to do an easy task but I don't know how to do it.
I have a shell script called "first" executed as a daemon in runlevel ...
- 11-17-2007 #1Just Joined!
- Join Date
- Jul 2006
- Posts
- 51
Create an own log file
Hi everybody,
I need to do an easy task but I don't know how to do it.
I have a shell script called "first" executed as a daemon in runlevel 3, where I have put a soft link (/etc/rc3.d/S99first) to make it start when console changes to runlevel 3.
I want to create a new logfile called /tmp/logfirst where output of changing runlevel 3 is written.
How can I do that?
Firstly I need to know where messages of changing runlevels are stored...and then I suposo I will have to redirect it to /tmp/logfirst...
any ideas??
Thanks!
Aleix
- 11-17-2007 #2
I think changes in run level are logged in /var/log/syslog. But why not make your script use logger to send a message to a log file of your choosing?
"I'm just a little old lady; don't try to dazzle me with jargon!"
- 11-17-2007 #3Just Joined!
- Join Date
- Jul 2006
- Posts
- 51
Hi!
these would be one way, but the problem is that the script is a C binary, and I don't have the source code to change it.
So, I need to redirect the messages produced with this program to a new log file, using system files.
Aleix
- 11-18-2007 #4
Er??! You said before that it was a shell script
. Well, if it's a binary and you can't recompile it, you will need to find out what facility it logs under (probably daemon) and edit /etc/syslog.conf to send those messages elsewhere.
"I'm just a little old lady; don't try to dazzle me with jargon!"


Reply With Quote
