Attached is a patch to remove the lines which start syslogd and klogd from /etc/rc and move this function to /etc/rc.d/sysklogd, the patch applies to the rc ports directory. Additionally, I've attached a tarball of the sysklogd ports directory with a /etc/rc.d/sysklogd init script, complete with modified Pkgfile and updated md5sums/footprint. -- ~predatorfreak GnuPG Public key: http://pred.dcaf-security.org/dcafsec-pub-gpgkey.asc
Attached is a patch to remove the lines which start syslogd and klogd from /etc/rc and move this function to /etc/rc.d/sysklogd, the patch
I think this is a good idea also because allows the user to replace easily the default system logger with another one. I definitely prefer metalog or syslog-ng over sysklogd and rsyslog (basically because of the possibility of configuring them with a text file with a quite intuitive syntax), but I have no idea about which one CRUX should choose as a default. Anyway it would be good to make easier to replace the default one and this patch would allow this. Giorgio Lando
Hi, On Thu, Sep 06, 2007 at 21:23:54 -0400, Brett Goulder wrote:
Attached is a patch to remove the lines which start syslogd and klogd from /etc/rc and move this function to /etc/rc.d/sysklogd,
Keep in mind that rc.single starts syslogd and klogd as well, but doesn't use rc.conf's SERVICES=() array, IOW if a user removes core/syslogd and the alternative *logd doesn't provide compatibility binaries this patch would break single user mode. Regards, Johannes -- Johannes Winkelmann mailto:jw@smts.ch Zurich, Switzerland http://jw.smts.ch
On Fri, Sep 07, 2007 at 10:12:30 +0200, Johannes Winkelmann wrote:
Hi,
On Thu, Sep 06, 2007 at 21:23:54 -0400, Brett Goulder wrote:
Attached is a patch to remove the lines which start syslogd and klogd from /etc/rc and move this function to /etc/rc.d/sysklogd,
Keep in mind that rc.single starts syslogd and klogd as well, but doesn't use rc.conf's SERVICES=() array, IOW if a user removes core/syslogd and the alternative *logd doesn't provide compatibility binaries this patch would break single user mode. Well, it would of course just break logging, not single user mode :-).
Johannes -- Johannes Winkelmann mailto:jw@smts.ch Zurich, Switzerland http://jw.smts.ch
On Fri, 7 Sep 2007 10:28:48 +0200 Johannes Winkelmann wrote:
On Fri, Sep 07, 2007 at 10:12:30 +0200, Johannes Winkelmann wrote:
Hi,
On Thu, Sep 06, 2007 at 21:23:54 -0400, Brett Goulder wrote:
Attached is a patch to remove the lines which start syslogd and klogd from /etc/rc and move this function to /etc/rc.d/sysklogd,
Keep in mind that rc.single starts syslogd and klogd as well, but doesn't use rc.conf's SERVICES=() array, IOW if a user removes core/syslogd and the alternative *logd doesn't provide compatibility binaries this patch would break single user mode. Well, it would of course just break logging, not single user mode :-).
Johannes
Well, rsyslog would be entirely capable of having symlinks as /usr/sbin/syslogd and /usr/sbin/klogd, as it operates in the exact same way, however, that might not be applicable to other logging daemons such as syslog-ng or metalog and might require a reworking of rc.single, which I'm willing to do. -- ~predatorfreak GnuPG Public key: http://pred.dcaf-security.org/dcafsec-pub-gpgkey.asc
On Fri, 7 Sep 2007 10:00:22 +0200 Giorgio Lando wrote:
Attached is a patch to remove the lines which start syslogd and klogd from /etc/rc and move this function to /etc/rc.d/sysklogd, the patch
I think this is a good idea also because allows the user to replace easily the default system logger with another one. I definitely prefer metalog or syslog-ng over sysklogd and rsyslog (basically because of the possibility of configuring them with a text file with a quite intuitive syntax), but I have no idea about which one CRUX should choose as a default. Anyway it would be good to make easier to replace the default one and this patch would allow this. Giorgio Lando _______________________________________________ CRUX mailing list CRUX@lists.crux.nu http://lists.crux.nu/mailman/listinfo/crux
/etc/syslog.conf for sysklogd is pretty intuitive, it's no less intuitive than syslog-ng's configuration file really. rsyslog's /etc/rsyslog.conf is the same thing, basically, so I see no reason to try to bring syslog-ng (which is pretty complex) into core or opt, personally. -- ~predatorfreak GnuPG Public key: http://pred.dcaf-security.org/dcafsec-pub-gpgkey.asc
On Fri, 7 Sep 2007 17:58:56 -0400 Brett Goulder wrote:
On Fri, 7 Sep 2007 10:28:48 +0200 Johannes Winkelmann wrote:
On Fri, Sep 07, 2007 at 10:12:30 +0200, Johannes Winkelmann wrote:
Hi,
On Thu, Sep 06, 2007 at 21:23:54 -0400, Brett Goulder wrote:
Attached is a patch to remove the lines which start syslogd and klogd from /etc/rc and move this function to /etc/rc.d/sysklogd,
Keep in mind that rc.single starts syslogd and klogd as well, but doesn't use rc.conf's SERVICES=() array, IOW if a user removes core/syslogd and the alternative *logd doesn't provide compatibility binaries this patch would break single user mode. Well, it would of course just break logging, not single user mode :-).
Johannes
Well, rsyslog would be entirely capable of having symlinks as /usr/sbin/syslogd and /usr/sbin/klogd, as it operates in the exact same way, however, that might not be applicable to other logging daemons such as syslog-ng or metalog and might require a reworking of rc.single, which I'm willing to do.
As a simple solution, I think it'd be easy enough to just create an /etc/rc.syslog symlink to say, /etc/rc.d/sysklogd or /etc/rc.d/rsyslog or whatever, this way in rc.single we can just call /tc/rc.syslog start, but it can start the logger of choice. The default link created by the rc package could be say, /etc/rc.d/sysklogd or whatever the default logger on the system is. I've already primed a port here and will submit a tarball/patch if you want. -- ~predatorfreak GnuPG Public key: http://pred.dcaf-security.org/dcafsec-pub-gpgkey.asc
On Thu, 6 Sep 2007 21:23:54 -0400 Brett Goulder wrote:
Attached is a patch to remove the lines which start syslogd and klogd from /etc/rc and move this function to /etc/rc.d/sysklogd, the patch applies to the rc ports directory. Additionally, I've attached a tarball of the sysklogd ports directory with a /etc/rc.d/sysklogd init script, complete with modified Pkgfile and updated md5sums/footprint.
Okay, as a follow up, I've redone this patch in a way that I think is much better than the first method I tried. First, the major difference is the introduction of a new variable to rc.conf, SYSLOG, which controls which system logger to start based on the name of the script in /etc/rc.d (e.g. SYSLOG=sysklogd starts sysklogd). This simplifies the handling of the single-user mode case, as we simply do the same thing we do for starting sysklogd in multi-user mode, which is: if [ -f /etc/rc.d/$SYSLOG -a -x /etc/rc.d/$SYSLOG ]; then echo -n " $SYSLOG" /etc/rc.d/$SYSLOG &> /dev/null || echo -n "[ERROR]" fi Which is essentially what is done in the services loop to start a service, but separated from that loop and with the syslog bits being removed, this is done right before entering the services loop in rc.multi. In rc.single, the echo bits are removed, to maintain similar operation to the original rc.single. This method requires a bit more code, but it doesn't need any symlinks in the system, removes the useless logger bits from starting syslog (as that would result in nothing being logged) and winds up being a better overall solution, in my opinion. A patch against rc is attached, which implements this. -- ~predatorfreak GnuPG Public key: http://pred.dcaf-security.org/dcafsec-pub-gpgkey.asc
participants (3)
-
Brett Goulder
-
Giorgio Lando
-
Johannes Winkelmann