summaryrefslogtreecommitdiff
path: root/archauto.sh
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2014-05-18 20:02:40 +0200
committerAndreas Baumann <abaumann@yahoo.com>2014-05-18 20:02:40 +0200
commitab29c5020bc55511fc3456319d428ff154a290f4 (patch)
tree088589aa49c7005c2bd4679d56077f53d08b371a /archauto.sh
parent3698a57fdaed1a4e3ce074113bbe876c9609a0d4 (diff)
downloadarchauto-ab29c5020bc55511fc3456319d428ff154a290f4.tar.gz
archauto-ab29c5020bc55511fc3456319d428ff154a290f4.tar.bz2
..
Diffstat (limited to 'archauto.sh')
-rwxr-xr-xarchauto.sh32
1 files changed, 17 insertions, 15 deletions
diff --git a/archauto.sh b/archauto.sh
index cdf2e16..6a247af 100755
--- a/archauto.sh
+++ b/archauto.sh
@@ -55,7 +55,7 @@ sed -i '/\[extra\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' ${MOUNT_PATH}/
sed -i '/\[community\]/aServer = http://10.0.2.2:8080/$repo/os/$arch' ${MOUNT_PATH}/etc/pacman.conf
# add our local packages into a separate repository
-#printf "\n[aba]\nServer = http://10.0.2.2:8080/\044repo/os/\044arch\n" >> ${MOUNT_PATH}/etc/pacman.conf
+printf "\n[aba]\nServer = http://10.0.2.2:8080/\044repo/os/\044arch\n" >> ${MOUNT_PATH}/etc/pacman.conf
# synchronize package databases for installed pacman
arch-chroot ${MOUNT_PATH} pacman -Sy
@@ -92,33 +92,35 @@ arch-chroot ${MOUNT_PATH} sh -c "echo 'root:123qwe' | chpasswd"
# synchronized time is a requirement, install and configure ntp
# we use a standard NTP server, later we can change that via cfengine
+# we don't have a network here (yet, still chrooted)
arch-chroot ${MOUNT_PATH} pacman --noconfirm -S ntp
-arch-chroot ${MOUNT_PATH} ntpdate 0.pool.ntp.org
+#while ! ping -c1 0.pool.ntp.org &>/dev/null; do :; done
+#arch-chroot ${MOUNT_PATH} ntpdate 0.pool.ntp.org
arch-chroot ${MOUNT_PATH} systemctl enable ntpd.service
# monitord needs netstat
-#arch-chroot ${MOUNT_PATH} pacman --noconfirm -S net-tools
+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
+arch-chroot ${MOUNT_PATH} pacman --noconfirm -S git
-#arch-chroot ${MOUNT_PATH} pacman --noconfirm -S cfengine
+arch-chroot ${MOUNT_PATH} pacman --noconfirm -S cfengine
# install rules for the machine from git
+# no net, must be done as cfengine rule, anyway, rule distribution should
+# happen only on generated cfengine masters
#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
-#arch-chroot ${MOUNT_PATH} systemctl enable cf-serverd.service
+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
# for debugging
-echo "Installation.. press any key to reboot."
-read
+#echo "Installation.. press any key to reboot."
+#read
-echo "Done."
+echo "Done.. Rebooting system.."
+sleep 3
-systemctl poweroff
+systemctl reboot