Package: lxc
Version: 0.9.0~rc1-4
Severity: normal
Tags: patch

Dear Maintainer,

I'm creating containers with a preseed file using the shipped
lxc-debian (lxc-debconfig) template, like that:

# lxc-create -n postgresql -t debian -- --preseed-file=/root/lxc.preseed

The relevant stanza in the preseed file is:

lxc-debconfig lxc-debconfig/mount0/entry string /dev dev none ro,bind 0 0

(but could be any other entry, that's just an example).
The entry in the config file is create fine but at the end of the
lxc-create run there's a new empty "dev" directory in my current
working directory.

The obvious intention is to create the needed mount points in the
rootfs of the container before it is first started.

I've pinpointed it to the lxc-debconfig template and created a
patch. Although the patch might be inappropriate if absolute
paths to the mountpoints are to be allowed. In that case it would
probably be better to cd into the rootfs before the mkdir
commands instead.


Regards,
Niels Boehm


--- a/usr/share/lxc/templates/lxc-debconfig     2013-03-10 22:17:41.000000000 
+0100
+++ b/usr/share/lxc/templates/lxc-debconfig     2013-04-06 10:02:58.018394354 
+0200
@@ -824,9 +824,9 @@
 
                        if [ -f "${_SOURCE}" ]
                        then
-                               mkdir -p "$(dirname ${_TARGET})"
+                               mkdir -p "${_ROOTFS}/$(dirname ${_TARGET})"
                        else
-                               mkdir -p "${_TARGET}"
+                               mkdir -p "${_ROOTFS}/${_TARGET}"
                        fi
                fi
        done

-- System Information:
Debian Release: 7.0
  APT prefers testing-updates
  APT policy: (940, 'testing-updates'), (930, 'testing-proposed-updates'), 
(930, 'stable-updates'), (930, 'testing'), (830, 'proposed-updates'), (830, 
'stable'), (90, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lxc depends on:
ii  debconf [debconf-2.0]  1.5.49
ii  libapparmor1           2.7.103-4
ii  libc6                  2.13-38
ii  libcap2                1:2.22-1.2
ii  multiarch-support      2.13-38

Versions of packages lxc recommends:
ii  debootstrap  1.0.48
ii  libcap2-bin  1:2.22-1.2

Versions of packages lxc suggests:
ii  debian-keyring      2012.11.15
ii  gpgv                1.4.12-7
pn  live-debconfig-doc  <none>
ii  rsync               3.0.9-4

-- Configuration Files:
/etc/lxc/default.conf changed [not included]

-- debconf information:
* lxc/directory: /var/lib/lxc
  lxc/title:
* lxc/auto: true


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to