From b2d0904a139ab839c65b6f26dba1ee6a27490937 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 25 May 2019 11:48:56 +0200 Subject: small fixes --- archauto.sh | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'archauto.sh') diff --git a/archauto.sh b/archauto.sh index 4f8ce69..d478355 100755 --- a/archauto.sh +++ b/archauto.sh @@ -1,5 +1,9 @@ #!/bin/bash +# enable for debugging (single stepping line by line) +#set -x +#trap read debug + exec > >(tee -i logfile.txt) exec 2>&1 @@ -10,13 +14,22 @@ PARTITION_BOOT=1 PARTITION_ROOT=2 LABEL_ROOT=ROOT MOUNT_PATH=/mnt -HOST=192.168.130.1 +HOST=192.168.120.1 HTTP_SERVER=http://${HOST}:8088 -IP=192.168.130.2 +IP=192.168.120.101 +NETWORK=192.168.120.0 NETMASK=255.255.255.0 PREFIX=24 HOSTNAME=arch32 +# set up networking +ip addr add dev eth0 ${IP} +ip route add to ${NETWORK}/${PREFIX} dev eth0 via ${HOST} +ip route add to default dev eth0 via ${HOST} +cat > /etc/resolv.conf <${MOUNT_PATH}/etc/pacman.d/mirrorlist < ${MOUNT_PATH}/etc/fstab @@ -74,8 +90,8 @@ genfstab -L -p ${MOUNT_PATH} > ${MOUNT_PATH}/etc/fstab echo "Installing boot loader.." arch-chroot ${MOUNT_PATH} pacman --noconfirm -S grub -arch-chroot ${MOUNT_PATH} grub-mkconfig -o /boot/grub/grub.cfg arch-chroot ${MOUNT_PATH} grub-install --force /dev/vda +arch-chroot ${MOUNT_PATH} grub-mkconfig -o /boot/grub/grub.cfg echo "Configuring base system.." @@ -97,6 +113,8 @@ Address=${IP}/${PREFIX} Gateway=${HOST} EOF +ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf + arch-chroot ${MOUNT_PATH} systemctl enable systemd-networkd arch-chroot ${MOUNT_PATH} systemctl enable systemd-resolved -- cgit v1.2.3-54-g00ecf