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
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
Re: Roger Leigh 2010-01-18 <20100118144108.GF3781@codelibre.net> /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