lxc-alpine.in revision 2b49de9a3ff182c208148d780f6b26cf8cdd09d8
::sysinit:/sbin/rc sysinit tty1:12345:respawn:/sbin/getty 38400 tty1 ::ctrlaltdel:/sbin/reboot ::shutdown:/sbin/rc shutdown # configure the network using the dhcp # note that lxc will set up lo interface cat <<EOF > $rootfs/etc/network/interfaces echo "Setting up device nodes" cat <<EOF >> $path/config # When using LXC with apparmor, uncomment the next line to run unconfined: #lxc.aa_profile = unconfined #lxc.network.ipv4 = n.n.n.n #lxc.network.ipv4.gateway = auto lxc.cgroup.devices.deny = a lxc.cgroup.devices.allow = c 1:3 rwm lxc.cgroup.devices.allow = c 1:5 rwm lxc.cgroup.devices.allow = c 5:1 rwm lxc.cgroup.devices.allow = c 5:0 rwm lxc.cgroup.devices.allow = c 4:0 rwm lxc.cgroup.devices.allow = c 4:1 rwm lxc.cgroup.devices.allow = c 1:9 rwm lxc.cgroup.devices.allow = c 1:8 rwm lxc.cgroup.devices.allow = c 136:* rwm lxc.cgroup.devices.allow = c 5:2 rwm lxc.cgroup.devices.allow = c 254:0 rwm lxc.mount.entry=proc proc proc nodev,noexec,nosuid 0 0 lxc.mount.entry=run run tmpfs nodev,noexec,nosuid,relatime,size=1m,mode=0755 0 0 lxc.mount.entry=none dev/pts devpts gid=5,mode=620 0 0 Usage: $(basename $0) [-h|--help] [-r|--repository <url>] [-a|--arch <arch>] -p|--path <path> -n|--name <name> # split --myopt=foo=bar into --myopt foo=bar set -- ${
opt%=*} ${
opt#*=} "$@" # split opts -abc into -a -b -c set --
$(echo "${opt#-}" | sed 's/\(.\)/ -\1/g') "$@" if [ -z
"${path}" ];
then path=
"${default_path}/${name}" *)
die "unsupported architecture: $arch";;