add some files

This commit is contained in:
2025-09-14 15:12:14 -07:00
parent 0fcf53e525
commit fe097187ef
9 changed files with 240 additions and 2 deletions

17
files/init/update_issue.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Retrieve IP addresses of interfaces
ip_addresses=$(ip -o -4 addr show | awk '(/eth|en|wl|wn|vmpbr0|tun/) {print $2 "," $4 "\r"}' | column -s , -t)
# Get OS Build Info
os_build=$(cat /etc/os-release | grep PRETTY | cut -d "\"" -f 2)
# Put hostname in a variable that probably isn't reserved or anything
host_name=$(hostname)
# Write to /etc/issue
{
echo $os_build
echo "Hostname: ${host_name}"
echo "IP Addresses:"
echo "$ip_addresses"
} > /etc/issue