On Sat, Sep 30, 2006 at 10:20:56AM +0200, Loïc Minier wrote:
[Loïc Minier]
> Now that I think again about it, I suppose what happened is that
> some services with init scripts were upgraded, then initscripts, but
> since the old initscript was used in the first part of the upgrade,
> the tmpfs was mounted.

Right.  This is the change I applied to avoid mounting /lib/init/rw/
in chroot environments.  I am still curious about vserver environments
and why the package break there.

Index: debian/initscripts/postinst
===================================================================
--- debian/initscripts/postinst (revision 982)
+++ debian/initscripts/postinst (revision 983)
@@ -69,6 +69,13 @@
        done
 }

+chrooted() {
+  if [ -r /proc/1/root ]; then
+    return 1
+  fi
+  return 0
+}
+
 #
 # Initialize rcS default file.
 #
@@ -170,8 +177,12 @@
        rmdir /.root
 fi

+#
+# Make sure packages needing a writable tmpfs available can depend on
+# initscripts version 2.86.ds1-27 or newer to get it.
+#
 if dpkg --compare-versions "$PREV_VER" lt "2.86.ds1-27" \
-   && [ ! -f /lib/init/rw/.ramfs ] ; then
+   && [ ! -f /lib/init/rw/.ramfs ] && ! chrooted ; then
        [ -f /etc/default/tmpfs ] && . /etc/default/tmpfs

        RW_OPT=


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to