diff --git a/docs/changelog.md b/docs/changelog.md index cd6fc3f..1866d49 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 0.4.3 + +- 2024-03-25 + - Features: + - Updates to `fujinet-lib` merged into main branch + - `run-nc` script added to make demo'ing `netcat` to the VM guest `localhost` easier + ## 0.4.2 - 2024-03-20 diff --git a/files/run-nc b/files/run-nc new file mode 100755 index 0000000..c12a900 --- /dev/null +++ b/files/run-nc @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +YELLOW="\e[1;33m" +BLUE="\e[1;36m" +GRAY="\e[37m" +DKBLUE_BACK="\e[44m" +NOCOLOR="\e[0m" + +MY_IP="$(ip addr | grep -A1 "ether" | awk '/inet/ {print $2}' | sed 's#/24##')" + +clear +echo -e "${GRAY}" +figlet -f mini -ck "Local IP address:" +echo -e "${YELLOW}" +figlet -f banner -c "$MY_IP" +echo -e "${NOCOLOR}" + +echo -e "${GRAY}Connect to netcat with the following code in Altirra:" +echo -e "${BLUE}${DKBLUE_BACK}" +echo -e "\tOPEN #1,12,2,\"N:TCP://$MY_IP:6502/\"" +echo -e "\tPRINT #1;\"HELLO FROM ATARI #x\"" +echo -e "${NOCOLOR}${GRAY}" +echo -e "Running command ${BLUE}nc -l -p 6502${NOCOLOR}${GRAY} ... " +echo -e "${GRAY}Sent from the Atari:${NOCOLOR}" +echo -e "${YELLOW}" +netcat -l -p 6502 diff --git a/fujinet.pkr.hcl b/fujinet.pkr.hcl index 9a4f715..69997ef 100644 --- a/fujinet.pkr.hcl +++ b/fujinet.pkr.hcl @@ -147,6 +147,11 @@ build { ] } + provisioner "file" { + source = "files/run-nc" + destination = "/home/${local.username}/.local/bin/run-nc" + } + provisioner "file" { source = "files/altirra-logo.png" destination = "/home/${local.username}/Pictures/altirra-logo.png" diff --git a/scripts/user-setup.sh b/scripts/user-setup.sh index af38eaa..4d3443c 100644 --- a/scripts/user-setup.sh +++ b/scripts/user-setup.sh @@ -1,12 +1,13 @@ #!/usr/bin/env bash set -x -sudo apt-get install -y epiphany-browser +sudo apt-get install -y epiphany-browser figlet mkdir "/home/$P_USERNAME/Desktop" mkdir "/home/$P_USERNAME/Pictures" mkdir "/home/$P_USERNAME/Downloads" mkdir "/home/$P_USERNAME/Documents" +mkdir "/home/$P_USERNAME/.local/bin" mkdir -p "${P_FN_PATH:-/home/$P_USERNAME/FujiNet}" DISABLE_LIGHT_LOCKER_PATH="/home/$P_USERNAME/.config/autostart/light-locker.desktop"