lxc-alpine.in revision 982e7b6ea40ea57923f4f094858424debc1a5f7f
echo -n "Determining the latest release... " # parse APKINDEX to find the current versions BEGIN { split(pkglist,pkg) } $0 == "" { for (i in pkg) print(f["P"] "-" f["V"] ".apk") }') # clean up .apk meta files # verify checksum of the key echo "ERROR: checksum is missing for $keyname" # verify the static apk binary signature ::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 # if there is exactly one veth network entry, make sure it has an # associated mac address. sed 's/\(..\)/\1:/g; s/.$//')" cat <<EOF >> $path/config lxc.cap.drop = sys_module mac_admin mac_override sys_time # When using LXC with apparmor, uncomment the next line to run unconfined: #lxc.aa_profile = unconfined 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 rm 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>] [-R|--release <release>] [-a|--arch <arch>] [--rootfs <rootfs>] -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";;