[23857] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r23467 - trunk/debathena/config/reactivate/debian

daemon@ATHENA.MIT.EDU (Andrew M Boardman)
Thu Feb 19 17:00:45 2009

Date: Thu, 19 Feb 2009 17:00:02 -0500
From: Andrew M Boardman <amb@MIT.EDU>
Message-Id: <200902192200.n1JM029L014859@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: amb
Date: 2009-02-19 17:00:01 -0500 (Thu, 19 Feb 2009)
New Revision: 23467

Modified:
   trunk/debathena/config/reactivate/debian/athena-login-snapshot
   trunk/debathena/config/reactivate/debian/changelog
Log:
* Added /dev/pts and /dev/shm to the bind-mount list such that matlab and
  mathematica can run.
* Made /media a shared mount (which also required pre-bind-mounting it
  to itself) so that USB automounts are visible inside the chroot.
* Reversed the order of unmounting such that it's more likely to succeed.


Modified: trunk/debathena/config/reactivate/debian/athena-login-snapshot
===================================================================
--- trunk/debathena/config/reactivate/debian/athena-login-snapshot	2009-02-19 19:48:52 UTC (rev 23466)
+++ trunk/debathena/config/reactivate/debian/athena-login-snapshot	2009-02-19 22:00:01 UTC (rev 23467)
@@ -27,7 +27,7 @@
 lockfile=/var/run/athena-snapshot.lock
 snapshotsize=10G
 event=$1
-binddirs="/proc /sys /dev /var/run /var/lock /afs /mit /tmp /media /home"
+binddirs="/proc /sys /dev /dev/shm /dev/pts /var/run /var/lock /var/tmp /afs /mit /tmp /media /home"
 addgroups="admin lpadmin adm fuse cdrom floppy audio video plugdev scanner dialout"
 
 rootdev=$(awk '$2 == "/" { dev=$1 } END { print dev }' /proc/mounts)
@@ -69,6 +69,11 @@
     mkdir -p /login
     mount "$loginlvpath" /login
 
+    # Enable subtree operations on /media by making it a mount point,
+    # then share it.
+    mount --bind /media /media
+    mount --make-shared /media
+
     # Bind-mount a bunch of stuff from the real root into the chroot.
     for dir in $binddirs; do
       mount --bind "$dir" "/login$dir"
@@ -113,10 +118,14 @@
     # Clean up the bind mounts we made earlier.
     # If any of these fail, the umount of /login will fail below,
     # and we will reboot.
-    for dir in $binddirs; do
+    for dir in $(echo $binddirs|tac -s\ ); do
       umount "/login$dir" || true
     done
 
+    # Unmount /media, which we bind-mounted to itself earlier so it could be shared
+    # and then bind-mounted.
+    umount /media
+
     # Attempt to unmount /login.
     if ! umount /login; then
       # There may be an unkillable process in I/O wait keeping the

Modified: trunk/debathena/config/reactivate/debian/changelog
===================================================================
--- trunk/debathena/config/reactivate/debian/changelog	2009-02-19 19:48:52 UTC (rev 23466)
+++ trunk/debathena/config/reactivate/debian/changelog	2009-02-19 22:00:01 UTC (rev 23467)
@@ -1,3 +1,13 @@
+debathena-reactivate (1.9) unstable; urgency=low
+
+  * Added /dev/pts and /dev/shm to the bind-mount list such that matlab and
+    mathematica can run.
+  * Made /media a shared mount (which also required pre-bind-mounting it
+    to itself) so that USB automounts are visible inside the chroot.
+  * Reversed the order of unmounting such that it's more likely to succeed.
+
+ -- andrew m. boardman <amb@mit.edu>  Thu, 19 Feb 2009 16:51:30 -0500
+	
 debathena-reactivate (1.8) unstable; urgency=low
 
   * Try to kill remaining user processes using any of the login


home help back first fref pref prev next nref lref last post