diff --git a/arch-template.json b/arch-template.json index ff74f8b..dc32c40 100644 --- a/arch-template.json +++ b/arch-template.json @@ -83,7 +83,7 @@ "http_directory": "srv", "boot_wait": "5s", "boot_command": [ - "", + "", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/enable-ssh.sh", "/usr/bin/curl -O http://{{ .HTTPIP }}:{{ .HTTPPort }}/poweroff.timer", "/usr/bin/bash ./enable-ssh.sh" diff --git a/scripts/install-base.sh b/scripts/install-base.sh index 08dfc23..02ea14c 100644 --- a/scripts/install-base.sh +++ b/scripts/install-base.sh @@ -120,6 +120,6 @@ echo ">>>> install-base.sh: Completing installation.." # Turning network interfaces down to make sure SSH session was dropped on host. # More info at: https://www.packer.io/docs/provisioners/shell.html#handling-reboots echo '==> Turning down network interfaces and rebooting' -for i in $(/usr/bin/netstat -i | /usr/bin/tail +3 | /usr/bin/awk '{print $1}'); do /usr/bin/ip link set ${i} down; done +for i in $(/usr/bin/ip -o link show | /usr/bin/awk -F': ' '{print $2}'); do /usr/bin/ip link set ${i} down; done /usr/bin/systemctl reboot echo ">>>> install-base.sh: Installation complete!" diff --git a/wrapacker b/wrapacker index 6ae77a5..64aaefd 100755 --- a/wrapacker +++ b/wrapacker @@ -265,7 +265,7 @@ fi if [[ $country ]]; then if validate_country "$country"; then - MIRRORLIST="https://www.archlinux.org/mirrorlist/?country=${country}&protocol=http&protocol=https&ip_version=4&use_mirror_status=on" + MIRRORLIST="https://archlinux.org/mirrorlist/?country=${country}&protocol=http&protocol=https&ip_version=4&use_mirror_status=on" MIRROR=$(curl -s "$MIRRORLIST" | awk '/#Server/{ print $3; exit }' | sed 's|/$repo.*||') else warn 'INVALID COUNTRY SPECIFIED - %s' "$country"