NAME="sshd"
CONFFILE="lxc.conf"
-FSTABFILE="fstab"
-UTSNAME="virtsshd"
+MNTFILE="mount.conf"
+UTSNAME=
IPV4="172.20.0.20/24"
create() {
lxc.network.link = br0
lxc.network.ipv4 = $IPV4
lxc.network.name = eth0
-lxc.mount = $FSTABFILE
+lxc.mount = $MNTFILE
lxc.rootfs = $ROOTFS
EOF
-cat <<EOF > $FSTABFILE
+cat <<EOF > $MNTFILE
/lib $(pwd)/$ROOTFS/lib none ro,bind 0 0
/bin $(pwd)/$ROOTFS/bin none ro,bind 0 0
/usr $(pwd)/$ROOTFS/usr none ro,bind 0 0
EOF
if [ "$(arch)" = "x86_64" ]; then
-cat <<EOF >> $FSTABFILE
+cat <<EOF >> $MNTFILE
/lib64 $(pwd)/$ROOTFS/lib64 none ro,bind 0 0
EOF
fi
lxc-create -n $NAME -f $CONFFILE
- rm -f $FSTABFILE
+ rm -f $MNTFILE
rm -f $CONFFILE
echo "Done."