Package: schroot
Version: 1.2.3-1
Severity: wishlist
Hi,
it would be nice if schroot set up an syslog socket in the chroot, at
least for rsyslog. Here's a coarse script that works for me:
#!/bin/sh
set -e
if [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
. "$CHROOT_SCRIPT_CONFIG"
elif [ "$2" = "ok" ]; then
echo "script-config file '$CHROOT_SCRIPT_CONFIG' does not exist"
exit 1
fi
if [ $1 = "setup-start" ] || [ $1 = "setup-recover" ]; then
echo "\$AddUnixListenSocket ${CHROOT_PATH}/dev/log" > /etc/rsyslog.d/schroot.conf
/etc/init.d/rsyslog reload
fi
if [ $1 = "setup-stop" ] ; then
rm -f /etc/rsyslog.d/schroot.conf
/etc/init.d/rsyslog reload
fi
Christoph
--
[email protected] | http://www.df7cb.de/
Acknowledgement sent
to Roger Leigh <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian buildd-tools Developers <[email protected]>.
(Mon, 18 Jan 2010 14:42:06 GMT) (full text, mbox, link).
On Mon, Jan 18, 2010 at 03:29:17PM +0100, Christoph Berg wrote:
> it would be nice if schroot set up an syslog socket in the chroot, at
> least for rsyslog. Here's a coarse script that works for me:
This does look really neat. I'm a little apprehensive about
modifying /etc during normal system operation though; does
rsyslog allow addition of sockets at runtime via another
interface, or placement of the files under /var?
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
Re: Roger Leigh 2010-01-18 <[email protected]>
> On Mon, Jan 18, 2010 at 03:29:17PM +0100, Christoph Berg wrote:
> > it would be nice if schroot set up an syslog socket in the chroot, at
> > least for rsyslog. Here's a coarse script that works for me:
>
> This does look really neat. I'm a little apprehensive about
> modifying /etc during normal system operation though; does
> rsyslog allow addition of sockets at runtime via another
> interface, or placement of the files under /var?
/etc/rsyslog.conf:
#
# Include all config files in /etc/rsyslog.d/
#
$IncludeConfig /etc/rsyslog.d/*.conf
I guess /etc/rsyslog.d/schroot.conf should just read
$IncludeConfig /var/lib/schroot/rsyslogd-interface.d/*.conf
which then could contain $UUID.conf files, or similar.
Btw, about robustness, rsyslogd doesn't mind if the socket directory
disappears or something. I did some stress-testing when adding a
socket for postfix in /etc/rsyslog.d/postfix.conf, and it wouldn't
break even if postfix was uninstalled. (Not so sure about the conf
directory.)
Christoph
--
[email protected] | http://www.df7cb.de/
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.