add some files
This commit is contained in:
17
files/init/update_issue.sh
Executable file
17
files/init/update_issue.sh
Executable 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
|
||||
Reference in New Issue
Block a user