name=$2
res=0
tree="\
+$rootfs/selinux \
$rootfs/dev \
$rootfs/home \
$rootfs/root \
return 1
fi
+ file $(which busybox) | grep -q "statically linked"
+ if [ $? -ne 0 ]; then
+ echo "warning : busybox is not statically linked."
+ echo "warning : The template script may not correctly"
+ echo "warning : setup the container environment."
+ fi
+
# copy busybox in the rootfs
cp $(which busybox) $rootfs/bin
if [ $? -ne 0 ]; then
# passwd exec must be setuid
chmod +s $rootfs/bin/passwd
+ touch $rootfs/etc/shadow
+ chroot $rootfs /bin/passwd -d root
- echo "root:root" | chroot $rootfs chpasswd
- echo "Root password is 'root', please change !"
+ echo "No password for 'root', please change !"
return 0
}
cat <<EOF >> $path/config
lxc.utsname = $name
lxc.tty = 1
+lxc.pts = 1
lxc.rootfs = $rootfs
EOF