Is there any way to log startup messages without making stdout >> file ?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Most definitely. Sorry for the typo - has been corrected.
There is a command called tee which outputs stdin to file and stdout.
Unfortunately if the script is testing for a return code - tee will interfere - the return code will be that of tee and not the command - so I have read.
In any case it still means changing all the rc. scripts.
Last edited by harryhaller; 05-07-2008 at 09:09 AM.
This should redirecto output to a file - but you will lose it from your screen, so if you also want to keep it there you can use tee instead. Generated log file contains some terminal control codes in my case, so best way to read it is just to cat it to terminal - this way colors are preserved
Remember also to make sure that your main filesystem is writable from the start of the init - i changed my grub kernel option from ro to rw - it is genrally not a good idea to keep it that way, so after you check your log file you should change it back to ro.
syslog is a nice thing to check out, but as I noticed, logging application must be written to specifically log using syslogd. Many init scripts just print messages via standard output, which goes only to terminal. I guess that was the original question that started this thread.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.