The chroot is an empty directory containing a copy of /etc/localtime
to enable the use of the correct timestamp when logging for the
process trapped in the chroot.
lldpd (0.4.2)
- * Misc fix:
+ * Misc fixes:
+ fix a crash when an interface is removed
+ + copy /etc/localtime into chroot before starting lldpd daemon to
+ ensure correct timestamps for logs.
-- Vincent Bernat <bernat@luffy.cx>
prog="lldpd"
binary=/usr/sbin/lldpd
pidfile=/var/run/lldpd.pid
+chroot=/var/run/lldpd
+
+build_chroot()
+{
+ [ -d $chroot ] || mkdir -p $chroot
+ [ -d $chroot/etc ] || mkdir $chroot/etc
+ [ -f $chroot/etc/localtime ] || [ ! -f /etc/localtime ] || \
+ cp /etc/localtime $chroot/etc/localtime
+}
start() {
[ -x $binary ] || exit 5
RETVAL=1
failure
else
+ build_chroot
daemon --pidfile=$pidfile $binary $OPTIONS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/lldpd