[Git-commits] [grml/grml-scripts] : grml-chroot: properly handle multiple chroots [Clo...

Michael Prokop mika at grml.org
Fri Jan 13 03:06:22 CET 2012


  Branch: refs/heads/mika/grml_chroot_multi
  Home:   https://github.com/grml/grml-scripts
  Commit: becca789cff5c7cebae97f116c4cc6d9f64562c4
      https://github.com/grml/grml-scripts/commit/becca789cff5c7cebae97f116c4cc6d9f64562c4
  Author: Michael Prokop <mika at grml.org>
  Date:   2012-01-12 (Thu, 12 Jan 2012)

  Changed paths:
    M usr_sbin/grml-chroot

  Log Message:
  -----------
  grml-chroot: properly handle multiple chroots [Closes: issue659]

Iff /tmp is available inside the chroot then use /tmp/grml-chroot
for storing information about active grml-chroot sessions.

This patch is based on work by Marc Haber and addresses the following issue
reported by him in http://bts.grml.org/grml/issue659:

| grml-chroot does not properly handle the situation when the user decides to
| chroot into the same chroot multiple times (for example, in different windows).
| When the first chroot terminates, the unconditional umount leaves the other
| chroots without mounted /proc, /dev etc.

Sadly this isn't bullet proof though.
Quoting Gebi from the according discussion on IRC (with his permission):

02:48 < gebi> you know that /tmp was to bind mounted too if you want to use X?
02:49 < gebi> not a good idea to use a bind mounted /tmp inside of the chroot for saving state which ultimatly goes back to the
          base image
02:50 < gebi> mrud: but you e.g HAVE to mount --bind /tmp chroot/tmp to use X in chroot
02:51 < gebi> so it would be no fun to use chroot/tmp as state dir for grml-chroot, because on unmounting your files would not be
          there anymore
02:51 < gebi> because hidden by the mount --bind

Thanks to Ulrich Dangel for code review and improvement suggestions.





More information about the Git-commits mailing list