Author: aurel32
Date: 2007-04-18 11:31:23 +0000 (Wed, 18 Apr 2007)
New Revision: 2089
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/debhelper.in/libc.postinst
Log:
* debhelper.in/libc.postinst: fix the chroot detection, code taken from
udev scripts.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2007-04-17 21:19:46 UTC (rev
2088)
+++ glibc-package/trunk/debian/changelog 2007-04-18 11:31:23 UTC (rev
2089)
@@ -31,8 +31,10 @@
* debhelper.in/libc.preinst: check for a non-dpkg owned libc6 in /lib/tls.
Closes: #419189.
* Update Dutch debconf translation, by Bart Cornelis. Closes: #419729.
+ * debhelper.in/libc.postinst: fix the chroot detection, code taken from
+ udev scripts.
- -- Aurelien Jarno <[EMAIL PROTECTED]> Tue, 17 Apr 2007 23:18:51 +0200
+ -- Aurelien Jarno <[EMAIL PROTECTED]> Wed, 18 Apr 2007 13:30:36 +0200
glibc (2.5-2) unstable; urgency=low
Modified: glibc-package/trunk/debian/debhelper.in/libc.postinst
===================================================================
--- glibc-package/trunk/debian/debhelper.in/libc.postinst 2007-04-17
21:19:46 UTC (rev 2088)
+++ glibc-package/trunk/debian/debhelper.in/libc.postinst 2007-04-18
11:31:23 UTC (rev 2089)
@@ -304,10 +304,10 @@
$badsysvinitver)
;;
*)
- if [ -x /sbin/init -a -x /bin/readlink ]; then
- if [ "$(readlink /proc/1/exe 2>/dev/null)" =
"/sbin/init" ]; then
- (init u ; sleep 1)
- fi
+ if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root
2>/dev/null)" ]; then
+ # the devicenumber/inode pair of / is the same as that
of /sbin/init's
+ # root, so we're *not* in a chroot
+ (init u ; sleep 1)
fi
;;
esac
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]