1
Description: lxc-ubuntu: use relative path as target for bind mount
2
An absolute path will be interpreted as absolute with respect to the
4
This patch will be forwarded.
5
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
6
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/968371
9
Index: lxc-0.7.5/templates/lxc-ubuntu.in
10
===================================================================
11
--- lxc-0.7.5.orig/templates/lxc-ubuntu.in 2012-03-29 22:05:46.000000000 +0000
12
+++ lxc-0.7.5/templates/lxc-ubuntu.in 2012-03-30 02:59:02.738912355 +0000
14
# bind-mount the user's path into the container's /home
15
h=`getent passwd $user | cut -d: -f 6`
17
- echo "$h $h none bind 0 0" >> $path/fstab
18
+ # use relative path in container
20
+ while [ ${h2:0:1} = "/" ]; do
23
+ echo "$h $h2 none bind 0 0" >> $path/fstab
25
# Make sure the group exists in container
26
grp=`echo $pwd | cut -d: -f 4` # group number for $user