diff --git a/LICENSE b/LICENSE index f7304ed..b2af461 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,6 @@ -# Unlimited use with this notice. (C) 2004-2018 George Georgalis +# (c) 2004-2022 George Georgalis unlimited use with this notice + +Copyright and use license are stored in respective files of this repo. In cases +where they are not and you require them, apply this file. diff --git a/boot/cos7/hostroot b/boot/cos7/hostroot new file mode 100644 index 0000000..5857c35 --- /dev/null +++ b/boot/cos7/hostroot @@ -0,0 +1,31 @@ +#!/bin/sh + +# REQUIRE: time +# BEFORE: etc +# PROVIDE: hostroot +# KEYWORD: cos7-boot + +set -e + +chkerr () { [ "$*" ] && { stderr ">>> $* <<<" ; return 1 ;} || true ;} #:> err stderr args return 1, noop if null + +[ -e /root/root.pub ] || chkerr "It only makes sense to run this if we have a root pub key ready..." + +install -m 755 -o root -g wheel -d /etc/ssh/auth +install -m 644 -o root -g wheel /root/root.pub /etc/ssh/auth/ +mv /root/root.pub /root/root.pub~ + +##:: Reconfigure sshd to allow root login and disallow password authentication. +[ -e /etc/ssh/sshd_config-orig ] || cp -p /etc/ssh/sshd_config /etc/ssh/sshd_config-orig +sed ' + s/.*PermitRootLogin.*/PermitRootLogin yes/ + s/.*PasswordAuthentication.*/PasswordAuthentication no/ + s/.*UsePam.*/UsePam no/ + s=.*AuthorizedKeysFile.*=AuthorizedKeysFile /etc/ssh/auth/%u.pub= + ' /etc/ssh/sshd_config >/etc/ssh/sshd_config-tmp \ + && mv /etc/ssh/sshd_config-tmp /etc/ssh/sshd_config + +systemctl enable sshd || true +systemctl stop sshd || true +systemctl start sshd +# systemctl status sshd diff --git a/boot/cos7/yum-desktop b/boot/cos7/yum-desktop new file mode 100644 index 0000000..7952293 --- /dev/null +++ b/boot/cos7/yum-desktop @@ -0,0 +1,12 @@ +#!/bin/sh + +# REQUIRE: yum-epel +# BEFORE: +# PROVIDE: yum-desktop +# KEYWORD: cos7 + +set -e + +yum -y groupinstall Xfce +yum -y install xrdp xterm firefox + diff --git a/boot/cos7/yum-epel b/boot/cos7/yum-epel new file mode 100644 index 0000000..5299e7e --- /dev/null +++ b/boot/cos7/yum-epel @@ -0,0 +1,11 @@ +#!/bin/sh + +# REQUIRE: +# BEFORE: +# PROVIDE: yum-epel +# KEYWORD: cos7 + +set -e + +yum install epel-release -y + diff --git a/boot/cos7/yum-main b/boot/cos7/yum-main new file mode 100644 index 0000000..82ea478 --- /dev/null +++ b/boot/cos7/yum-main @@ -0,0 +1,18 @@ +#!/bin/sh + +# REQUIRE: +# BEFORE: +# PROVIDE: yum-main +# KEYWORD: cos7 + +set -e + +yum -y install fping mtr ndjbdns net-tools nmap rsync telnet lua +yum -y install bc gnupg2 lsof rcs tmux vim-enhanced yum-utils git + +yum -y install gnuplot rrdtool units aspell + +yum -y groupinstall development +yum -y install ShellCheck +# npm nodejs + diff --git a/boot/cos7/yum-min b/boot/cos7/yum-min new file mode 100644 index 0000000..3fcc823 --- /dev/null +++ b/boot/cos7/yum-min @@ -0,0 +1,12 @@ +#!/bin/sh + +# REQUIRE: +# BEFORE: +# PROVIDE: yum-min +# KEYWORD: cos7 + +set -e + +yum -y install fping mtr ndjbdns net-tools nmap rsync telnet lua +yum -y install bc gnupg2 lsof rcs tmux vim-enhanced yum-utils git + diff --git a/boot/ubt/hostroot b/boot/ubt/hostroot index f601bfe..5857c35 100644 --- a/boot/ubt/hostroot +++ b/boot/ubt/hostroot @@ -7,7 +7,7 @@ set -e -chkerr () { [ -n "$*" ] && echo "ERR > > > $0: $* < < < " >&2 && exit 1 ;} +chkerr () { [ "$*" ] && { stderr ">>> $* <<<" ; return 1 ;} || true ;} #:> err stderr args return 1, noop if null [ -e /root/root.pub ] || chkerr "It only makes sense to run this if we have a root pub key ready..." @@ -25,7 +25,7 @@ sed ' ' /etc/ssh/sshd_config >/etc/ssh/sshd_config-tmp \ && mv /etc/ssh/sshd_config-tmp /etc/ssh/sshd_config +systemctl enable sshd || true systemctl stop sshd || true systemctl start sshd -systemctl enable sshd # systemctl status sshd diff --git a/skel/.bash_profile b/skel/.bash_profile index 8d87129..68b1d49 100644 --- a/skel/.bash_profile +++ b/skel/.bash_profile @@ -1,13 +1,11 @@ # ~/.bash_profile -# Unlimited use with this notice (c) George Georgalis +# (c) 2006-2022 George Georgalis unlimited use with this notice -# Get the aliases and functions -if [ -f ~/.bashrc ]; then - . ~/.bashrc -fi +# source any legacy rc +test -e ~/.bashrc && . ~/.bashrc || true -# User specific environment and startup programs - -[ -e "$HOME/.profile" ] && . "$HOME/.profile" +# source root env +test -e ~/.profile && . ~/.profile +# no further env setup here.