Package: lxc
Version: 0.7.2-1
Severity: normal

This diff fixes the issues and also adds support for generating a random 
password. Such a pretty one-liner.


--- /usr/lib/lxc/templates/lxc-debian   2010-08-04 19:27:58.000000000 +0200
+++ /usr/lib/lxc/templates/lxc-squeeze  2011-06-16 17:06:32.844866359 +0200
@@ -63,6 +63,11 @@ EOF
 $hostname
 EOF
 
+    # create ttys
+    for i in 1 2 3 4; do
+       mknod -m 600 $rootfs/dev/tty$i c 4 $i
+    done
+
     # reconfigure some services
     if [ -z "$LANG" ]; then
        chroot $rootfs locale-gen en_US.UTF-8
@@ -77,8 +82,9 @@ EOF
     chroot $rootfs /usr/sbin/update-rc.d -f hwclock.sh remove
     chroot $rootfs /usr/sbin/update-rc.d -f hwclockfirst.sh remove
 
-    echo "root:root" | chroot $rootfs chpasswd
-    echo "Root password is 'root', please change !"
+    pass=$(< /dev/urandom tr -dc '!@#$%^&()_+=<>A-Za-z0-9\-' | head -c 8)
+    echo "root:$pass" | chroot $rootfs chpasswd
+    echo "Root password is '$pass'"
 
     return 0
 }
@@ -90,7 +96,7 @@ ifupdown,\
 locales,\
 libui-dialog-perl,\
 dialog,\
-dhcp-client,\
+isc-dhcp-client,\
 netbase,\
 net-tools,\
 iproute,\
@@ -110,7 +116,7 @@ openssh-server
     echo "Downloading debian minimal ..."
     debootstrap --verbose --variant=minbase --arch=$arch \
        --include $packages \
-       lenny $cache/partial-$arch http://ftp.debian.org/debian
+       squeeze $cache/partial-$arch http://ftp.debian.org/debian
     if [ $? -ne 0 ]; then
        echo "Failed to download the rootfs, aborting."
        return 1
@@ -136,7 +142,7 @@ copy_debian()
 
 install_debian()
 {
-    cache="/var/cache/lxc/debian"
+    cache="/var/cache/lxc/squeeze"
     rootfs=$1
     mkdir -p /var/lock/subsys/
     (



-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 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  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib
ii  libcap2                       1:2.19-3   support for getting/setting POSIX.

Versions of packages lxc recommends:
ii  libcap2-bin                   1:2.19-3   basic utility programs for using c

lxc suggests no packages.

-- no debconf information



-- 
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