summaryrefslogtreecommitdiff
path: root/archauto.sh
diff options
context:
space:
mode:
Diffstat (limited to 'archauto.sh')
-rwxr-xr-xarchauto.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/archauto.sh b/archauto.sh
index 643edc4..3974678 100755
--- a/archauto.sh
+++ b/archauto.sh
@@ -37,9 +37,22 @@ mkdir -p ${MOUNT_PATH}
mount ${INSTALL_DRIVE}${PARTITION_ROOT} ${MOUNT_PATH}
export http_proxy=http://192.168.1.12:3128
+export no_proxy=localhost,10.0.2.2
+
+# use our local cache
+sed -i '/\[core\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' /etc/pacman.conf
+
+# switch off signature for now
+sed -i 's/^SigLevel.*/SigLevel = Never/g' /etc/pacman.conf
pacstrap ${MOUNT_PATH} filesystem grep findutils coreutils glibc bash pacman mkinitcpio kernel26 dhcpcd
+# use our local cache in installed pacman
+sed -i '/\[core\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' ${MOUNT_PATH}/etc/pacman.conf
+
+# switch off signature for now in installed pacman
+sed -i 's/^SigLevel.*/SigLevel = Never/g' ${MOUNT_PATH}/etc/pacman.conf
+
arch-chroot ${MOUNT_PATH} pacman --noconfirm -S grub-bios
arch-chroot ${MOUNT_PATH} grub-install --target=i386-pc --recheck ${INSTALL_DRIVE}
cp ${MOUNT_PATH}/usr/share/locale/en@quot/LC_MESSAGES/grub.mo ${MOUNT_PATH}/boot/grub/locale/en.mo
@@ -67,9 +80,6 @@ arch-chroot ${MOUNT_PATH} systemctl enable dhcpcd@ens3.service
arch-chroot ${MOUNT_PATH} sh -c "echo 'root:xx' | chpasswd"
-# switch off signature for now
-sed -i 's/^SigLevel.*/SigLevel = Never/g' ${MOUNT_PATH}/etc/pacman.conf
-
# synchronized time is a requirement, install and configure ntp
# we use a standard NTP server, later we can change that via cfengine
arch-chroot ${MOUNT_PATH} pacman --noconfirm -S ntp
@@ -82,15 +92,15 @@ arch-chroot ${MOUNT_PATH} pacman --noconfirm -S net-tools
# we use 'git' to manage our promises
arch-chroot ${MOUNT_PATH} pacman --noconfirm -S git-core
-# switch proxy off now, we go local now
-unset http_proxy
-
arch-chroot ${MOUNT_PATH} pacman --noconfirm -v -U http://10.0.2.2:8080/qdbm-1.8.78-1-x86_64.pkg.tar.xz
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
arch-chroot ${MOUNT_PATH} git clone ${GIT_REPO} /srv/cfengine/masterfiles
+# create machine keys
+arch-chroot ${MOUNT_PATH} cf-key
+
# enable cfengine
arch-chroot ${MOUNT_PATH} systemctl enable cf-execd.service
arch-chroot ${MOUNT_PATH} systemctl enable cf-monitord.service