summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Rebischke <Chris.Rebischke@posteo.de>2017-05-06 21:38:25 +0200
committerChristian Rebischke <Chris.Rebischke@posteo.de>2017-05-06 21:38:25 +0200
commitdb17977b2f37b3359540ef9c0f3ffbe9861f97b7 (patch)
tree0c92b18b3a57155745045c0b05b3c8ac11450c16
parent99b792c785a6088df8d170ca6f4ffa2a45457333 (diff)
downloadarch-boxes32-db17977b2f37b3359540ef9c0f3ffbe9861f97b7.tar.xz
added new postinstall.sh, moved the controllers to postinstall.sh and added the script to vagrant.json
-rw-r--r--http/install-chroot.sh15
-rw-r--r--provision/postinstall.sh11
-rw-r--r--vagrant.json1
3 files changed, 23 insertions, 4 deletions
diff --git a/http/install-chroot.sh b/http/install-chroot.sh
index 392e24f..8b5bdec 100644
--- a/http/install-chroot.sh
+++ b/http/install-chroot.sh
@@ -4,12 +4,8 @@ set -e
set -x
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
-hostnamectl set-hostname "archlinux"
sed -i -e 's/^#\(en_US.UTF-8\)/\1/' /etc/locale.gen
locale-gen
-localectl set-locale "LANG=en_US.UTF-8"
-localectl set-keymap "us"
-localectl set-xx1-keymap "us"
# setting vagrant user credentials
echo -e 'vagrant\nvagrant' | passwd
@@ -29,6 +25,17 @@ curl --output /home/vagrant/.ssh/authorized_keys --location https://raw.github.c
chown vagrant:vagrant /home/vagrant/.ssh/authorized_keys
chmod 0600 /home/vagrant/.ssh/authorized_keys
+# setup unpredictable kernel names
+ln -s /dev/null /etc/systemd/network/99-default.link
+
+cat <<EOF > /etc/systemd/networkd/eth0.network
+[Match]
+Name=eth0
+
+[Network]
+DHCP=ipv4
+EOF
+
# enabling important services
systemctl enable sshd
systemctl enable systemd-networkd
diff --git a/provision/postinstall.sh b/provision/postinstall.sh
new file mode 100644
index 0000000..9aa2881
--- /dev/null
+++ b/provision/postinstall.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+set -x
+
+# setting hostname, locales, etc
+hostnamectl set-hostname "archlinux"
+localectl set-locale "LANG=en_US.UTF-8"
+localectl set-keymap "us"
+localectl set-xx1-keymap "us"
+timedatectl set-ntp true
diff --git a/vagrant.json b/vagrant.json
index de5a632..912b18c 100644
--- a/vagrant.json
+++ b/vagrant.json
@@ -45,6 +45,7 @@
{
"type": "shell",
"scripts": [
+ "provision/postinstall.sh",
"provision/virtualbox.sh",
"provision/cleanup.sh"
],