summaryrefslogtreecommitdiff
path: root/archauto.sh
diff options
context:
space:
mode:
Diffstat (limited to 'archauto.sh')
-rwxr-xr-xarchauto.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/archauto.sh b/archauto.sh
index 7640978..5971050 100755
--- a/archauto.sh
+++ b/archauto.sh
@@ -8,6 +8,8 @@ LABEL_BOOT=BOOT
LABEL_SWAP=SWAP
LABEL_ROOT=ROOT
MOUNT_PATH=/mnt
+NTP_SERVER=192.168.1.1
+GIT_REPO=git://andreasbaumann.dyndns.org/cfenginetests.git
echo "Installing minimalistic base system.."
@@ -67,7 +69,16 @@ arch-chroot ${MOUNT_PATH} systemctl enable dhcpcd@ens3.service
arch-chroot ${MOUNT_PATH} sh -c "echo 'root:xx' | chpasswd"
# switch off signature for now
-arch-chroot ${MOUNT_PATH} sed -i 's/^SigLevel.*/SigLevel = Never/g' /etc/pacman.conf
+sed -i 's/^SigLevel.*/SigLevel = Never/g' ${MOUNT_PATH}/etc/pacman.conf
+
+# synchronized time is a requirement, install and configure ntp
+arch-chroot ${MOUNT_PATH} pacman --noconfirm -S ntp
+
+arch-chroot ${MOUNT_PATH} ntpdate ${NTP_SERVER}
+
+sed -i '/^server .*.pool.ntp.org/d' ${MOUNT_PATH}/etc/ntp.conf
+echo "server ${NTP_SERVER}" >> ${MOUNT_PATH}/etc/ntp.conf
+arch-chroot ${MOUNT_PATH} systemctl enable ntpd.service
# monitord needs netstat
arch-chroot ${MOUNT_PATH} pacman --noconfirm -S net-tools
@@ -82,15 +93,13 @@ arch-chroot ${MOUNT_PATH} pacman --noconfirm -v -U http://10.0.2.2:8080/qdbm-1.8
arch-chroot ${MOUNT_PATH} pacman --noconfirm -v -U http://10.0.2.2:8080/cfengine-3.4.4-2-x86_64.pkg.tar.xz
# install rules for the machine from git
-# TODO
+arch-chroot ${MOUNT_PATH} git clone ${GIT_REPO} /srv/cfengine/masterfiles
# enable cfengine
arch-chroot ${MOUNT_PATH} systemctl enable cf-execd.service
arch-chroot ${MOUNT_PATH} systemctl enable cf-monitord.service
arch-chroot ${MOUNT_PATH} systemctl enable cf-serverd.service
-echo "Done. Press any key to poweroff."
-
-read x
+echo "Done."
systemctl poweroff