diff -u eglibc-2.12.1/debian/changelog eglibc-2.12.1/debian/changelog --- eglibc-2.12.1/debian/changelog +++ eglibc-2.12.1/debian/changelog @@ -1,3 +1,13 @@ +eglibc (2.12.1-0ubuntu12) natty; urgency=low + + * debian/debhelper.in/libc.postinst: re-add chroot check before running + "telinit u" as this causes a reboot under d-i (which uses busybox as + /sbin/init) with upstart's telinit (which sends SIGTERM to init, not + SIGHUP as sysvinit's telinit does); thanks Colin Watson for the analysis; + LP: #694772. + + -- Loïc Minier Tue, 04 Jan 2011 14:10:43 +0100 + eglibc (2.12.1-0ubuntu11) natty; urgency=low * Update to the eglibc 2.12 branch (r12365). diff -u eglibc-2.12.1/debian/debhelper.in/libc.postinst eglibc-2.12.1/debian/debhelper.in/libc.postinst --- eglibc-2.12.1/debian/debhelper.in/libc.postinst +++ eglibc-2.12.1/debian/debhelper.in/libc.postinst @@ -240,9 +240,17 @@ fi # end upgrading and $preversion lt 2.12 fi # Upgrading - # Restart init. If it fails, there is nothing we can do, so - # just ignore the error - telinit u 2> /dev/null || true ; sleep 1 + # try to restart init, unless in a chroot (may only be tested under Linux); + # the chroot test is important in the case of e.g. d-i using busybox as + # /sbin/init and installing upstart in a chroot: upstart's telinit sends + # init a SIGTERM and busybox reboots on SIGTERM + if [ "`uname -s`" != Linux ] || [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then + # we ignore errors because there is nothing we can do if that fails, + # and some weird/broken environments (e.g. no /dev/initctl but a + # telinit expecting one) fail to run "telinit u" + telinit u 2>/dev/null || true + sleep 1 + fi fi #DEBHELPER#