#!/usr/bin/env sh # archlinux_enable_cron archlinux_enable_cron() { lxc_do systemctl enable cronie } # archlinux_fix_network # # Only necessary with default LXC. A better fix would be to # append the following lines to /usr/share/lxc/config/common.seccomp: # # keyctl_chown errno 38 # keyctl errno 38 # archlinux_fix_network() { # We ForceConnect because the interface is up at container startup. lxc_do bash -c \ 'printf "%s\n" \ "Interface=eth0" \ "Connection=ethernet" \ "IP=dhcp" \ "ForceConnect=yes" > /etc/netctl/eth0' sleep 1 lxc_do netctl enable eth0 # Fix a bug in Netctl that prevents starting the service. lxc_do bash -c ' \ echo ".include /usr/lib/systemd/system/netctl@.service" \ > /etc/systemd/system/netctl@eth0.service' lxc_do systemctl daemon-reload sleep 1 # There's probably a better way to do this. lxc_do rm /etc/resolv.conf lxc_do bash -c 'echo "nameserver 10.0.3.1" > /etc/resolv.conf' # Should be good! lxc_do systemctl start netctl@eth0 }