From ab29c5020bc55511fc3456319d428ff154a290f4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 18 May 2014 20:02:40 +0200 Subject: .. --- archauto.sh | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'archauto.sh') 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 -- cgit v1.2.3-54-g00ecf