aboutsummaryrefslogtreecommitdiffstats
path: root/ci.d/archlinux
diff options
context:
space:
mode:
Diffstat (limited to 'ci.d/archlinux')
-rw-r--r--ci.d/archlinux33
1 files changed, 33 insertions, 0 deletions
diff --git a/ci.d/archlinux b/ci.d/archlinux
new file mode 100644
index 0000000..100bc60
--- /dev/null
+++ b/ci.d/archlinux
@@ -0,0 +1,33 @@
+#!/usr/bin/env sh
+
+# archlinux_enable_cron
+archlinux_enable_cron() {
+ lxc_do systemctl enable cronie
+}
+
+# archlinux_fix_network
+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/[email protected]" \
+ > /etc/systemd/system/[email protected]'
+ 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
+}