Re: newsyslog not reading /ect/rc.conf arguments?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Hoffman wrote: > At 6:14 PM +0300 5/5/10, Giorgos Keramidas wrote: >> How did you start newsyslog? There's an rc.d script that should *read* >> the flags from rc.conf: >> >>/etc/rc.d/newsyslog start > > Yes, exactly. I did '/etc/rc.d/newsyslog stop', then '/etc/rc.d/newsyslog > start'. > > > At 11:14 AM -0400 5/5/10, Greg Larkin wrote: >> newsyslog is invoked at boot time by the /etc/rc.d/newsyslog script to >> create missing log files, but after that, it's invoked regularly by cron >> to do the actual rotations. Check the /etc/crontab file and add your >> flags there, and you should be all set. > > Thanks, I see that now. > > This seems like a broken model: intial boot and later restarts uses arguments > from /etc/rc.conf, > but the periodic call does not. I don't think we want people modifying > /etc/crontab, do we? > Shouldn't /etc/crontab be calling '/etc/rc.d/newsyslog restart' instead? > > --Paul Hoffman Hi Paul, The problem here is that the /etc/rc.d/newsyslog script is used to initialize the system at boot time with missing log files specified by /etc/newsyslog.conf and not do any log rotation. The arguments passed to that invocation of newsyslog are (by default): - -C If specified once, then newsyslog will create any log files which do not exist, and which have the C flag specified in their config file entry. If specified multiple times, then newsyslog will create all log files which do not already exist. If log files are given on the command-line, then the -C or -CC will only apply to those specific log files. - -N Do not perform any rotations. This option is intended to be used with the -C or -CC options when creating log files is the only objective. Because -N is not used under normal circumstances, but should be used at boot time, you would need two different specifications for newsyslog flags in /etc/rc.conf, one for boot time and one for invocation from cron. That would complicate the rc system somewhat, so I would lean toward simply adding your preferred arguments to the crontab file. I modify the system crontab file on my machines, and I don't think there's a big problem doing that. Regards, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/sourcehosting/ - Follow me, follow you -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFL4b4w0sRouByUApARArxgAJ4gvUbJK69ApZ9tr1LNE1fWd20fjgCfc4db qyR2z9wgv53vIAYGQ+2u0HU= =8qby -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: newsyslog not reading /ect/rc.conf arguments?
At 6:14 PM +0300 5/5/10, Giorgos Keramidas wrote: >How did you start newsyslog? There's an rc.d script that should *read* >the flags from rc.conf: > >/etc/rc.d/newsyslog start Yes, exactly. I did '/etc/rc.d/newsyslog stop', then '/etc/rc.d/newsyslog start'. At 11:14 AM -0400 5/5/10, Greg Larkin wrote: >newsyslog is invoked at boot time by the /etc/rc.d/newsyslog script to >create missing log files, but after that, it's invoked regularly by cron >to do the actual rotations. Check the /etc/crontab file and add your >flags there, and you should be all set. Thanks, I see that now. This seems like a broken model: intial boot and later restarts uses arguments from /etc/rc.conf, but the periodic call does not. I don't think we want people modifying /etc/crontab, do we? Shouldn't /etc/crontab be calling '/etc/rc.d/newsyslog restart' instead? --Paul Hoffman ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: newsyslog not reading /ect/rc.conf arguments?
On Wed, 5 May 2010 08:01:26 -0700, Paul Hoffman wrote: > Greetings again. Running FreeBSD 8.0, I have added the following to > /etc/rc.conf: > > newsyslog_flags="-a /usr/old-log/" > > I have stopped and started newsyslog. However, the rotated logs are > still being written into /var/log. No errors appear in > /var/log/messages or in dmesg. How did you start newsyslog? There's an rc.d script that should *read* the flags from rc.conf: /etc/rc.d/newsyslog start ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: newsyslog not reading /ect/rc.conf arguments?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Hoffman wrote: > Greetings again. Running FreeBSD 8.0, I have added the following to > /etc/rc.conf: > newsyslog_flags="-a /usr/old-log/" > I have stopped and started newsyslog. However, the rotated logs are still > being written into /var/log. No errors appear in /var/log/messages or in > dmesg. > > Any clues? > > --Paul Hoffman Hi Paul, newsyslog is invoked at boot time by the /etc/rc.d/newsyslog script to create missing log files, but after that, it's invoked regularly by cron to do the actual rotations. Check the /etc/crontab file and add your flags there, and you should be all set. Hope that helps, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/sourcehosting/ - Follow me, follow you -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFL4Ys+0sRouByUApARAoYwAJ9VjG0SH6fOmlil+kvJtadlg+VX3QCgl7aq 7be/1LJn4coaeF12O9G49Vc= =0zhA -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
newsyslog not reading /ect/rc.conf arguments?
Greetings again. Running FreeBSD 8.0, I have added the following to /etc/rc.conf: newsyslog_flags="-a /usr/old-log/" I have stopped and started newsyslog. However, the rotated logs are still being written into /var/log. No errors appear in /var/log/messages or in dmesg. Any clues? --Paul Hoffman ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"