diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2013-05-16 11:53:01 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2013-05-16 11:53:01 +0200 |
commit | 4508e0090e3c073980f1eadb8cba39dc07232e79 (patch) | |
tree | f2acedd72fe1132f93fbd207de6e5235e449a5aa | |
parent | 81c34184ce6ecafbb38fcf963538c1f6d2894165 (diff) | |
download | archauto-4508e0090e3c073980f1eadb8cba39dc07232e79.tar.gz archauto-4508e0090e3c073980f1eadb8cba39dc07232e79.tar.bz2 |
added ntp and git clone for cfengine rules
-rw-r--r-- | README | 3 | ||||
-rwxr-xr-x | archauto.sh | 19 |
2 files changed, 14 insertions, 8 deletions
@@ -94,8 +94,6 @@ systemctl start sshd # via cfengine # packages net-tools gdisk -# pacman -S libedit ntp -# ntpdate 0.pool.ntp.org, systemctl enable ntpd Running the system ------------------ @@ -105,7 +103,6 @@ qemu-system-x86_64 -hda arch.img -net nic \ -m 386 -display curses \ -machine accel=kvm -redir tcp:222::22 - Links ----- 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 |