Hello!
I've created a (completely untested) patch with the solution
you seemed to have agreed on (see attachment).
It would be appreciated if someone was willing to test the patch.
If it happens to solve the problem, it would be nice to know if
maintainers would appreciate a NMU or not.
--
Regards,
Andreas Henriksson
--- udisks-1.0.1+git20100614/debian/udisks.postinst 2010-06-14 16:11:43.000000000 +0200
+++ udisks-1.0.1+git20100614.fixed/debian/udisks.postinst 2010-08-30 11:50:33.000000000 +0200
@@ -1,7 +1,19 @@
#!/bin/sh
set -e
-if [ "$1" = "configure" ]; then
+# this helper function borrowed from udev.postinst
+chrooted() {
+ 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 and hence return false.
+ return 1
+ fi
+ echo "A chroot environment has been detected, udisks not restarted."
+ return 0
+}
+
+if [ "$1" = "configure" ] && ! chrooted ; then
# stop udisks-daemon
if start-stop-daemon --stop --quiet --exec /usr/lib/udisks/udisks-daemon; then
DO_RESTART=1