Update 2023-01-11 08:25 OpenBSD/amd64
This commit is contained in:
parent
6ecd2b115d
commit
7f757881b8
31
.etc/motd.sh
Normal file
31
.etc/motd.sh
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
OS=$(uname -s)
|
||||
OSVER=$(uname -r)
|
||||
OSARCH=$(uname -m)
|
||||
|
||||
CPUS=$(sysctl -n hw.ncpuonline)
|
||||
CPUMODEL=$(sysctl -n hw.model)
|
||||
CPUSPEED=$(sysctl -n hw.cpuspeed)
|
||||
|
||||
MEM=$(echo "$(sysctl -n hw.physmem)/1024/1024" | bc)
|
||||
|
||||
INET=$(ifconfig trunk0 | grep "inet" | grep -v fe80 | cut -d" " -f1,2)
|
||||
|
||||
printf '%s\n' ' ___ _____ ____ ____ _ _ _____ ____ ____
|
||||
/ __)( _ )( _ \( ___)( \/ )( _ )(_ _)( _ \
|
||||
( (__ )(_)( )(_) ))__) \ / )(_)( _)(_ )(_) )
|
||||
\___)(_____)(____/(____) \/ (_____)(____)(____/
|
||||
'
|
||||
|
||||
printf " OS: %s" "$OS"
|
||||
printf " Version: %s" "$OSVER"
|
||||
printf " Architecture: %s\n" "$OSARCH"
|
||||
|
||||
printf " CPU: %s\n" "${CPUS}x $CPUMODEL"
|
||||
printf " SPEED: %s" "${CPUSPEED}Mhz"
|
||||
printf " Memory: %s\n\n" "${MEM}MB"
|
||||
|
||||
printf " Interfaces:\n %s\n\n" "$INET"
|
||||
|
||||
printf " Welcome to $(hostname)\n\n"
|
@ -1,27 +1,28 @@
|
||||
# bioctl -c C -p /etc/keyfile -l 7233728656dc5031.a softraid0
|
||||
# mount /data
|
||||
#
|
||||
#if [ ! -f /usr/local/sbin/dhcp6c ]; then
|
||||
# logger "Wide DHCPv6: not installed"
|
||||
# exit
|
||||
#fi
|
||||
#
|
||||
#if [ ! -f /etc/dhcp6c.conf ]; then
|
||||
# logger "Wide DHCPv6: dhcp6c.conf not found"
|
||||
# exit
|
||||
#fi
|
||||
#
|
||||
#if [ ! -f /etc/hostname.trunk0 ]; then
|
||||
# logger "Wide DHCPv6: no trunk device found"
|
||||
# exit
|
||||
#fi
|
||||
#
|
||||
#if [ ! -f /etc/dhcp6cctlkey ]; then
|
||||
# logger "Wide DHCPv6: generating dhcp6cctlkey"
|
||||
# /usr/bin/openssl rand -base64 48 > /etc/dhcp6cctlkey
|
||||
# chmod 600 /etc/dhcp6cctlkey
|
||||
#fi
|
||||
#
|
||||
#logger "Starting Wide DHCPv6"
|
||||
#/usr/local/sbin/dhcp6c -c /etc/dhcp6c.conf trunk0
|
||||
|
||||
|
||||
if [ ! -f /usr/local/sbin/dhcp6c ]; then
|
||||
logger "Wide DHCPv6: not installed"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/dhcp6c.conf ]; then
|
||||
logger "Wide DHCPv6: dhcp6c.conf not found"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/hostname.trunk0 ]; then
|
||||
logger "Wide DHCPv6: no trunk device found"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/dhcp6cctlkey ]; then
|
||||
logger "Wide DHCPv6: generating dhcp6cctlkey"
|
||||
/usr/bin/openssl rand -base64 48 > /etc/dhcp6cctlkey
|
||||
chmod 600 /etc/dhcp6cctlkey
|
||||
fi
|
||||
|
||||
logger "Starting Wide DHCPv6"
|
||||
/usr/local/sbin/dhcp6c -c /etc/dhcp6c.conf trunk0
|
||||
sh /etc/motd.sh > /etc/motd
|
||||
|
4
.kshrc
4
.kshrc
@ -176,8 +176,8 @@ alias hn="sacc gopher://codevoid.de/1/hn"
|
||||
alias cv="sacc gopher://codevoid.de"
|
||||
|
||||
# pim
|
||||
alias notes="vim sftp://shell.codevoid.de/work/notes/notes.txt"
|
||||
alias events="vim sftp://shell.codevoid.de/work/notes/events.txt"
|
||||
alias notes="vim ~/Documents/notes/notes.txt"
|
||||
alias events="vim ~/Documents/events.txt"
|
||||
alias caly="ncal -Cy"
|
||||
alias calm="ncal -3C"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user