From 5a66d3ef01e3cbe378f76e976c9fb6a5803ce833 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 18 Sep 2023 13:55:24 +0200 Subject: [PATCH] committing changes in /etc made by "apt install -y byobu ccze screen" Packages with configuration changes: +byobu 5.133-1 all +ccze 0.2.1-5 amd64 +gawk 1:5.1.0-1 amd64 +screen 4.8.0-6 amd64 Package changes: +byobu 5.133-1 all +ccze 0.2.1-5 amd64 +gawk 1:5.1.0-1 amd64 +libutempter0 1.2.1-2 amd64 +python3-newt 0.52.21-4+b3 amd64 +screen 4.8.0-6 amd64 +tmux 3.1c-1+deb11u1 amd64 --- .etckeeper | 11 +++- alternatives/awk | 2 +- alternatives/awk.1.gz | 2 +- alternatives/nawk | 2 +- alternatives/nawk.1.gz | 2 +- byobu/backend | 4 ++ byobu/socketdir | 11 ++++ cczerc | 96 +++++++++++++++++++++++++++++ init.d/screen-cleanup | 49 +++++++++++++++ profile.d/Z97-byobu.sh | 41 +++++++++++++ profile.d/gawk.csh | 11 ++++ profile.d/gawk.sh | 31 ++++++++++ rcS.d/S14screen-cleanup | 1 + screenrc | 108 +++++++++++++++++++++++++++++++++ shells | 2 + tmpfiles.d/screen-cleanup.conf | 2 + 16 files changed, 370 insertions(+), 5 deletions(-) create mode 100644 byobu/backend create mode 100644 byobu/socketdir create mode 100644 cczerc create mode 100755 init.d/screen-cleanup create mode 100644 profile.d/Z97-byobu.sh create mode 100644 profile.d/gawk.csh create mode 100644 profile.d/gawk.sh create mode 120000 rcS.d/S14screen-cleanup create mode 100644 screenrc create mode 100644 tmpfiles.d/screen-cleanup.conf diff --git a/.etckeeper b/.etckeeper index ab9b1b0..a94246a 100755 --- a/.etckeeper +++ b/.etckeeper @@ -46,7 +46,6 @@ mkdir -p './security/namespace.d' mkdir -p './skel/bin' mkdir -p './ssh/ssh_config.d' mkdir -p './ssh/sshd_config.d' -mkdir -p './tmpfiles.d' mkdir -p './udev/hwdb.d' maybe chmod 0755 '.' maybe chmod 0700 '.etckeeper' @@ -359,11 +358,15 @@ maybe chmod 0644 'bind/zones/uhu-banane.net.zone' maybe chmod 0644 'bind/zones/uhu-banane.org.zone' maybe chmod 0644 'bindresvport.blacklist' maybe chmod 0755 'binfmt.d' +maybe chmod 0755 'byobu' +maybe chmod 0644 'byobu/backend' +maybe chmod 0644 'byobu/socketdir' maybe chmod 0755 'ca-certificates' maybe chmod 0644 'ca-certificates.conf' maybe chmod 0755 'ca-certificates/update.d' maybe chmod 0755 'calendar' maybe chmod 0644 'calendar/default' +maybe chmod 0644 'cczerc' maybe chmod 0755 'chrony' maybe chmod 0644 'chrony/chrony.conf' maybe chmod 0644 'chrony/chrony.conf.ucf-dist' @@ -987,6 +990,7 @@ maybe chmod 0755 'init.d/rsync' maybe chmod 0755 'init.d/rsyslog' maybe chmod 0755 'init.d/salt-master' maybe chmod 0755 'init.d/salt-minion' +maybe chmod 0755 'init.d/screen-cleanup' maybe chmod 0755 'init.d/sendsigs' maybe chmod 0755 'init.d/single' maybe chmod 0755 'init.d/slapd' @@ -1770,8 +1774,11 @@ maybe chmod 0755 'ppp/ip-up.d/chrony' maybe chmod 0755 'ppp/ip-up.d/postfix' maybe chmod 0644 'profile' maybe chmod 0755 'profile.d' +maybe chmod 0644 'profile.d/Z97-byobu.sh' maybe chmod 0644 'profile.d/bash_completion.sh' maybe chmod 0644 'profile.d/fbrehm.sh' +maybe chmod 0644 'profile.d/gawk.csh' +maybe chmod 0644 'profile.d/gawk.sh' maybe chmod 0644 'protocols' maybe chmod 0755 'python' maybe chmod 0644 'python/debian_config' @@ -1847,6 +1854,7 @@ maybe chmod 0644 'salt/pki/minion/minion_master.pub' maybe chmod 0644 'salt/proxy' maybe chmod 0755 'salt/proxy.d' maybe chmod 0644 'salt/roster' +maybe chmod 0644 'screenrc' maybe chmod 0755 'security' maybe chmod 0644 'security/access.conf' maybe chmod 0644 'security/faillock.conf' @@ -1977,6 +1985,7 @@ maybe chmod 0644 'terminfo/README' maybe chmod 0644 'tigrc' maybe chmod 0644 'timezone' maybe chmod 0755 'tmpfiles.d' +maybe chmod 0644 'tmpfiles.d/screen-cleanup.conf' maybe chmod 0644 'ucf.conf' maybe chmod 0755 'udev' maybe chmod 0755 'udev/hwdb.d' diff --git a/alternatives/awk b/alternatives/awk index 6190dcb..19ba657 120000 --- a/alternatives/awk +++ b/alternatives/awk @@ -1 +1 @@ -/usr/bin/mawk \ No newline at end of file +/usr/bin/gawk \ No newline at end of file diff --git a/alternatives/awk.1.gz b/alternatives/awk.1.gz index 5d8f19b..134262b 120000 --- a/alternatives/awk.1.gz +++ b/alternatives/awk.1.gz @@ -1 +1 @@ -/usr/share/man/man1/mawk.1.gz \ No newline at end of file +/usr/share/man/man1/gawk.1.gz \ No newline at end of file diff --git a/alternatives/nawk b/alternatives/nawk index 6190dcb..19ba657 120000 --- a/alternatives/nawk +++ b/alternatives/nawk @@ -1 +1 @@ -/usr/bin/mawk \ No newline at end of file +/usr/bin/gawk \ No newline at end of file diff --git a/alternatives/nawk.1.gz b/alternatives/nawk.1.gz index 5d8f19b..134262b 120000 --- a/alternatives/nawk.1.gz +++ b/alternatives/nawk.1.gz @@ -1 +1 @@ -/usr/share/man/man1/mawk.1.gz \ No newline at end of file +/usr/share/man/man1/gawk.1.gz \ No newline at end of file diff --git a/byobu/backend b/byobu/backend new file mode 100644 index 0000000..d71e61c --- /dev/null +++ b/byobu/backend @@ -0,0 +1,4 @@ +# BYOBU_BACKEND can currently be "screen" or "tmux" +# Override this on a per-user basis by editing "$BYOBU_CONFIG_DIR/backend" +# or by launching either "byobu-screen" or "byobu-tmux" instead of "byobu". +BYOBU_BACKEND="tmux" diff --git a/byobu/socketdir b/byobu/socketdir new file mode 100644 index 0000000..05ab041 --- /dev/null +++ b/byobu/socketdir @@ -0,0 +1,11 @@ +# Set the location of the socket directory that byobu will use. +# On Debian/Ubuntu systems, this is in /var/run/screen, but on +# other distros, it might be elsewhere, such as /tmp/screens +# depending on your compilation. +# +# This file will be sourced by both shell scripts and python code, +# so please ensure that: +# * the variable name is SOCKETDIR +# * there is no space around the "=" +# * and that the path value is quoted +SOCKETDIR="/var/run/screen" diff --git a/cczerc b/cczerc new file mode 100644 index 0000000..0d1b4be --- /dev/null +++ b/cczerc @@ -0,0 +1,96 @@ +# Configuration file for ccze +# +# Available 'pre' attributes: bold, underline, underscore, blink, reverse +# Available colors: black, red, green, yellow, blue, magenta, cyan, white +# Available bgcolors: on_black, on_red, on_green, on_yellow, on_blue, on_magenta, on_cyan, on_white +# +# You can also use item names in color definition, like: +# +# default blue +# date 'default' +# +# Here you defined default color to blue, and date color to default value's color, so +# your date color is blue. (You can only use predefined item names!) + +# item color # comment (what is color, or why it's that ;) + +date bold cyan # Dates and times +host bold blue # Host names and IP numbers +process green # Sender process +pid bold white # PIDs (Process IDs) +pid-sqbr bold green # Brackets around PIDs +default cyan # Default (not colorised) +email bold green # E-mail addresses +subject magenta # Subject lines (procmail) +dir bold cyan # Directory names +file bold cyan # File names +size bold white # Sizes +user bold yellow # Usernames +httpcodes bold white # HTTP status codes (200, 404, etc) +getsize magenta # Transfer sizes +get green # HTTP GET +post bold green # HTTP POST +head green # HTTP HEAD +put bold green # HTTP PUT +connect green # HTTP CONNECT +trace green # HTTP TRACE +unknown cyan # Unknown message +gettime bold magenta # Transfer times +uri bold green # URIs (http://, ftp://, etc) +ident bold white # Remote user (proxy/http) +ctype white # Content type (http/proxy) +error bold red # Error messages +miss red # Proxy MISS +hit bold yellow # Proxy HIT +deny bold red # Proxy DENIED +refresh bold white # Proxy REFRESH +swapfail bold white # Proxy SWAPFAIL +debug white # Debug messages +warning red # Warnings +direct bold white # Proxy DIRECT +parent bold yellow # Proxy PARENT +swapnum blue on_white # Proxy swap number +create bold white # Proxy CREATE +swapin bold white # Proxy SWAPIN +swapout bold white # Proxy SWAPOUT +release bold white # Proxy RELEASE +mac bold white # MAC addresses +version bold white # Version numbers +address bold white # Memory addresses +numbers white # Numbers +signal bold yellow # Signal names +service bold magenta # Services +prot magenta # Protocols +bad bold yellow # "Bad words" +good bold green # "Good words" +system bold cyan # "System words" +incoming bold white # Incoming mail (exim) +outgoing white # Outgoing mail (exim) +uniqn bold white # Unique ID (exim) +repeat white # 'last message repeated N times' +field green # RFC822 Field +chain cyan # Chain names (ulogd) +percentage bold yellow # Percentages +ftpcodes cyan # FTP codes +keyword bold yellow # Various keywords (like PHP in php.log, etc) +pkgstatus green # package status (dpkg) +pkg bold red # package name (dpkg) + +# CSS codes for the HTML output +cssblack black +cssboldblack black +cssred darkred +cssboldred red +cssgreen #00C000 +cssboldgreen lime +cssyellow brown +cssboldyellow yellow +cssblue blue +cssboldblue slateblue +csscyan darkcyan +cssboldcyan cyan +cssmagenta darkmagenta +cssboldmagenta magenta +csswhite grey +cssboldwhite white +cssbody #404040 diff --git a/init.d/screen-cleanup b/init.d/screen-cleanup new file mode 100755 index 0000000..3eb4185 --- /dev/null +++ b/init.d/screen-cleanup @@ -0,0 +1,49 @@ +#!/bin/sh +# $Id: init,v 1.3 2004/03/16 01:43:45 zal Exp $ +# +# Script to remove stale screen named pipes on bootup. +# + +### BEGIN INIT INFO +# Provides: screen-cleanup +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Default-Start: S +# Default-Stop: +# Short-Description: screen sessions cleaning +# Description: Cleans up the screen session directory and fixes its +# permissions if needed. +### END INIT INFO + +set -e + +test -f /usr/bin/screen || exit 0 + +SCREENDIR=/run/screen + +case "$1" in +start) + if test -L $SCREENDIR || ! test -d $SCREENDIR; then + rm -f $SCREENDIR + mkdir $SCREENDIR + chown root:utmp $SCREENDIR + [ -x /sbin/restorecon ] && /sbin/restorecon $SCREENDIR + fi + find $SCREENDIR -type p -delete +# If the local admin has used dpkg-statoverride to install the screen +# binary with different set[ug]id bits, change the permissions of +# $SCREENDIR accordingly + BINARYPERM=`stat -c%a /usr/bin/screen` + if [ "$BINARYPERM" -ge 4000 ]; then + chmod 0755 $SCREENDIR + elif [ "$BINARYPERM" -ge 2000 ]; then + chmod 0775 $SCREENDIR + else + chmod 1777 $SCREENDIR + fi + ;; +stop|restart|reload|force-reload) + ;; +esac + +exit 0 diff --git a/profile.d/Z97-byobu.sh b/profile.d/Z97-byobu.sh new file mode 100644 index 0000000..51b2887 --- /dev/null +++ b/profile.d/Z97-byobu.sh @@ -0,0 +1,41 @@ +# Z97-byobu.sh - allow any user to opt into auto-launching byobu +# Copyright (C) 2011 Canonical Ltd. +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Allow any user to opt into auto-launching byobu by setting LC_BYOBU=1 +# Apologies for borrowing the LC_BYOBU namespace, but: +# a) it's reasonable to assume that no one else is using LC_BYOBU +# b) LC_* is sent and receieved by most /etc/ssh/ssh*_config + +if [ -r "/usr/bin/byobu-launch" ]; then + if [ "$LC_BYOBU" = "0" ]; then + true + elif [ "$LC_BYOBU" = "1" ]; then + . /usr/bin/byobu-launch + elif [ -e "/etc/byobu/autolaunch" ]; then + . /usr/bin/byobu-launch + elif [ "$LC_TERMTYPE" = "byobu" ]; then + . /usr/bin/byobu-launch + elif [ "$LC_TERMTYPE" = "byobu-screen" ]; then + export BYOBU_BACKEND="screen" + . /usr/bin/byobu-launch + elif [ "$LC_TERMTYPE" = "byobu-tmux" ]; then + export BYOBU_BACKEND="tmux" + . /usr/bin/byobu-launch + fi +fi + +# vi: syntax=sh ts=4 noexpandtab diff --git a/profile.d/gawk.csh b/profile.d/gawk.csh new file mode 100644 index 0000000..583d5bc --- /dev/null +++ b/profile.d/gawk.csh @@ -0,0 +1,11 @@ +alias gawkpath_default 'unsetenv AWKPATH; setenv AWKPATH `gawk -v x=AWKPATH "BEGIN {print ENVIRON[x]}"`' + +alias gawkpath_prepend 'if (! $?AWKPATH) setenv AWKPATH ""; if ($AWKPATH == "") then; unsetenv AWKPATH; setenv AWKPATH `gawk -v x=AWKPATH "BEGIN {print ENVIRON[x]}"`; endif; setenv AWKPATH "\!*"":$AWKPATH"' + +alias gawkpath_append 'if (! $?AWKPATH) setenv AWKPATH ""; if ($AWKPATH == "") then; unsetenv AWKPATH; setenv AWKPATH `gawk -v x=AWKPATH "BEGIN {print ENVIRON[x]}"`; endif; setenv AWKPATH "$AWKPATH"":\!*"' + +alias gawklibpath_default 'unsetenv AWKLIBPATH; setenv AWKLIBPATH `gawk -v x=AWKLIBPATH "BEGIN {print ENVIRON[x]}"`' + +alias gawklibpath_prepend 'if (! $?AWKLIBPATH) setenv AWKLIBPATH ""; if ($AWKLIBPATH == "") then; unsetenv AWKLIBPATH; setenv AWKLIBPATH `gawk -v x=AWKLIBPATH "BEGIN {print ENVIRON[x]}"`; endif; setenv AWKLIBPATH "\!*"":$AWKLIBPATH"' + +alias gawklibpath_append 'if (! $?AWKLIBPATH) setenv AWKLIBPATH ""; if ($AWKLIBPATH == "") then; unsetenv AWKLIBPATH; setenv AWKLIBPATH `gawk -v x=AWKLIBPATH "BEGIN {print ENVIRON[x]}"`; endif; setenv AWKLIBPATH "$AWKLIBPATH"":\!*"' diff --git a/profile.d/gawk.sh b/profile.d/gawk.sh new file mode 100644 index 0000000..c35471f --- /dev/null +++ b/profile.d/gawk.sh @@ -0,0 +1,31 @@ +gawkpath_default () { + unset AWKPATH + export AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'` +} + +gawkpath_prepend () { + [ -z "$AWKPATH" ] && AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'` + export AWKPATH="$*:$AWKPATH" +} + +gawkpath_append () { + [ -z "$AWKPATH" ] && AWKPATH=`gawk 'BEGIN {print ENVIRON["AWKPATH"]}'` + export AWKPATH="$AWKPATH:$*" +} + +gawklibpath_default () { + unset AWKLIBPATH + export AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'` +} + +gawklibpath_prepend () { + [ -z "$AWKLIBPATH" ] && \ + AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'` + export AWKLIBPATH="$*:$AWKLIBPATH" +} + +gawklibpath_append () { + [ -z "$AWKLIBPATH" ] && \ + AWKLIBPATH=`gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'` + export AWKLIBPATH="$AWKLIBPATH:$*" +} diff --git a/rcS.d/S14screen-cleanup b/rcS.d/S14screen-cleanup new file mode 120000 index 0000000..205268c --- /dev/null +++ b/rcS.d/S14screen-cleanup @@ -0,0 +1 @@ +../init.d/screen-cleanup \ No newline at end of file diff --git a/screenrc b/screenrc new file mode 100644 index 0000000..032db64 --- /dev/null +++ b/screenrc @@ -0,0 +1,108 @@ +# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $ +# +# /etc/screenrc +# +# This is the system wide screenrc. +# +# You can use this file to change the default behavior of screen system wide +# or copy it to ~/.screenrc and use it as a starting point for your own +# settings. +# +# Commands in this file are used to set options, bind screen functions to +# keys, redefine terminal capabilities, and to automatically establish one or +# more windows at the beginning of your screen session. +# +# This is not a comprehensive list of options, look at the screen manual for +# details on everything that you can put in this file. +# + +# ------------------------------------------------------------------------------ +# SCREEN SETTINGS +# ------------------------------------------------------------------------------ + +#startup_message off +#nethack on + +#defflow on # will force screen to process ^S/^Q +deflogin on +#autodetach off + +# turn visual bell on +vbell on +vbell_msg " Wuff ---- Wuff!! " + +# define a bigger scrollback, default is 100 lines +defscrollback 1024 + +# ------------------------------------------------------------------------------ +# SCREEN KEYBINDINGS +# ------------------------------------------------------------------------------ + +# Remove some stupid / dangerous key bindings +bind ^k +#bind L +bind ^\ +# Make them better +bind \\ quit +bind K kill +bind I login on +bind O login off +bind } history + +# An example of a "screen scraper" which will launch urlview on the current +# screen window +# +#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview" + +# ------------------------------------------------------------------------------ +# TERMINAL SETTINGS +# ------------------------------------------------------------------------------ + +# The vt100 description does not mention "dl". *sigh* +termcapinfo vt100 dl=5\E[M + +# turn sending of screen messages to hardstatus off +hardstatus off +# Set the hardstatus prop on gui terms to set the titlebar/icon title +termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007 +# use this for the hard status string +hardstatus string "%h%? users: %u%?" + +# An alternative hardstatus to display a bar at the bottom listing the +# windownames and highlighting the current windowname in blue. (This is only +# enabled if there is no hardstatus setting for your terminal) +# +#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" + +# set these terminals up to be 'optimal' instead of vt100 +termcapinfo xterm*|linux*|rxvt*|Eterm* OP + +# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E> +# (This fixes the "Aborted because of window size change" konsole symptoms found +# in bug #134198) +termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' + +# To get screen to add lines to xterm's scrollback buffer, uncomment the +# following termcapinfo line which tells xterm to use the normal screen buffer +# (which has scrollback), not the alternate screen buffer. +# +#termcapinfo xterm|xterms|xs|rxvt ti@:te@ + +# Enable non-blocking mode to better cope with flaky ssh connections. +defnonblock 5 + +# ------------------------------------------------------------------------------ +# STARTUP SCREENS +# ------------------------------------------------------------------------------ + +# Example of automatically running some programs in windows on screen startup. +# +# The following will open top in the first window, an ssh session to monkey +# in the next window, and then open mutt and tail in windows 8 and 9 +# respectively. +# +# screen top +# screen -t monkey ssh monkey +# screen -t mail 8 mutt +# screen -t daemon 9 tail -f /var/log/daemon.log + diff --git a/shells b/shells index 29b2701..47c32bf 100644 --- a/shells +++ b/shells @@ -5,3 +5,5 @@ /bin/rbash /bin/zsh /usr/bin/zsh +/usr/bin/tmux +/usr/bin/screen diff --git a/tmpfiles.d/screen-cleanup.conf b/tmpfiles.d/screen-cleanup.conf new file mode 100644 index 0000000..8eec909 --- /dev/null +++ b/tmpfiles.d/screen-cleanup.conf @@ -0,0 +1,2 @@ +# This file is generated by /var/lib/dpkg/info/screen.postinst upon package configuration +d /run/screen 1777 root utmp -- 2.39.5