From a9e58a3101183463b96e661c94adf6fd51992c27 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Fri, 26 Feb 2021 00:53:36 +0000 Subject: bumped new release --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 4a13f79..c93ee9d 100644 --- a/index.html +++ b/index.html @@ -2,11 +2,11 @@ - Tribu System Doc + System Doc -

Tribu System Documentation

+

System Documentation

- Core OS Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/linux/tty-terminal.html b/linux/tty-terminal.html index 4da3798..77c7b9d 100644 --- a/linux/tty-terminal.html +++ b/linux/tty-terminal.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux Index

2.4. Consoles, terminals and shells

@@ -71,10 +71,10 @@ - Core OS Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/dnsmasq.html b/tools/dnsmasq.html index 7c923dd..4d738e4 100644 --- a/tools/dnsmasq.html +++ b/tools/dnsmasq.html @@ -83,9 +83,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/fail2ban.html b/tools/fail2ban.html index 38be371..71bbdf9 100644 --- a/tools/fail2ban.html +++ b/tools/fail2ban.html @@ -46,9 +46,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/gitolite.html b/tools/gitolite.html index ea07129..fd9ad8c 100644 --- a/tools/gitolite.html +++ b/tools/gitolite.html @@ -826,9 +826,9 @@ Tools Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/gnupg.html b/tools/gnupg.html index 89dfe84..a0da5d2 100644 --- a/tools/gnupg.html +++ b/tools/gnupg.html @@ -51,7 +51,7 @@
         $ gpg2 --full-gen-key
-        gpg (GnuPG) 2.1.11; Copyright (C) 2020 Free Software Foundation, Inc.
+        gpg (GnuPG) 2.1.11; Copyright (C) 2021 Free Software Foundation, Inc.
         This is free software: you are free to change and redistribute it.
         There is NO WARRANTY, to the extent permitted by law.
 
@@ -295,9 +295,9 @@
         Tools Index
 
         

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/index.html b/tools/index.html index dc11f57..1febb5e 100644 --- a/tools/index.html +++ b/tools/index.html @@ -201,9 +201,9 @@ Documentation Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/irssi.html b/tools/irssi.html index bcf714e..fc958d7 100644 --- a/tools/irssi.html +++ b/tools/irssi.html @@ -57,9 +57,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/logrotate.html b/tools/logrotate.html index fc07169..4f58aa1 100644 --- a/tools/logrotate.html +++ b/tools/logrotate.html @@ -361,9 +361,9 @@ # logrotate -f /etc/logrotate.conf
-

This is part of the Tribu System Documentation. -Copyright (C) 2020 -Tribu Team. +

This is part of the LeetIO System Documentation. +Copyright (C) 2021 +LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/logwatch.html b/tools/logwatch.html index 20d1801..9718763 100644 --- a/tools/logwatch.html +++ b/tools/logwatch.html @@ -129,9 +129,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/lvm.html b/tools/lvm.html index 4e25b10..211b181 100644 --- a/tools/lvm.html +++ b/tools/lvm.html @@ -158,9 +158,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/lynx.html b/tools/lynx.html index b26e660..f800fcc 100644 --- a/tools/lynx.html +++ b/tools/lynx.html @@ -16,7 +16,7 @@
         # Description: Text-based web browser.
         # URL: http://lynx.isc.org/
-        # Packager: Tribu Team, silvino at bk dot ru
+        # Packager: LeetIO Team, silvino at bk dot ru
         # Depends on: ncurses openssl zlib
 
         name=lynx
@@ -51,9 +51,9 @@
 
         Tools Index
         

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/mutt.html b/tools/mutt.html index 7edac42..4cb5599 100644 --- a/tools/mutt.html +++ b/tools/mutt.html @@ -311,9 +311,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/network.html b/tools/network.html index 16549e8..080ba05 100644 --- a/tools/network.html +++ b/tools/network.html @@ -72,9 +72,9 @@
Tools Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/nginx.html b/tools/nginx.html index 937be15..32685b9 100644 --- a/tools/nginx.html +++ b/tools/nginx.html @@ -446,9 +446,9 @@ Tools Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/openssh.html b/tools/openssh.html index 271d919..aab5218 100644 --- a/tools/openssh.html +++ b/tools/openssh.html @@ -315,9 +315,9 @@ Tools Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/postgresql.html b/tools/postgresql.html index f27b7d4..a87c0b9 100644 --- a/tools/postgresql.html +++ b/tools/postgresql.html @@ -350,9 +350,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/qemu.html b/tools/qemu.html index 1ceb969..04c367d 100644 --- a/tools/qemu.html +++ b/tools/qemu.html @@ -401,9 +401,9 @@ Tools Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/squid.html b/tools/squid.html index 25fb12e..d19494a 100644 --- a/tools/squid.html +++ b/tools/squid.html @@ -65,9 +65,9 @@ ssl_bump bump all Tools Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/storage.html b/tools/storage.html index 430b735..03e24ef 100644 --- a/tools/storage.html +++ b/tools/storage.html @@ -149,9 +149,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/syslog-ng.html b/tools/syslog-ng.html index 70dc994..f192fa5 100644 --- a/tools/syslog-ng.html +++ b/tools/syslog-ng.html @@ -374,9 +374,9 @@ Tools Index -

This is part of the Tribu System Documentation. -Copyright (C) 2020 -Tribu Team. +

This is part of the LeetIO System Documentation. +Copyright (C) 2021 +LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/tar.html b/tools/tar.html index dfcd3a0..32fe945 100644 --- a/tools/tar.html +++ b/tools/tar.html @@ -122,9 +122,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/tmux.html b/tools/tmux.html index d6bf7a0..c00b046 100644 --- a/tools/tmux.html +++ b/tools/tmux.html @@ -7,7 +7,7 @@ - Core OS Index + GNU/Linux Index

2.5.3. Tmux

Install tmux, improves cli work efficiency;

@@ -106,11 +106,11 @@

Before pasting on vim, set paste mode and then set nopaste.

- Core OS Index + GNU/Linux Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/vim.html b/tools/vim.html index b76c111..6d34312 100644 --- a/tools/vim.html +++ b/tools/vim.html @@ -267,9 +267,9 @@ Tools Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/wireless.html b/tools/wireless.html index 0696cd5..e15b112 100644 --- a/tools/wireless.html +++ b/tools/wireless.html @@ -124,9 +124,9 @@ Tools Index -

This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. +

This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

diff --git a/tools/x.html b/tools/x.html index 2172a56..0e9a4eb 100644 --- a/tools/x.html +++ b/tools/x.html @@ -216,9 +216,9 @@ Tools Index

- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.

-- cgit 1.4.1-2-gfad0 From 2a862d9141a84b612ec2dd109a7f74a2b10ffb91 Mon Sep 17 00:00:00 2001 From: builder Date: Fri, 26 Feb 2021 00:18:20 +0000 Subject: tools scripts moved to linux --- linux/scripts/mirror-system | 73 +++++++++++++++++++++++++++++ linux/scripts/pkgmk-test.conf | 19 ++++++++ linux/scripts/pkgmk-test.sh | 5 ++ linux/scripts/replace.sh | 9 ++++ linux/scripts/runvm/c12-dvd | 15 ++++++ linux/scripts/runvm/profile/crux | 7 +++ linux/scripts/runvm/runvm.sh | 26 +++++++++++ linux/scripts/setup-gitolite.sh | 43 ++++++++++++++++++ linux/scripts/setup-nginx.sh | 24 ++++++++++ linux/scripts/setup-openssh.sh | 43 ++++++++++++++++++ linux/scripts/setup-php.sh | 7 +++ linux/scripts/setup-postgresql.sh | 87 +++++++++++++++++++++++++++++++++++ linux/scripts/setup-x.sh | 96 +++++++++++++++++++++++++++++++++++++++ tools/scripts/mirror-system | 73 ----------------------------- tools/scripts/pkgmk-test.conf | 19 -------- tools/scripts/pkgmk-test.sh | 5 -- tools/scripts/replace.sh | 9 ---- tools/scripts/runvm/c12-dvd | 15 ------ tools/scripts/runvm/profile/crux | 7 --- tools/scripts/runvm/runvm.sh | 26 ----------- tools/scripts/setup-gitolite.sh | 43 ------------------ tools/scripts/setup-nginx.sh | 24 ---------- tools/scripts/setup-openssh.sh | 43 ------------------ tools/scripts/setup-php.sh | 7 --- tools/scripts/setup-postgresql.sh | 87 ----------------------------------- tools/scripts/setup-x.sh | 96 --------------------------------------- 26 files changed, 454 insertions(+), 454 deletions(-) create mode 100755 linux/scripts/mirror-system create mode 100644 linux/scripts/pkgmk-test.conf create mode 100644 linux/scripts/pkgmk-test.sh create mode 100755 linux/scripts/replace.sh create mode 100644 linux/scripts/runvm/c12-dvd create mode 100644 linux/scripts/runvm/profile/crux create mode 100644 linux/scripts/runvm/runvm.sh create mode 100644 linux/scripts/setup-gitolite.sh create mode 100644 linux/scripts/setup-nginx.sh create mode 100644 linux/scripts/setup-openssh.sh create mode 100644 linux/scripts/setup-php.sh create mode 100644 linux/scripts/setup-postgresql.sh create mode 100644 linux/scripts/setup-x.sh delete mode 100755 tools/scripts/mirror-system delete mode 100644 tools/scripts/pkgmk-test.conf delete mode 100644 tools/scripts/pkgmk-test.sh delete mode 100755 tools/scripts/replace.sh delete mode 100644 tools/scripts/runvm/c12-dvd delete mode 100644 tools/scripts/runvm/profile/crux delete mode 100644 tools/scripts/runvm/runvm.sh delete mode 100644 tools/scripts/setup-gitolite.sh delete mode 100644 tools/scripts/setup-nginx.sh delete mode 100644 tools/scripts/setup-openssh.sh delete mode 100644 tools/scripts/setup-php.sh delete mode 100644 tools/scripts/setup-postgresql.sh delete mode 100644 tools/scripts/setup-x.sh diff --git a/linux/scripts/mirror-system b/linux/scripts/mirror-system new file mode 100755 index 0000000..6c8a528 --- /dev/null +++ b/linux/scripts/mirror-system @@ -0,0 +1,73 @@ +#!/bin/bash + +if [ -f /tmp/mirror ]; then + echo "mirror system is already running" + exit 0 +fi + +touch /tmp/mirror + +#BUILD_NAME="R2D9" +#BUILD_TITLE="${BUILD_NAME}-$(cat /usr/ports/releases/stable/metadata/build-version)" +BUILD_TITLE="Crux 3.6" + +# Update system +ports -u + +# make them look like updated +echo "touch packages..." +for package in /usr/ports/packages/*; do + touch ${package}; +done + +# make sure permissions are right +echo "chown pkgmk:pkgmk -R /usr/ports" +chown pkgmk:pkgmk -R /usr/ports + +echo "update system" +prt-get depinst $(prt-get listinst | xargs prt-get quickdep) +prt-get sysup +prt-get update -fr $(revdep) + +# Create list of installed packages +echo "creating list of installed..." +rm -r /usr/ports/installed +pkg_installed + +### clean distribution files +mkdir -p /usr/ports/archive/distfiles +mv /usr/ports/distfiles/* /usr/ports/archive/distfiles +### clean packages files +mkdir -p /usr/ports/archive/packages +mv /usr/ports/packages/* /usr/ports/archive/packages +### get sources and packages +cd /usr/ports/installed +for installed in *; do + prt-get path $installed | while read -r line; do + cd $line + ##get source + sudo -u pkgmk -g pkgmk pkgmk -do + #make sure package exists + current="${installed}#$(prt-get current ${installed}).pkg.tar.gz" + echo "checking $current ..." + cp /usr/ports/archive/packages/${current} /usr/ports/packages/ + #prt-get update $installed + done +done + +# Create repository +echo "creating repository" +cd /usr/ports/packages +pkg-repgen + +# Create mirror page +echo "creating mirror index page" +portspage --title=${BUILD_TITLE} /usr/ports/installed > /usr/ports/installed/index.html + +sed -i "s@usr\/ports\/installed@mirror/installed@g" /usr/ports/installed/index.html + +echo "setting permissions /usr/ports" +chown pkgmk:pkgmk -R /usr/ports + +# Remove temporary file +rm /tmp/mirror diff --git a/linux/scripts/pkgmk-test.conf b/linux/scripts/pkgmk-test.conf new file mode 100644 index 0000000..4a04eec --- /dev/null +++ b/linux/scripts/pkgmk-test.conf @@ -0,0 +1,19 @@ +# +# /etc/pkgmk.conf: pkgmk(8) configuration +# + +source /etc/pkgmk.conf + +#PKGMK_SOURCE_MIRRORS=(http://c1.ank/distfiles/) +PKGMK_SOURCE_DIR="$PWD" +PKGMK_PACKAGE_DIR="$PWD" +PKGMK_WORK_DIR="$PWD/work" +PKGMK_DOWNLOAD="yes" +PKGMK_UP_TO_DATE="no" +# PKGMK_IGNORE_FOOTPRINT="no" +# PKGMK_IGNORE_NEW="no" +# PKGMK_NO_STRIP="no" +# PKGMK_DOWNLOAD_PROG="wget" +# PKGMK_WGET_OPTS="" +# PKGMK_CURL_OPTS="" +# PKGMK_COMPRESSION_MODE="gz" diff --git a/linux/scripts/pkgmk-test.sh b/linux/scripts/pkgmk-test.sh new file mode 100644 index 0000000..4cfe2c3 --- /dev/null +++ b/linux/scripts/pkgmk-test.sh @@ -0,0 +1,5 @@ +#!/bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +CONF=${DIR}/pkgmk-test.conf +echo "pkgmk -cf $CONF -d -is $1" +fakeroot pkgmk -cf $CONF -d -is $1 diff --git a/linux/scripts/replace.sh b/linux/scripts/replace.sh new file mode 100755 index 0000000..8d5d8d9 --- /dev/null +++ b/linux/scripts/replace.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# find and replace string on files +folder=$1 +oldstring=$2 +newstring=$3 + +#grep -rl $oldstring $folder | xargs sed -i s@$oldstring@$newstring@g +grep -rl "$oldstring" $folder | xargs sed -i "s@$oldstring@$newstring@g" diff --git a/linux/scripts/runvm/c12-dvd b/linux/scripts/runvm/c12-dvd new file mode 100644 index 0000000..9cbf201 --- /dev/null +++ b/linux/scripts/runvm/c12-dvd @@ -0,0 +1,15 @@ +export QEMU_AUDIO_DRV=alsa + +memory=1024 + +boot=c + +iso=iso/devuan_jessie_1.0.0_amd64_CD.iso + +image=img/c12-dvd.qcow2 + +tap="tap2" + +mac="54:60:be:ef:5c:72" + +other="-soundhw hda -vga std -display sdl -usb -device usb-ehci -device usb-host,vendorid=0x13d3,productid=0x5652" diff --git a/linux/scripts/runvm/profile/crux b/linux/scripts/runvm/profile/crux new file mode 100644 index 0000000..672b80d --- /dev/null +++ b/linux/scripts/runvm/profile/crux @@ -0,0 +1,7 @@ +mac="54:60:be:ef:5c:64" +memory=1024 +boot=$2 +tap="tap4" +iso=iso/crux-3.4.iso +image=img/c14.qcow2 +other="-vga std -display sdl" diff --git a/linux/scripts/runvm/runvm.sh b/linux/scripts/runvm/runvm.sh new file mode 100644 index 0000000..21cd097 --- /dev/null +++ b/linux/scripts/runvm/runvm.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +function rmac_addr (){ +printf '54:60:BE:EF:%02X:%02X\n' $((RANDOM%256)) $((RANDOM%256)) +} + +source profile/$1 + +#mac=$(rmac_addr) +#memory=1024 +#boot=d +#tap="tap1" +#iso=iso/crux-3.4.iso +#image=img/crux-standard.qcow2 +#other="-soundhw hda -vga std -display sdl" + +qemu-system-x86_64 \ + -enable-kvm \ + -m ${memory} \ + -boot ${boot} \ + -cdrom ${iso} \ + -hda ${image} \ + -device e1000,netdev=t0,mac=${mac} \ + -netdev tap,id=t0,ifname=${tap},script=no,downscript=no \ + ${other} \ + & diff --git a/linux/scripts/setup-gitolite.sh b/linux/scripts/setup-gitolite.sh new file mode 100644 index 0000000..c42db14 --- /dev/null +++ b/linux/scripts/setup-gitolite.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# First we define the function +ConfirmOrExit () +{ + while true + do + echo -n "Please confirm (y or n) :" + read CONFIRM + case $CONFIRM in + y|Y|YES|yes|Yes) break ;; + n|N|no|NO|No) + echo "Aborting - you entered $CONFIRM" + exit + ;; + *) echo "Please enter only y or n" + esac + done + echo "You entered $CONFIRM. Continuing ..." +} + + +# Absolute path to this script, e.g. /home/user/bin/foo.sh +SCRIPT=$(readlink -f "$0") +# Absolute path this script is in, thus /home/user/bin +SCRIPTPATH=$(dirname "$SCRIPT") + +DIR=$(dirname "$SCRIPTPATH"); +DIR_CONF=$DIR"/conf" + +echo "SCRIPT=$SCRIPT"; +echo "SCRIPTPATH=$SCRIPTPATH"; +echo "DIR=$DIR"; +echo "DIR_CONF=$DIR_CONF"; +ConfirmOrExit + + prt-get depinst gitolite + + mkdir -p /srv/gitolite + useradd -U -d /srv/gitolite gitolite + chown gitolite:gitolite /srv/gitolite + +exit 0; diff --git a/linux/scripts/setup-nginx.sh b/linux/scripts/setup-nginx.sh new file mode 100644 index 0000000..11065d2 --- /dev/null +++ b/linux/scripts/setup-nginx.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +#. `dirname $0`/config-install.sh +# +#prt-get depinst nginx +# +#cp -R $CONF_DIR/etc/nginx/* /etc/nginx/ +# +#mkdir /srv/www +#chown www:www /srv/www +# +#usermod -a -g www nginx +#usermod -m -d /srv/www nginx + +openssl genrsa -des3 -out /etc/ssl/keys/nginx.key 2048 +openssl req -new -key /etc/ssl/keys/nginx.key -out /etc/ssl/certs/nginx.csr +openssl x509 -req -days 365 \ + -in /etc/ssl/certs/nginx.csr \ + -signkey /etc/ssl/keys/nginx.key \ + -out /etc/ssl/certs/nginx.crt + +cp /etc/ssl/keys/nginx.key /etc/ssl/keys/nginx.key.pass +openssl rsa -in /etc/ssl/keys/nginx.key.pass -out /etc/ssl/keys/nginx.key + diff --git a/linux/scripts/setup-openssh.sh b/linux/scripts/setup-openssh.sh new file mode 100644 index 0000000..14afe8b --- /dev/null +++ b/linux/scripts/setup-openssh.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# First we define the function +ConfirmOrExit () +{ + while true + do + echo -n "Please confirm (y or n) :" + read CONFIRM + case $CONFIRM in + y|Y|YES|yes|Yes) break ;; + n|N|no|NO|No) + echo "Aborting - you entered $CONFIRM" + exit + ;; + *) echo "Please enter only y or n" + esac + done + echo "You entered $CONFIRM. Continuing ..." +} + + +# Absolute path to this script, e.g. /home/user/bin/foo.sh +SCRIPT=$(readlink -f "$0") +# Absolute path this script is in, thus /home/user/bin +SCRIPTPATH=$(dirname "$SCRIPT") + +DIR=$(dirname "$SCRIPTPATH"); +DIR_CONF=$DIR"/conf" + +echo "SCRIPT=$SCRIPT"; +echo "SCRIPTPATH=$SCRIPTPATH"; +echo "DIR=$DIR"; +echo "DIR_CONF=$DIR_CONF"; +ConfirmOrExit + + + #installer overwrite system init script + cp -R $DIR_CONF/etc/ssh/sshd_config /etc/ssh/sshd_config + + sh /etc/rc.d/sshd start + +exit 0; diff --git a/linux/scripts/setup-php.sh b/linux/scripts/setup-php.sh new file mode 100644 index 0000000..4c28173 --- /dev/null +++ b/linux/scripts/setup-php.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +. `dirname $0`/config-install.sh + +prt-get depinst php php-fpm php-gd php-pdo-pgsql php-postgresql + +cp /etc/php/php.ini-development /etc/php/php.ini diff --git a/linux/scripts/setup-postgresql.sh b/linux/scripts/setup-postgresql.sh new file mode 100644 index 0000000..4e1ee3a --- /dev/null +++ b/linux/scripts/setup-postgresql.sh @@ -0,0 +1,87 @@ +#!/bin/sh + +# First we define the function +ConfirmOrExit () +{ + while true + do + echo -n "Please confirm (y or n) :" + read CONFIRM + case $CONFIRM in + y|Y|YES|yes|Yes) break ;; + n|N|no|NO|No) + echo "Aborting - you entered $CONFIRM" + exit + ;; + *) echo "Please enter only y or n" + esac + done + echo "You entered $CONFIRM. Continuing ..." +} + + +# Absolute path to this script, e.g. /home/user/bin/foo.sh +SCRIPT=$(readlink -f "$0") +# Absolute path this script is in, thus /home/user/bin +SCRIPTPATH=$(dirname "$SCRIPT") + +DIR=$(dirname "$SCRIPTPATH"); +DIR_CONF=$DIR"/conf" + +echo "SCRIPT=$SCRIPT"; +echo "SCRIPTPATH=$SCRIPTPATH"; +echo "DIR=$DIR"; +echo "DIR_CONF=$DIR_CONF"; +ConfirmOrExit + +IS_INSTALL=$(prt-get isinst postgresql); +echo $IS_INSTALL; +if [ "$IS_INSTALL" = "package postgresql is installed" ] +then + echo "updating postgresql" + OLD_VERSION=$(prt-get current postgresql); + echo $OLD_VERSION; + + sudo -u postgres pg_dumpall > /srv/pgsql/dump-$OLD_VERSION.sql + + sh /etc/rc.d/postgresql stop + + #extra backup, in case ... + tar --xattrs -zcpf /srv/pgsql/data-$OLD_VERSION.tar.gz \ + --directory=/srv/pgsql/data . + + rm -R /srv/pgsql/data + + prt-get update postgresql + + NEW_VERSION=$(prt-get current postgresql); + echo $NEW_VERSION; + + sudo -u postgres initdb -D /srv/pgsql/data + + rejmerge + #installer overwrite system init script + cp -R $DIR_CONF/etc/rc.d/postgresql /etc/rc.d/ + + sh /etc/rc.d/postgresql start + sleep 5 + + sudo -u postgres psql -d postgres -f /srv/pgsql/dump-$OLD_VERSION.sql + +else + echo "install postgresql and dependencies" + prt-get depinst postgresql + + cp -R $DIR_CONF/etc/rc.d/postgresql /etc/rc.d/ + + mkdir /srv/pgsql/ + touch /var/log/postgresql + chown postgres:postgres /srv/pgsql /var/log/postgresql + + sudo -u postgres initdb -D /srv/pgsql/data + + cp $DIR_CONF/srv/pgsql/data/pg_hba.conf /srv/pgsql/data/ + chown postgres:postgres /srv/pgsql/data/pg_hba.conf +fi + +exit 0; diff --git a/linux/scripts/setup-x.sh b/linux/scripts/setup-x.sh new file mode 100644 index 0000000..262b4dd --- /dev/null +++ b/linux/scripts/setup-x.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +# Absolute path to this script, e.g. /home/user/bin/foo.sh +SCRIPT=$(readlink -f "$0") +# Absolute path this script is in, thus /home/user/bin +SCRIPTPATH=$(dirname "$SCRIPT") + +DIR=$(dirname "$SCRIPTPATH"); +DIR_CONF=$DIR"/conf" + + + +prt-get depinst xorg-server \ + xorg-xinit \ + xorg-xrdb \ + xorg-xdpyinfo \ + xorg-xauth \ + xorg-xmodmap \ + xorg-xrandr \ + xorg-xgamma \ + xorg-xf86-input-evdev \ + xorg-xf86-input-synaptics \ + xsel \ + xkeyboard-config + +prt-get depinst xorg-font-util \ + xorg-font-alias \ + xorg-font-dejavu-ttf \ + xorg-font-cursor-misc \ + xorg-font-misc-misc \ + console-font-terminus \ + xorg-font-terminus \ + xorg-font-mutt-misc + +prt-get search xorg-font-bitstream | xargs sudo prt-get depinst +prt-get search xorg-font-bh | xargs sudo prt-get depinst + +#prt-get search otf- | xargs sudo prt-get depinst +#prt-get depinst otf-sourcecode + +prt-get depinst \ + alsa-utils \ + libdrm \ + mesa3d \ + ffmpeg \ + gstreamer \ + gstreamer-vaapi \ + gst-plugins-base \ + gst-plugins-good \ + gst-plugins-bad \ + gst-plugins-ugly \ + cmus \ + dmenu \ + st \ + gparted \ + gimp \ + libreoffice \ + ca-certificates \ + linux-pam \ + gstreamer \ + libgd \ + icu \ + syndaemon \ + firefox + +prt-get depinst \ + openbox \ + dwm \ + spectrwm \ + mate + +ConfirmOrExit () { + while true + do + echo -n "Please confirm (y or n) :" + read CONFIRM + case $CONFIRM in + y|Y|YES|yes|Yes) break ;; + n|N|no|NO|No) + echo "Aborting - you entered $CONFIRM" + exit + ;; + *) echo "Please enter only y or n" + esac + done + echo "You entered $CONFIRM. Continuing ..." +} + +echo "SCRIPT=$SCRIPT"; +echo "SCRIPTPATH=$SCRIPTPATH"; +echo "DIR=$DIR"; +echo "DIR_CONF=$DIR_CONF"; +ConfirmOrExit + +cp -R $DIR_CONF/etc/X11/* /etc/X11/ + diff --git a/tools/scripts/mirror-system b/tools/scripts/mirror-system deleted file mode 100755 index 6c8a528..0000000 --- a/tools/scripts/mirror-system +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -if [ -f /tmp/mirror ]; then - echo "mirror system is already running" - exit 0 -fi - -touch /tmp/mirror - -#BUILD_NAME="R2D9" -#BUILD_TITLE="${BUILD_NAME}-$(cat /usr/ports/releases/stable/metadata/build-version)" -BUILD_TITLE="Crux 3.6" - -# Update system -ports -u - -# make them look like updated -echo "touch packages..." -for package in /usr/ports/packages/*; do - touch ${package}; -done - -# make sure permissions are right -echo "chown pkgmk:pkgmk -R /usr/ports" -chown pkgmk:pkgmk -R /usr/ports - -echo "update system" -prt-get depinst $(prt-get listinst | xargs prt-get quickdep) -prt-get sysup -prt-get update -fr $(revdep) - -# Create list of installed packages -echo "creating list of installed..." -rm -r /usr/ports/installed -pkg_installed - -### clean distribution files -mkdir -p /usr/ports/archive/distfiles -mv /usr/ports/distfiles/* /usr/ports/archive/distfiles -### clean packages files -mkdir -p /usr/ports/archive/packages -mv /usr/ports/packages/* /usr/ports/archive/packages -### get sources and packages -cd /usr/ports/installed -for installed in *; do - prt-get path $installed | while read -r line; do - cd $line - ##get source - sudo -u pkgmk -g pkgmk pkgmk -do - #make sure package exists - current="${installed}#$(prt-get current ${installed}).pkg.tar.gz" - echo "checking $current ..." - cp /usr/ports/archive/packages/${current} /usr/ports/packages/ - #prt-get update $installed - done -done - -# Create repository -echo "creating repository" -cd /usr/ports/packages -pkg-repgen - -# Create mirror page -echo "creating mirror index page" -portspage --title=${BUILD_TITLE} /usr/ports/installed > /usr/ports/installed/index.html - -sed -i "s@usr\/ports\/installed@mirror/installed@g" /usr/ports/installed/index.html - -echo "setting permissions /usr/ports" -chown pkgmk:pkgmk -R /usr/ports - -# Remove temporary file -rm /tmp/mirror diff --git a/tools/scripts/pkgmk-test.conf b/tools/scripts/pkgmk-test.conf deleted file mode 100644 index 4a04eec..0000000 --- a/tools/scripts/pkgmk-test.conf +++ /dev/null @@ -1,19 +0,0 @@ -# -# /etc/pkgmk.conf: pkgmk(8) configuration -# - -source /etc/pkgmk.conf - -#PKGMK_SOURCE_MIRRORS=(http://c1.ank/distfiles/) -PKGMK_SOURCE_DIR="$PWD" -PKGMK_PACKAGE_DIR="$PWD" -PKGMK_WORK_DIR="$PWD/work" -PKGMK_DOWNLOAD="yes" -PKGMK_UP_TO_DATE="no" -# PKGMK_IGNORE_FOOTPRINT="no" -# PKGMK_IGNORE_NEW="no" -# PKGMK_NO_STRIP="no" -# PKGMK_DOWNLOAD_PROG="wget" -# PKGMK_WGET_OPTS="" -# PKGMK_CURL_OPTS="" -# PKGMK_COMPRESSION_MODE="gz" diff --git a/tools/scripts/pkgmk-test.sh b/tools/scripts/pkgmk-test.sh deleted file mode 100644 index 4cfe2c3..0000000 --- a/tools/scripts/pkgmk-test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -CONF=${DIR}/pkgmk-test.conf -echo "pkgmk -cf $CONF -d -is $1" -fakeroot pkgmk -cf $CONF -d -is $1 diff --git a/tools/scripts/replace.sh b/tools/scripts/replace.sh deleted file mode 100755 index 8d5d8d9..0000000 --- a/tools/scripts/replace.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# find and replace string on files -folder=$1 -oldstring=$2 -newstring=$3 - -#grep -rl $oldstring $folder | xargs sed -i s@$oldstring@$newstring@g -grep -rl "$oldstring" $folder | xargs sed -i "s@$oldstring@$newstring@g" diff --git a/tools/scripts/runvm/c12-dvd b/tools/scripts/runvm/c12-dvd deleted file mode 100644 index 9cbf201..0000000 --- a/tools/scripts/runvm/c12-dvd +++ /dev/null @@ -1,15 +0,0 @@ -export QEMU_AUDIO_DRV=alsa - -memory=1024 - -boot=c - -iso=iso/devuan_jessie_1.0.0_amd64_CD.iso - -image=img/c12-dvd.qcow2 - -tap="tap2" - -mac="54:60:be:ef:5c:72" - -other="-soundhw hda -vga std -display sdl -usb -device usb-ehci -device usb-host,vendorid=0x13d3,productid=0x5652" diff --git a/tools/scripts/runvm/profile/crux b/tools/scripts/runvm/profile/crux deleted file mode 100644 index 672b80d..0000000 --- a/tools/scripts/runvm/profile/crux +++ /dev/null @@ -1,7 +0,0 @@ -mac="54:60:be:ef:5c:64" -memory=1024 -boot=$2 -tap="tap4" -iso=iso/crux-3.4.iso -image=img/c14.qcow2 -other="-vga std -display sdl" diff --git a/tools/scripts/runvm/runvm.sh b/tools/scripts/runvm/runvm.sh deleted file mode 100644 index 21cd097..0000000 --- a/tools/scripts/runvm/runvm.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -function rmac_addr (){ -printf '54:60:BE:EF:%02X:%02X\n' $((RANDOM%256)) $((RANDOM%256)) -} - -source profile/$1 - -#mac=$(rmac_addr) -#memory=1024 -#boot=d -#tap="tap1" -#iso=iso/crux-3.4.iso -#image=img/crux-standard.qcow2 -#other="-soundhw hda -vga std -display sdl" - -qemu-system-x86_64 \ - -enable-kvm \ - -m ${memory} \ - -boot ${boot} \ - -cdrom ${iso} \ - -hda ${image} \ - -device e1000,netdev=t0,mac=${mac} \ - -netdev tap,id=t0,ifname=${tap},script=no,downscript=no \ - ${other} \ - & diff --git a/tools/scripts/setup-gitolite.sh b/tools/scripts/setup-gitolite.sh deleted file mode 100644 index c42db14..0000000 --- a/tools/scripts/setup-gitolite.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# First we define the function -ConfirmOrExit () -{ - while true - do - echo -n "Please confirm (y or n) :" - read CONFIRM - case $CONFIRM in - y|Y|YES|yes|Yes) break ;; - n|N|no|NO|No) - echo "Aborting - you entered $CONFIRM" - exit - ;; - *) echo "Please enter only y or n" - esac - done - echo "You entered $CONFIRM. Continuing ..." -} - - -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=$(readlink -f "$0") -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=$(dirname "$SCRIPT") - -DIR=$(dirname "$SCRIPTPATH"); -DIR_CONF=$DIR"/conf" - -echo "SCRIPT=$SCRIPT"; -echo "SCRIPTPATH=$SCRIPTPATH"; -echo "DIR=$DIR"; -echo "DIR_CONF=$DIR_CONF"; -ConfirmOrExit - - prt-get depinst gitolite - - mkdir -p /srv/gitolite - useradd -U -d /srv/gitolite gitolite - chown gitolite:gitolite /srv/gitolite - -exit 0; diff --git a/tools/scripts/setup-nginx.sh b/tools/scripts/setup-nginx.sh deleted file mode 100644 index 11065d2..0000000 --- a/tools/scripts/setup-nginx.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -#. `dirname $0`/config-install.sh -# -#prt-get depinst nginx -# -#cp -R $CONF_DIR/etc/nginx/* /etc/nginx/ -# -#mkdir /srv/www -#chown www:www /srv/www -# -#usermod -a -g www nginx -#usermod -m -d /srv/www nginx - -openssl genrsa -des3 -out /etc/ssl/keys/nginx.key 2048 -openssl req -new -key /etc/ssl/keys/nginx.key -out /etc/ssl/certs/nginx.csr -openssl x509 -req -days 365 \ - -in /etc/ssl/certs/nginx.csr \ - -signkey /etc/ssl/keys/nginx.key \ - -out /etc/ssl/certs/nginx.crt - -cp /etc/ssl/keys/nginx.key /etc/ssl/keys/nginx.key.pass -openssl rsa -in /etc/ssl/keys/nginx.key.pass -out /etc/ssl/keys/nginx.key - diff --git a/tools/scripts/setup-openssh.sh b/tools/scripts/setup-openssh.sh deleted file mode 100644 index 14afe8b..0000000 --- a/tools/scripts/setup-openssh.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# First we define the function -ConfirmOrExit () -{ - while true - do - echo -n "Please confirm (y or n) :" - read CONFIRM - case $CONFIRM in - y|Y|YES|yes|Yes) break ;; - n|N|no|NO|No) - echo "Aborting - you entered $CONFIRM" - exit - ;; - *) echo "Please enter only y or n" - esac - done - echo "You entered $CONFIRM. Continuing ..." -} - - -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=$(readlink -f "$0") -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=$(dirname "$SCRIPT") - -DIR=$(dirname "$SCRIPTPATH"); -DIR_CONF=$DIR"/conf" - -echo "SCRIPT=$SCRIPT"; -echo "SCRIPTPATH=$SCRIPTPATH"; -echo "DIR=$DIR"; -echo "DIR_CONF=$DIR_CONF"; -ConfirmOrExit - - - #installer overwrite system init script - cp -R $DIR_CONF/etc/ssh/sshd_config /etc/ssh/sshd_config - - sh /etc/rc.d/sshd start - -exit 0; diff --git a/tools/scripts/setup-php.sh b/tools/scripts/setup-php.sh deleted file mode 100644 index 4c28173..0000000 --- a/tools/scripts/setup-php.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -. `dirname $0`/config-install.sh - -prt-get depinst php php-fpm php-gd php-pdo-pgsql php-postgresql - -cp /etc/php/php.ini-development /etc/php/php.ini diff --git a/tools/scripts/setup-postgresql.sh b/tools/scripts/setup-postgresql.sh deleted file mode 100644 index 4e1ee3a..0000000 --- a/tools/scripts/setup-postgresql.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh - -# First we define the function -ConfirmOrExit () -{ - while true - do - echo -n "Please confirm (y or n) :" - read CONFIRM - case $CONFIRM in - y|Y|YES|yes|Yes) break ;; - n|N|no|NO|No) - echo "Aborting - you entered $CONFIRM" - exit - ;; - *) echo "Please enter only y or n" - esac - done - echo "You entered $CONFIRM. Continuing ..." -} - - -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=$(readlink -f "$0") -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=$(dirname "$SCRIPT") - -DIR=$(dirname "$SCRIPTPATH"); -DIR_CONF=$DIR"/conf" - -echo "SCRIPT=$SCRIPT"; -echo "SCRIPTPATH=$SCRIPTPATH"; -echo "DIR=$DIR"; -echo "DIR_CONF=$DIR_CONF"; -ConfirmOrExit - -IS_INSTALL=$(prt-get isinst postgresql); -echo $IS_INSTALL; -if [ "$IS_INSTALL" = "package postgresql is installed" ] -then - echo "updating postgresql" - OLD_VERSION=$(prt-get current postgresql); - echo $OLD_VERSION; - - sudo -u postgres pg_dumpall > /srv/pgsql/dump-$OLD_VERSION.sql - - sh /etc/rc.d/postgresql stop - - #extra backup, in case ... - tar --xattrs -zcpf /srv/pgsql/data-$OLD_VERSION.tar.gz \ - --directory=/srv/pgsql/data . - - rm -R /srv/pgsql/data - - prt-get update postgresql - - NEW_VERSION=$(prt-get current postgresql); - echo $NEW_VERSION; - - sudo -u postgres initdb -D /srv/pgsql/data - - rejmerge - #installer overwrite system init script - cp -R $DIR_CONF/etc/rc.d/postgresql /etc/rc.d/ - - sh /etc/rc.d/postgresql start - sleep 5 - - sudo -u postgres psql -d postgres -f /srv/pgsql/dump-$OLD_VERSION.sql - -else - echo "install postgresql and dependencies" - prt-get depinst postgresql - - cp -R $DIR_CONF/etc/rc.d/postgresql /etc/rc.d/ - - mkdir /srv/pgsql/ - touch /var/log/postgresql - chown postgres:postgres /srv/pgsql /var/log/postgresql - - sudo -u postgres initdb -D /srv/pgsql/data - - cp $DIR_CONF/srv/pgsql/data/pg_hba.conf /srv/pgsql/data/ - chown postgres:postgres /srv/pgsql/data/pg_hba.conf -fi - -exit 0; diff --git a/tools/scripts/setup-x.sh b/tools/scripts/setup-x.sh deleted file mode 100644 index 262b4dd..0000000 --- a/tools/scripts/setup-x.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash - -# Absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=$(readlink -f "$0") -# Absolute path this script is in, thus /home/user/bin -SCRIPTPATH=$(dirname "$SCRIPT") - -DIR=$(dirname "$SCRIPTPATH"); -DIR_CONF=$DIR"/conf" - - - -prt-get depinst xorg-server \ - xorg-xinit \ - xorg-xrdb \ - xorg-xdpyinfo \ - xorg-xauth \ - xorg-xmodmap \ - xorg-xrandr \ - xorg-xgamma \ - xorg-xf86-input-evdev \ - xorg-xf86-input-synaptics \ - xsel \ - xkeyboard-config - -prt-get depinst xorg-font-util \ - xorg-font-alias \ - xorg-font-dejavu-ttf \ - xorg-font-cursor-misc \ - xorg-font-misc-misc \ - console-font-terminus \ - xorg-font-terminus \ - xorg-font-mutt-misc - -prt-get search xorg-font-bitstream | xargs sudo prt-get depinst -prt-get search xorg-font-bh | xargs sudo prt-get depinst - -#prt-get search otf- | xargs sudo prt-get depinst -#prt-get depinst otf-sourcecode - -prt-get depinst \ - alsa-utils \ - libdrm \ - mesa3d \ - ffmpeg \ - gstreamer \ - gstreamer-vaapi \ - gst-plugins-base \ - gst-plugins-good \ - gst-plugins-bad \ - gst-plugins-ugly \ - cmus \ - dmenu \ - st \ - gparted \ - gimp \ - libreoffice \ - ca-certificates \ - linux-pam \ - gstreamer \ - libgd \ - icu \ - syndaemon \ - firefox - -prt-get depinst \ - openbox \ - dwm \ - spectrwm \ - mate - -ConfirmOrExit () { - while true - do - echo -n "Please confirm (y or n) :" - read CONFIRM - case $CONFIRM in - y|Y|YES|yes|Yes) break ;; - n|N|no|NO|No) - echo "Aborting - you entered $CONFIRM" - exit - ;; - *) echo "Please enter only y or n" - esac - done - echo "You entered $CONFIRM. Continuing ..." -} - -echo "SCRIPT=$SCRIPT"; -echo "SCRIPTPATH=$SCRIPTPATH"; -echo "DIR=$DIR"; -echo "DIR_CONF=$DIR_CONF"; -ConfirmOrExit - -cp -R $DIR_CONF/etc/X11/* /etc/X11/ - -- cgit 1.4.1-2-gfad0 From 6ec55970fe70ad6306c768fe4a07acef50cec555 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Fri, 26 Feb 2021 01:55:13 +0000 Subject: linux re-index --- linux/bash.html | 10 +++---- linux/dash.html | 4 +-- linux/fail2ban.html | 54 +++++++++++++++++++++++++++++++++ linux/index.html | 80 ++++++++++++++++++++++++++++++++++++------------- linux/network.html | 59 +++++++++++++++++++++++++++++------- linux/package.html | 16 +++++----- linux/tty-terminal.html | 4 +-- tools/fail2ban.html | 54 --------------------------------- tools/index.html | 49 ------------------------------ 9 files changed, 180 insertions(+), 150 deletions(-) create mode 100644 linux/fail2ban.html delete mode 100644 tools/fail2ban.html diff --git a/linux/bash.html b/linux/bash.html index 1a7edb2..7b98eb5 100644 --- a/linux/bash.html +++ b/linux/bash.html @@ -2,12 +2,12 @@ - 2.5.2. Bash + 2.3.2. Bash GNU/Linux Index -

2.5.2. Bash

+

2.3.2. Bash

Just to be sure, setup bash as default login;

@@ -32,7 +32,7 @@ alias, editor. -

2.5.2.1. Profile

+

2.3.2.1. Profile

Example of ~/.profile;

@@ -73,7 +73,7 @@ fi fi -

2.5.2.2. Bash RC

+

2.3.2.2. Bash RC

Example of ~/.bashrc;

@@ -136,7 +136,7 @@ fi fi -

2.5.2.3. Bash profile

+

2.3.2.3. Bash profile

Example of ~/.bash_profile;

diff --git a/linux/dash.html b/linux/dash.html index 8da34a3..47b9945 100644 --- a/linux/dash.html +++ b/linux/dash.html @@ -2,13 +2,13 @@ - 2.5.1. Dash + 2.3.1. Dash GNU/Linux Index -

2.5.1. Dash

+

2.3.1. Dash

By default dash installed as /bin/sh, if not relink;

diff --git a/linux/fail2ban.html b/linux/fail2ban.html new file mode 100644 index 0000000..71bbdf9 --- /dev/null +++ b/linux/fail2ban.html @@ -0,0 +1,54 @@ + + + + + Fail2ban + + + + Tools Index + +

Fail2ban

+ +
+       $ prt-get depinst fail2ban
+       
+ +

1. Configure

+ +

To start fail2ban at next boot edit /etc/rc.conf and add fail2ban. + Fail2ban will verify if /etc/fail2ban/jail.local exist, if exist will + use it. Copy distribution jail.conf to jail.locol;

+ +
+       $ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
+       
+ +

Edit /etc/fail2ban/jail.local, example configuration;

+ +
+       [ssh-iptables]
+
+       enabled  = enable
+       filter   = sshd
+       action   = iptables[name=SSH, port=ssh, protocol=tcp]
+                  sendmail-whois[name=SSH, dest=admin@box, sender=fail2ban@box, sendername="fail2ban"]
+                  logpath  = /var/log/auth
+                  maxretry = 5
+       
+ +

Test a filter

+ +
+        # fail2ban-regex /var/log/iptables iptables-ssh.conf
+        
+ + Tools Index + +

+ This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. + See the file Gnu Free Documentation License for copying conditions.

+ + diff --git a/linux/index.html b/linux/index.html index 33578f7..482730a 100644 --- a/linux/index.html +++ b/linux/index.html @@ -105,31 +105,38 @@
  • 2.1.6. Remove
  • -
  • 2.2. Network + +
  • 2.2. Package Management
  • -
  • 2.3. Package Management + +
  • 2.3. Terminals and shells
  • -
  • 2.4. Terminals and shells - +
  • 2.4. Syslog-ng +
  • +
  • 2.5. Exim Documentation Index diff --git a/linux/network.html b/linux/network.html index ec33b25..a0e542e 100644 --- a/linux/network.html +++ b/linux/network.html @@ -2,12 +2,12 @@ - 2.2. Network + 2.7. Network GNU/Linux Index -

    2.2. Network

    +

    2.7. Network

    Operation of the network can be handle with init scripts or with network manager;

    @@ -52,7 +52,7 @@ described scripts then proceed to update system.

    -

    2.2.1. Resolver

    +

    2.7.1. Resolver

    This example will use Chaos Computer Club @@ -68,7 +68,7 @@ # chattr +i /etc/resolv.conf -

    2.2.2. Static IP

    +

    2.7.2. Static IP

    Current example of /etc/rc.d/net;

    @@ -115,7 +115,7 @@ # ip route add default via ${GW} -

    2.2.3. Iptables

    +

    2.7.3. Iptables

    For more information about firewall systems read arch wiki iptables @@ -269,7 +269,7 @@ # iptables -L -n -v | less -

    2.2.3.1. Iptable scripts

    +

    2.7.3.1. Iptable scripts

    Scripts help to setup iptables rules so they can be saved using iptables-save and later restored using iptables-restore utilities. Init script @@ -309,7 +309,45 @@

    From now on use /etc/rc.d/iptables to start and stop.

    -

    2.2.4. Wpa and dhcpd

    +

    2.7.4 Bridges

    + +

    For more information about bridges read + bridges with iptables. + Script /etc/rc.d/blan creates br0 bridge interface + with 10.0.0.1 ip. Number of tap interfaces created and attached depends on number + of cpu cores available. Ethernet interface is added to the bridge. Edit /etc/rc.conf + to setup interfaces at startup;

    + +
    +        #
    +        # /etc/rc.conf: system configuration
    +        #
    +
    +        FONT=default
    +        KEYMAP=dvorak
    +        TIMEZONE="Europe/Lisbon"
    +        HOSTNAME=machine
    +        SYSLOG=sysklogd
    +        SERVICES=(lo iptables wlan blan crond)
    +
    +        # End of file
    +        
    + +

    Change iptables init script + /etc/rc.d/iptables + and set TYPE to bridge, + /etc/iptables/bridge.v4. + Now change + ipt-conf.sh + and ipt-bridge.sh + with your network configuration and run; +

    + +
    +        # bash ipt-bridge.sh
    +        
    + +

    2.7.5. Wpa and dhcpd

    There is more information on Wiki Wifi Start Scripts and @@ -327,7 +365,7 @@ # iwconfig wlp2s0 essid NAME key s:ABCDE12345 -

    2.2.4.1. Wpa Supplicant

    +

    2.7.4.1. Wpa Supplicant

    Configure wpa supplicant edit;

    @@ -357,7 +395,7 @@ init script to auto load wpa configuration and dhcp client.

    -

    2.2.4.2. Wpa Cli

    +

    2.7.4.2. Wpa Cli

             # wpa_cli
    @@ -396,7 +434,7 @@
             > save_config
             
    -

    2.2.5. Network Manager

    +

    2.7.6. Network Manager

    Wifi status;

    @@ -425,6 +463,7 @@ nmcli> save persistent + GNU/Linux Index

    This is part of the LeetIO System Documentation. diff --git a/linux/package.html b/linux/package.html index 4b68b6a..78069eb 100644 --- a/linux/package.html +++ b/linux/package.html @@ -2,13 +2,13 @@ - 2.3. Package Management + 2.2. Package Management GNU/Linux Index -

    2.3. Package Management

    +

    2.2. Package Management

    For more information read crux handbook Package management front-end: @@ -57,7 +57,7 @@ $ prt-get depinst prt-utils prt-get-bashcompletion -

    2.3.1. Update System

    +

    2.2.1. Update System

    Before build software get latest version of port collections;

    @@ -87,7 +87,7 @@ $ prt-get update -fr $(revdep) -

    2.3.2. Install port and dependencies

    +

    2.2.2. Install port and dependencies

    Installing using prt-get tool;

    @@ -111,7 +111,7 @@

    If you user pkgmk and pkgadd allways check if README, pre and post instal files exist.

    -

    2.3.3. Ports collections

    +

    2.2.3. Ports collections

    Clone this documentation;

    @@ -146,7 +146,7 @@ $ sudo ports -u ports -

    2.3.4. Show port information

    +

    2.2.4. Show port information

             $ prt-get info port_name
    @@ -164,13 +164,13 @@
             $ pkginfo -o filename
             
    -

    2.3.5. Show port dependencies

    +

    2.2.5. Show port dependencies

             $ prt-get depends port_name
             
    -

    2.3.6. Print information

    +

    2.2.6. Print information

    Example how to get ports installed from contrib. Maybe there is a "cleaner" way to this, for now is ok;

    diff --git a/linux/tty-terminal.html b/linux/tty-terminal.html index 77c7b9d..60a9f5d 100644 --- a/linux/tty-terminal.html +++ b/linux/tty-terminal.html @@ -2,13 +2,13 @@ - 2.4. Consoles, terminals and shells + 2.3. Consoles, terminals and shells GNU/Linux Index -

    2.4. Consoles, terminals and shells

    +

    2.3. Consoles, terminals and shells

    Consoles
    diff --git a/tools/fail2ban.html b/tools/fail2ban.html deleted file mode 100644 index 71bbdf9..0000000 --- a/tools/fail2ban.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - Fail2ban - - - - Tools Index - -

    Fail2ban

    - -
    -       $ prt-get depinst fail2ban
    -       
    - -

    1. Configure

    - -

    To start fail2ban at next boot edit /etc/rc.conf and add fail2ban. - Fail2ban will verify if /etc/fail2ban/jail.local exist, if exist will - use it. Copy distribution jail.conf to jail.locol;

    - -
    -       $ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
    -       
    - -

    Edit /etc/fail2ban/jail.local, example configuration;

    - -
    -       [ssh-iptables]
    -
    -       enabled  = enable
    -       filter   = sshd
    -       action   = iptables[name=SSH, port=ssh, protocol=tcp]
    -                  sendmail-whois[name=SSH, dest=admin@box, sender=fail2ban@box, sendername="fail2ban"]
    -                  logpath  = /var/log/auth
    -                  maxretry = 5
    -       
    - -

    Test a filter

    - -
    -        # fail2ban-regex /var/log/iptables iptables-ssh.conf
    -        
    - - Tools Index - -

    - This is part of the LeetIO System Documentation. - Copyright (C) 2021 - LeetIO Team. - See the file Gnu Free Documentation License for copying conditions.

    - - diff --git a/tools/index.html b/tools/index.html index 1febb5e..991a1b5 100644 --- a/tools/index.html +++ b/tools/index.html @@ -69,55 +69,6 @@
  • X
  • -

    System Administration

    - - -

    Network Services

    • Qemu -- cgit 1.4.1-2-gfad0 From b1f97c0511405935d64749f74cda497ae7263ed8 Mon Sep 17 00:00:00 2001 From: Silvino Date: Fri, 26 Feb 2021 02:37:55 +0000 Subject: mate port collection update --- linux/conf/ports/mate.git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/conf/ports/mate.git b/linux/conf/ports/mate.git index 3532e3d..d363694 100644 --- a/linux/conf/ports/mate.git +++ b/linux/conf/ports/mate.git @@ -1,7 +1,7 @@ # Collection mate # NAME=mate -URL=git://tribu.semdestino.org/mate.git -BRANCH=stable-3.5 +URL=git://git.leetio.dev/mate.git +BRANCH=stable-3.6 destination=/usr/ports/mate PORTS_DIR="/usr/ports" -- cgit 1.4.1-2-gfad0 From 481f16b3d3f4a0b03ab3bb3b8d879b0c8ec25c04 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Fri, 26 Feb 2021 19:48:39 +0000 Subject: fix install crux version --- linux/index.html | 6 +++--- linux/install.html | 14 +++++++------- linux/scripts/setup-iso.sh | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/linux/index.html b/linux/index.html index 482730a..c9a130f 100644 --- a/linux/index.html +++ b/linux/index.html @@ -11,7 +11,7 @@

      GNU/Linux

      GNU/Linux covers installation and configuration of - basic functionality of Crux 3.5 Gnu\Linux operating system. + basic functionality of Crux 3.6 Gnu\Linux operating system. This documentation try's to follow Crux HandBook installation method diverges, for example, by only installing and documenting gpt and grub2.

      @@ -21,10 +21,10 @@ folder the install process is automated and ports for extra ports used during the installation.

      -

      1. Install Crux 3.5 Gnu/Linux

      +

      1. Install Crux 3.6 Gnu/Linux

        -
      • 1.1. Install Crux 3.5 +
      • 1.1. Install Crux 3.6
        • 1.1.1. Download
        • 1.1.2. Prepare target
        • diff --git a/linux/install.html b/linux/install.html index f42f4a2..299027e 100644 --- a/linux/install.html +++ b/linux/install.html @@ -2,20 +2,20 @@ - 1.1. Install Crux 3.5 + 1.1. Install Crux 3.6 GNU/Linux Index -

          1.1. Install Crux 3.5

          +

          1.1. Install Crux 3.6

          -

          Installation of minimal Crux 3.5 Gnu\Linux system, +

          Installation of minimal Crux 3.6 Gnu\Linux system, with selected packages from core, opt and contrib ports. Process of installation documented can be executed from iso or from existing gnu\linux installation. Read - Hand book 3.5, + Hand book 3.6, .

          If you are booting from crux iso and is not your keyboard @@ -129,12 +129,12 @@

          Create encrypted block for lvm, partition layout of efi and bios boot systems is different.

          -

          On bios_boot systems partition should be 2;

          +

          On bios_boot systems partition should be 2 (sda4);

                   (parted) set 4 lvm on
          -        # cryptsetup luksFormat /dev/sda2
          -        # cryptsetup luksOpen /dev/sda2 cryptlvm
          +        # cryptsetup luksFormat /dev/sda4
          +        # cryptsetup luksOpen /dev/sda4 cryptlvm
                   

          Create physical group and volume group;

          diff --git a/linux/scripts/setup-iso.sh b/linux/scripts/setup-iso.sh index 458284d..19ac21f 100644 --- a/linux/scripts/setup-iso.sh +++ b/linux/scripts/setup-iso.sh @@ -4,13 +4,13 @@ ISO_DIR="/usr/ports/iso" MOUNT_POINT="/mnt/media" -ISO_FILE="${ISO_DIR}/crux-3.5.iso" -MD5_FILE="${ISO_DIR}/crux-3.5.md5" +ISO_FILE="${ISO_DIR}/crux-3.6.iso" +MD5_FILE="${ISO_DIR}/crux-3.6.md5" # iso and md5 remote location -#ISO_URL="https://serverop.de/crux/crux-3.5/iso/crux-3.5.iso" -ISO_URL="https://ftp.spline.inf.fu-berlin.de/pub/crux/crux-3.5/iso/crux-3.5.iso" -MD5_URL="https://serverop.de/crux/crux-3.5/iso/crux-3.5.md5" +#ISO_URL="https://serverop.de/crux/crux-3.6/iso/crux-3.6.iso" +ISO_URL="https://ftp.spline.inf.fu-berlin.de/pub/crux/crux-3.6/iso/crux-3.6.iso" +MD5_URL="https://serverop.de/crux/crux-3.6/iso/crux-3.6.md5" # First we define the function ConfirmOrExit () { @@ -99,8 +99,8 @@ while [ "$1" ]; do -r|--root) ISO_DIR=$2 - ISO_FILE="${ISO_DIR}/crux-3.5.iso" - MD5_FILE="${ISO_DIR}/crux-3.5.md5" + ISO_FILE="${ISO_DIR}/crux-3.6.iso" + MD5_FILE="${ISO_DIR}/crux-3.6.md5" shift ;; -d|--download) -- cgit 1.4.1-2-gfad0 From 21507178e5386bb5645e33276172c55fa4c53bd6 Mon Sep 17 00:00:00 2001 From: Silvino Date: Fri, 26 Feb 2021 19:55:21 +0000 Subject: fix linux mirror-system script --- linux/scripts/mirror-system | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/scripts/mirror-system b/linux/scripts/mirror-system index 6c8a528..73a5473 100755 --- a/linux/scripts/mirror-system +++ b/linux/scripts/mirror-system @@ -51,7 +51,7 @@ for installed in *; do current="${installed}#$(prt-get current ${installed}).pkg.tar.gz" echo "checking $current ..." cp /usr/ports/archive/packages/${current} /usr/ports/packages/ - #prt-get update $installed + prt-get update $installed done done -- cgit 1.4.1-2-gfad0 From aa6c1592080553ee4d034be8a67c5382ed41a489 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Fri, 26 Feb 2021 19:55:17 +0000 Subject: ports config revision --- linux/conf/ports/contrib.git | 2 +- linux/conf/ports/kde5.git | 4 ++-- linux/conf/ports/opt.git | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/linux/conf/ports/contrib.git b/linux/conf/ports/contrib.git index c618a05..493f252 100644 --- a/linux/conf/ports/contrib.git +++ b/linux/conf/ports/contrib.git @@ -1,4 +1,4 @@ -# Collection core +# Collection contrib # NAME=contrib URL=git://git.leetio.dev/contrib.git diff --git a/linux/conf/ports/kde5.git b/linux/conf/ports/kde5.git index fe0f31f..ebfdf39 100644 --- a/linux/conf/ports/kde5.git +++ b/linux/conf/ports/kde5.git @@ -1,7 +1,7 @@ # Collection core # NAME=kde5 -URL=git://tribu.semdestino.org/kde5.git -BRANCH=stable-3.5 +URL=git://git.leetio.dev/kde5.git +BRANCH=stable-3.6 destination=/usr/ports/kde5 PORTS_DIR="/usr/ports" diff --git a/linux/conf/ports/opt.git b/linux/conf/ports/opt.git index ea7676b..fc04b6a 100644 --- a/linux/conf/ports/opt.git +++ b/linux/conf/ports/opt.git @@ -1,4 +1,4 @@ -# Collection core +# Collection opt # NAME=opt URL=git://git.leetio.dev/opt.git -- cgit 1.4.1-2-gfad0 From 0d1b620e0d3d4dfb1a8f1bd903d52b50af61275d Mon Sep 17 00:00:00 2001 From: Silvino Date: Sun, 28 Feb 2021 19:43:36 +0000 Subject: added compat-32 ports collection --- linux/conf/ports/compat-32.git | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 linux/conf/ports/compat-32.git diff --git a/linux/conf/ports/compat-32.git b/linux/conf/ports/compat-32.git new file mode 100644 index 0000000..9f89a92 --- /dev/null +++ b/linux/conf/ports/compat-32.git @@ -0,0 +1,7 @@ +# Collection compat-32 +# +NAME=compat-32 +URL=git://crux.nu/ports/compat-32.git +BRANCH=3.6 +destination=/usr/ports/compat-32 +PORTS_DIR="/usr/ports" -- cgit 1.4.1-2-gfad0 From 4b2865afee1915f229c8c0162ac0d3447237a000 Mon Sep 17 00:00:00 2001 From: Silvino Date: Mon, 1 Mar 2021 13:50:26 +0000 Subject: fix wireless.html location --- linux/wireless.html | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/wireless.html | 133 ---------------------------------------------------- 2 files changed, 133 insertions(+), 133 deletions(-) create mode 100644 linux/wireless.html delete mode 100644 tools/wireless.html diff --git a/linux/wireless.html b/linux/wireless.html new file mode 100644 index 0000000..e15b112 --- /dev/null +++ b/linux/wireless.html @@ -0,0 +1,133 @@ + + + + Wireless + + + Tools Index + +

          Wireless

          + +

          Manual configuration

          + +
          +        # iwlist wlp2s0 scan
          +        # iwconfig wlp2s0 essid name_of_network
          +        
          + +

          To get mac address of the target cell;

          + +
          +        # iwlist wlp2s0 scan
          +        
          + +

          Example output that matter;

          + +
          +        Cell 03 - Address: A8:A6:68:98:0C:C5
          +        
          + + +

          Recover Password WPS

          + +

          First check processes that interfere with state of the interface and kill them;

          + +
          +        # airmon-ng check
          +
          +
          +        Found 5 processes that could cause trouble.
          +        If airodump-ng, aireplay-ng or airtun-ng stops working after
          +        a short period of time, you may want to kill (some of) them!
          +
          +        PID     Name
          +        1271    wpa_supplicant
          +        1576    wpa_supplicant
          +        1633    dhclient
          +        Process with PID 1576 (wpa_supplicant) is running on interface wlan0
          +        Process with PID 1633 (dhclient) is running on interface wlan0
          +        
          + +

          Pkill or kill all of them, ex 1271;

          + +
          +        # kill -15 1271
          +        
          + +

          If that fails;

          + +
          +        # kill -9 1271
          +        
          + +

          If wireless card is intel;

          + +
          +        # rmmod iwlmvm
          +        # rmmod iwlwifi
          +        # modprob iwlwifi
          +        
          + +

          Put interface in monitor mode;

          + +
          +        # iwconfig wlp2s0 mode monitor
          +        # ifconfig wlp2s0 up
          +        
          + +
          +        # airmon-ng start wlp2s0
          +
          +
          +        Interface       Chipset         Driver
          +
          +        wlp2s0           Intel AC        iwlwifi - [phy1]
          +                                        (monitor mode enabled on mon0)
          +        
          + +

          Airdump-ng don't report if a router have WPS or not, for that is used wash;

          + +
          +        # wash -i wlp2s0
          +        
          + +

          If the program report "Found packet with bad FCS", run with -C;

          + +
          +        # wash -C -i wlp2s0
          +        
          + +

          Put mon0 on same channel of target cell;

          + +
          +        # iwconfig mon0 channel 6
          +        
          + +

          Start the magic;

          + +
          +        # reaver -i mon0 -b A8:A6:68:98:0C:C5 -c 6 -vv
          +        
          + +

          If BSSID is cloaked, not being broadcasted, provide it to reaver;

          + +
          +        # reaver -i mon0 -b A8:A6:68:98:0C:C5 -c 6 -e "bssid_name" -vv
          +        
          + +

          -a address of access point, -c client to deauthenticate

          + +
          +        aireplay-ng -0 1 -a 00:14:6C:7E:40:80 -c 00:0F:B5:34:30:30 ath0
          +        
          + + + Tools Index + +

          This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. + See the file Gnu Free Documentation License + for copying conditions.

          + + diff --git a/tools/wireless.html b/tools/wireless.html deleted file mode 100644 index e15b112..0000000 --- a/tools/wireless.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - Wireless - - - Tools Index - -

          Wireless

          - -

          Manual configuration

          - -
          -        # iwlist wlp2s0 scan
          -        # iwconfig wlp2s0 essid name_of_network
          -        
          - -

          To get mac address of the target cell;

          - -
          -        # iwlist wlp2s0 scan
          -        
          - -

          Example output that matter;

          - -
          -        Cell 03 - Address: A8:A6:68:98:0C:C5
          -        
          - - -

          Recover Password WPS

          - -

          First check processes that interfere with state of the interface and kill them;

          - -
          -        # airmon-ng check
          -
          -
          -        Found 5 processes that could cause trouble.
          -        If airodump-ng, aireplay-ng or airtun-ng stops working after
          -        a short period of time, you may want to kill (some of) them!
          -
          -        PID     Name
          -        1271    wpa_supplicant
          -        1576    wpa_supplicant
          -        1633    dhclient
          -        Process with PID 1576 (wpa_supplicant) is running on interface wlan0
          -        Process with PID 1633 (dhclient) is running on interface wlan0
          -        
          - -

          Pkill or kill all of them, ex 1271;

          - -
          -        # kill -15 1271
          -        
          - -

          If that fails;

          - -
          -        # kill -9 1271
          -        
          - -

          If wireless card is intel;

          - -
          -        # rmmod iwlmvm
          -        # rmmod iwlwifi
          -        # modprob iwlwifi
          -        
          - -

          Put interface in monitor mode;

          - -
          -        # iwconfig wlp2s0 mode monitor
          -        # ifconfig wlp2s0 up
          -        
          - -
          -        # airmon-ng start wlp2s0
          -
          -
          -        Interface       Chipset         Driver
          -
          -        wlp2s0           Intel AC        iwlwifi - [phy1]
          -                                        (monitor mode enabled on mon0)
          -        
          - -

          Airdump-ng don't report if a router have WPS or not, for that is used wash;

          - -
          -        # wash -i wlp2s0
          -        
          - -

          If the program report "Found packet with bad FCS", run with -C;

          - -
          -        # wash -C -i wlp2s0
          -        
          - -

          Put mon0 on same channel of target cell;

          - -
          -        # iwconfig mon0 channel 6
          -        
          - -

          Start the magic;

          - -
          -        # reaver -i mon0 -b A8:A6:68:98:0C:C5 -c 6 -vv
          -        
          - -

          If BSSID is cloaked, not being broadcasted, provide it to reaver;

          - -
          -        # reaver -i mon0 -b A8:A6:68:98:0C:C5 -c 6 -e "bssid_name" -vv
          -        
          - -

          -a address of access point, -c client to deauthenticate

          - -
          -        aireplay-ng -0 1 -a 00:14:6C:7E:40:80 -c 00:0F:B5:34:30:30 ath0
          -        
          - - - Tools Index - -

          This is part of the LeetIO System Documentation. - Copyright (C) 2021 - LeetIO Team. - See the file Gnu Free Documentation License - for copying conditions.

          - - -- cgit 1.4.1-2-gfad0 From 8974bfcddfe47a480b296863ba4ef0678a8c1f74 Mon Sep 17 00:00:00 2001 From: Silvino Date: Tue, 2 Mar 2021 21:36:01 +0000 Subject: skel moved to linux --- linux/conf/skel/.gitconfig | 10 ++ linux/conf/skel/.gnupg/gpg.conf | 136 ++++++++++++++++++++ linux/conf/skel/.mutt/external | 27 ++++ linux/conf/skel/.mutt/gpg.rc | 88 +++++++++++++ linux/conf/skel/.mutt/mail_alias | 0 linux/conf/skel/.mutt/muttrc | 60 +++++++++ linux/conf/skel/.mutt/system | 25 ++++ linux/conf/skel/.spectrwm.conf | 131 +++++++++++++++++++ linux/conf/skel/.vim/backup/.gitignore | 0 linux/conf/skel/.vim/colors/wombat256mod.vim | 96 ++++++++++++++ linux/conf/skel/.vim/swap/.gitignore | 0 linux/conf/skel/.vim/undodir/.gitignore | 0 linux/conf/skel/.vim/views/.gitignore | 0 linux/conf/skel/.vimrc | 156 +++++++++++++++++++++++ linux/conf/skel/.xinitrc | 13 ++ tools/conf/etc/skel/.gitconfig | 10 -- tools/conf/etc/skel/.gnupg/gpg.conf | 136 -------------------- tools/conf/etc/skel/.mutt/external | 27 ---- tools/conf/etc/skel/.mutt/gpg.rc | 88 ------------- tools/conf/etc/skel/.mutt/mail_alias | 0 tools/conf/etc/skel/.mutt/muttrc | 60 --------- tools/conf/etc/skel/.mutt/system | 25 ---- tools/conf/etc/skel/.vim/backup/.gitignore | 0 tools/conf/etc/skel/.vim/colors/wombat256mod.vim | 96 -------------- tools/conf/etc/skel/.vim/swap/.gitignore | 0 tools/conf/etc/skel/.vim/undodir/.gitignore | 0 tools/conf/etc/skel/.vim/views/.gitignore | 0 tools/conf/etc/skel/.vimrc | 156 ----------------------- tools/conf/etc/skel/.xinitrc | 13 -- 29 files changed, 742 insertions(+), 611 deletions(-) create mode 100644 linux/conf/skel/.gitconfig create mode 100644 linux/conf/skel/.gnupg/gpg.conf create mode 100644 linux/conf/skel/.mutt/external create mode 100644 linux/conf/skel/.mutt/gpg.rc create mode 100644 linux/conf/skel/.mutt/mail_alias create mode 100644 linux/conf/skel/.mutt/muttrc create mode 100644 linux/conf/skel/.mutt/system create mode 100644 linux/conf/skel/.spectrwm.conf create mode 100644 linux/conf/skel/.vim/backup/.gitignore create mode 100644 linux/conf/skel/.vim/colors/wombat256mod.vim create mode 100644 linux/conf/skel/.vim/swap/.gitignore create mode 100644 linux/conf/skel/.vim/undodir/.gitignore create mode 100644 linux/conf/skel/.vim/views/.gitignore create mode 100644 linux/conf/skel/.vimrc create mode 100644 linux/conf/skel/.xinitrc delete mode 100644 tools/conf/etc/skel/.gitconfig delete mode 100644 tools/conf/etc/skel/.gnupg/gpg.conf delete mode 100644 tools/conf/etc/skel/.mutt/external delete mode 100644 tools/conf/etc/skel/.mutt/gpg.rc delete mode 100644 tools/conf/etc/skel/.mutt/mail_alias delete mode 100644 tools/conf/etc/skel/.mutt/muttrc delete mode 100644 tools/conf/etc/skel/.mutt/system delete mode 100644 tools/conf/etc/skel/.vim/backup/.gitignore delete mode 100644 tools/conf/etc/skel/.vim/colors/wombat256mod.vim delete mode 100644 tools/conf/etc/skel/.vim/swap/.gitignore delete mode 100644 tools/conf/etc/skel/.vim/undodir/.gitignore delete mode 100644 tools/conf/etc/skel/.vim/views/.gitignore delete mode 100644 tools/conf/etc/skel/.vimrc delete mode 100644 tools/conf/etc/skel/.xinitrc diff --git a/linux/conf/skel/.gitconfig b/linux/conf/skel/.gitconfig new file mode 100644 index 0000000..730d8d9 --- /dev/null +++ b/linux/conf/skel/.gitconfig @@ -0,0 +1,10 @@ +[core] + pager = less -F -X + editor = vim +[diff] + tool = vimdiff +[merge] + tool = vimdiff + conflictstyle = diff3 +[difftool] + prompt = false diff --git a/linux/conf/skel/.gnupg/gpg.conf b/linux/conf/skel/.gnupg/gpg.conf new file mode 100644 index 0000000..48edc58 --- /dev/null +++ b/linux/conf/skel/.gnupg/gpg.conf @@ -0,0 +1,136 @@ +# Options for GnuPG +# Copyright 1998-2003, 2010 Free Software Foundation, Inc. +# Copyright 1998-2003, 2010 Werner Koch +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This file is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Unless you specify which option file to use (with the command line +# option "--options filename"), GnuPG uses the file ~/.gnupg/gpg.conf +# by default. +# +# An options file can contain any long options which are available in +# GnuPG. If the first non white space character of a line is a '#', +# this line is ignored. Empty lines are also ignored. +# +# See the gpg man page for a list of options. + + +# If you have more than 1 secret key in your keyring, you may want to +# uncomment the following option and set your preferred keyid. + +#default-key 621CC013 + + +# If you do not pass a recipient to gpg, it will ask for one. Using +# this option you can encrypt to a default key. Key validation will +# not be done in this case. The second form uses the default key as +# default recipient. + +#default-recipient some-user-id +#default-recipient-self + + +# Group names may be defined like this: +# group mynames = paige 0x12345678 joe patti +# +# Any time "mynames" is a recipient (-r or --recipient), it will be +# expanded to the names "paige", "joe", and "patti", and the key ID +# "0x12345678". Note there is only one level of expansion - you +# cannot make an group that points to another group. Note also that +# if there are spaces in the recipient name, this will appear as two +# recipients. In these cases it is better to use the key ID. + +#group mynames = paige 0x12345678 joe patti + + +# GnuPG can automatically locate and retrieve keys as needed using +# this option. This happens when encrypting to an email address (in +# the "user@@example.com" form) and there are no keys matching +# "user@example.com" in the local keyring. This option takes any +# number mechanisms which are tried in the given order. The default +# is "--auto-key-locate local" to search for keys only in the local +# key database. Uncomment the next line to locate a missing key using +# two DNS based mechanisms. + +#auto-key-locate local,pka,dane + + +# Common options for keyserver functions: +# (Note that the --keyserver option has been moved to dirmngr.conf) +# +# include-disabled = when searching, include keys marked as "disabled" +# on the keyserver (not all keyservers support this). +# +# no-include-revoked = when searching, do not include keys marked as +# "revoked" on the keyserver. +# +# verbose = show more information as the keys are fetched. +# Can be used more than once to increase the amount +# of information shown. +# +# auto-key-retrieve = automatically fetch keys as needed from the keyserver +# when verifying signatures or when importing keys that +# have been revoked by a revocation key that is not +# present on the keyring. +# +# no-include-attributes = do not include attribute IDs (aka "photo IDs") +# when sending keys to the keyserver. + +#keyserver-options auto-key-retrieve + + +# Uncomment this line to display photo user IDs in key listings and +# when a signature from a key with a photo is verified. + +#show-photos + + +# Use this program to display photo user IDs +# +# %i is expanded to a temporary file that contains the photo. +# %I is the same as %i, but the file isn't deleted afterwards by GnuPG. +# %k is expanded to the key ID of the key. +# %K is expanded to the long OpenPGP key ID of the key. +# %t is expanded to the extension of the image (e.g. "jpg"). +# %T is expanded to the MIME type of the image (e.g. "image/jpeg"). +# %f is expanded to the fingerprint of the key. +# %% is %, of course. +# +# If %i or %I are not present, then the photo is supplied to the +# viewer on standard input. If your platform supports it, standard +# input is the best way to do this as it avoids the time and effort in +# generating and then cleaning up a secure temp file. +# +# The default program is "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin" +# On Mac OS X and Windows, the default is to use your regular JPEG image +# viewer. +# +# Some other viewers: +# photo-viewer "qiv %i" +# photo-viewer "ee %i" +# photo-viewer "display -title 'KeyID 0x%k'" +# +# This one saves a copy of the photo ID in your home directory: +# photo-viewer "cat > ~/photoid-for-key-%k.%t" +# +# Use your MIME handler to view photos: +# photo-viewer "metamail -q -d -b -c %T -s 'KeyID 0x%k' -f GnuPG" + + +# Because some mailers change lines starting with "From " to ">From " +# it is good to handle such lines in a special way when creating +# cleartext signatures; all other PGP versions do it this way too. +# To enable full OpenPGP compliance you may want to use this option. + +#no-escape-from-lines + + +# Uncomment the following option to get rid of the copyright notice + +#no-greeting diff --git a/linux/conf/skel/.mutt/external b/linux/conf/skel/.mutt/external new file mode 100644 index 0000000..8ade1b1 --- /dev/null +++ b/linux/conf/skel/.mutt/external @@ -0,0 +1,27 @@ +color status blue default + +unset sendmail + +set folder="~/.mailext" +set mbox_type=Maildir +set spoolfile="~/.mailext" +set keep_flagged=yes # esc-f to mark messages in spool, and + +set mbox="~/.mailext" +set postponed="+.Drafts" +set record="+.Sent" + +set use_from=yes +set ssl_starttls=yes +set ssl_force_tls = yes + +set realname='User Name' +set from=mail@external.org + +set pop_user="mail@external.org" +set pop_pass="password" +set pop_delete=yes +set pop_host="pops://$pop_user:$pop_pass@pop.external.org:995" + +set smtp_url="smtps://$pop_user:$pop_pass@smtp.external.org/" + diff --git a/linux/conf/skel/.mutt/gpg.rc b/linux/conf/skel/.mutt/gpg.rc new file mode 100644 index 0000000..2ef0ae2 --- /dev/null +++ b/linux/conf/skel/.mutt/gpg.rc @@ -0,0 +1,88 @@ +# -*-muttrc-*- +# +# Command formats for gpg. +# +# This version uses gpg-2comp from +# http://70t.de/download/gpg-2comp.tar.gz +# +# $Id$ +# +# %p The empty string when no passphrase is needed, +# the string "PGPPASSFD=0" if one is needed. +# +# This is mostly used in conditional % sequences. +# +# %f Most PGP commands operate on a single file or a file +# containing a message. %f expands to this file's name. +# +# %s When verifying signatures, there is another temporary file +# containing the detached signature. %s expands to this +# file's name. +# +# %a In "signing" contexts, this expands to the value of the +# configuration variable $pgp_sign_as. You probably need to +# use this within a conditional % sequence. +# +# %r In many contexts, mutt passes key IDs to pgp. %r expands to +# a list of key IDs. + +# Note that we explicitly set the comment armor header since GnuPG, when used +# in some localiaztion environments, generates 8bit data in that header, thereby +# breaking PGP/MIME. + +# decode application/pgp +set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" + +# verify a pgp/mime signature +set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" + +# create a pgp/mime signed attachment +# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" + +# create a application/pgp signed (old-style) message +# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" + +# create a pgp/mime encrypted attachment +# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" + +# create a pgp/mime encrypted and signed attachment +# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" + +# import a key into the public key ring +set pgp_import_command="gpg --no-verbose --import %f" + +# export a key from the public key ring +set pgp_export_command="gpg --no-verbose --export --armor %r" + +# verify a key +set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r" + +# read in the public key ring +set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-keys %r" + +# read in the secret key ring +set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-secret-keys %r" + +# fetch keys +# set pgp_getkeys_command="pkspxycwrap %r" + +# pattern for good signature - may need to be adapted to locale! + +# set pgp_good_sign="^gpgv?: Good signature from " + +# OK, here's a version which uses gnupg's message catalog: +# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`" + +# This version uses --status-fd messages +set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" + +# pattern to verify a decryption occurred +set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY" + diff --git a/linux/conf/skel/.mutt/mail_alias b/linux/conf/skel/.mutt/mail_alias new file mode 100644 index 0000000..e69de29 diff --git a/linux/conf/skel/.mutt/muttrc b/linux/conf/skel/.mutt/muttrc new file mode 100644 index 0000000..6ec1da4 --- /dev/null +++ b/linux/conf/skel/.mutt/muttrc @@ -0,0 +1,60 @@ +set config_charset="utf-8" +# set locale="de_CH" +set charset="utf-8" +set send_charset="utf-8" +set editor="vim" +set visual=vim +set auto_tag +set sort=threads + +set sort_browser=reverse-date +set sort_aux=reverse-last-date-received +set duplicate_threads=yes + +set crypt_use_gpgme=yes + +## automatically sign all outgoing messages +set crypt_autosign=yes + +## automatically encrypt outgoing messages +set crypt_autoencrypt=yes + +## automatically verify the sign of a message when opened +set crypt_verify_sig=yes + +set pgp_sign_as=0x8BF422F79FC7C975BDF07828E88440BC35095A74 +#set pgp_sign_as=0x8BF422F7 +set pgp_timeout=1800 +set pgp_autosign=yes +#set pgp_replyencrypt=yes + +source ~/.mutt/gpg.rc + +source "~/.mutt/mail_alias" +set alias_file=~/.mutt/mail_alias + +# Header +set header_cache =~/.mutt/cache/headers +set message_cachedir =~/.mutt/cache/bodies +set certificate_file =~/.mutt/certificates + +set timeout=10 # mutt 'presses' (like) a key for you + #(while you're idle) each x sec to trigger + #the thing below +set mail_check=5 # mutt checks for new mails on every keystroke + # but not more often then once in 5 seconds +set beep_new # beep on new messages in the mailboxes + +## Local system account +folder-hook '.mail' 'source ~/.mutt/system' + +## Remote account +folder-hook '.mailext' 'source ~/.mutt/external' + +## Default account +source ~/.mutt/system + +## Shortcuts +macro index,pager 'source ~/.mutt/external!' + +macro index,pager 'source ~/.mutt/system!' diff --git a/linux/conf/skel/.mutt/system b/linux/conf/skel/.mutt/system new file mode 100644 index 0000000..ae23778 --- /dev/null +++ b/linux/conf/skel/.mutt/system @@ -0,0 +1,25 @@ +color status green default + +set folder="~/.mail" +set mbox_type=Maildir +set spoolfile=/var/spool/mail/username +set keep_flagged=yes + +set mbox="~/.mail" # ~/.mailext/read_inbox +set postponed="+.Drafts" +set record="+.Sent" + +set use_from=yes + +set sendmail=/usr/sbin/exim +set ssl_starttls=no +set ssl_force_tls=no + +unset pop_user +unset pop_pass +unset pop_delete +unset pop_host +unset smtp_url + +set realname='username' +set from=username@localhost diff --git a/linux/conf/skel/.spectrwm.conf b/linux/conf/skel/.spectrwm.conf new file mode 100644 index 0000000..73f2a3a --- /dev/null +++ b/linux/conf/skel/.spectrwm.conf @@ -0,0 +1,131 @@ +# PLEASE READ THE MAN PAGE BEFORE EDITING THIS FILE! +# https://htmlpreview.github.io/?https://github.com/conformal/spectrwm/blob/master/spectrwm.html +# NOTE: all rgb color values in this file are in hex! see XQueryColor for examples + +# workspace_limit = 22 +# focus_mode = default +# focus_close = previous +# focus_close_wrap = 1 +# focus_default = last +# spawn_position = next +# workspace_clamp = 1 +# warp_focus = 1 +# warp_pointer = 1 + +# Window Decoration +# border_width = 1 +# color_focus = red +# color_focus_maximized = yellow +# color_unfocus = rgb:88/88/88 +# color_unfocus_maximized = rgb:88/88/00 +# region_padding = 0 +# tile_gap = 0 + +# Region containment +# Distance window must be dragged/resized beyond the region edge before it is +# allowed outside the region. +# boundary_width = 50 + +# Remove window border when bar is disabled and there is only one window in workspace +# disable_border = 1 + +# Bar Settings +# bar_enabled = 1 +# bar_border_width = 1 +# bar_border[1] = rgb:00/80/80 +# bar_border_unfocus[1] = rgb:00/40/40 +# bar_color[1] = black +# bar_color_selected[1] = rgb:00/80/80 +# bar_font_color[1] = rgb:a0/a0/a0 +# bar_font_color_selected = black +# bar_font = -*-terminus-medium-*-*-*-*-*-*-*-*-*-*-* +bar_font = bar_font = Terminus:pixelsize=14:antialias=true +# bar_action = baraction.sh +# bar_justify = left +# bar_format = +N:+I +S <+D>+4<%a %b %d %R %Z %Y+8<+A+4<+V +# workspace_indicator = listcurrent,listactive,markcurrent,printnames +# bar_at_bottom = 1 +# stack_enabled = 1 +# clock_enabled = 1 +# clock_format = %a %b %d %R %Z %Y +# iconic_enabled = 0 +# maximize_hide_bar = 0 +# window_class_enabled = 0 +# window_instance_enabled = 0 +# window_name_enabled = 0 +# verbose_layout = 1 +# urgent_enabled = 1 + +# Dialog box size ratio when using TRANSSZ quirk; 0.3 < dialog_ratio <= 1.0 +# dialog_ratio = 0.6 + +# Split a non-RandR dual head setup into one region per monitor +# (non-standard driver-based multihead is not seen by spectrwm) +# region = screen[1]:1280x1024+0+0 +# region = screen[1]:1280x1024+1280+0 + +# Launch applications in a workspace of choice +# autorun = ws[1]:xterm +# autorun = ws[2]:xombrero http://www.openbsd.org +#autorun = ws[1]:wicd-gtk +autorun = ws[1]:st -e tmux + + +# Customize workspace layout at start +# layout = ws[1]:4:0:0:0:vertical +# layout = ws[2]:0:0:0:0:horizontal +# layout = ws[3]:0:0:0:0:fullscreen +# layout = ws[4]:4:0:0:0:vertical_flip +# layout = ws[5]:0:0:0:0:horizontal_flip + +# Set workspace name at start +# name = ws[1]:IRC +# name = ws[2]:Email +# name = ws[3]:Browse +# name = ws[10]:Music + +# Mod key, (Windows key is Mod4) (Apple key on OSX is Mod2) +# modkey = Mod1 + +# This allows you to include pre-defined key bindings for your keyboard layout. +# keyboard_mapping = ~/.spectrwm_us.conf + +# PROGRAMS + +# Validated default programs: +program[lock] = slock +program[term] = st +# program[menu] = dmenu_run $dmenu_bottom -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected +# program[search] = dmenu $dmenu_bottom -i -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected +# program[name_workspace] = dmenu $dmenu_bottom -p Workspace -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected + +# To disable validation of the above, free the respective binding(s): +# bind[] = MOD+Shift+Delete # disable lock +# bind[] = MOD+Shift+Return # disable term +# bind[] = MOD+p # disable menu + +# Optional default programs that will only be validated if you override: +# program[screenshot_all] = screenshot.sh full # optional +# program[screenshot_wind] = screenshot.sh window # optional +# program[initscr] = initscreen.sh # optional + +# EXAMPLE: Define 'firefox' action and bind to key. +# program[firefox] = firefox http://spectrwm.org/ +# bind[firefox] = MOD+Shift+b + +# QUIRKS +# Default quirks, remove with: quirk[class:name] = NONE +# quirk[MPlayer:xv] = FLOAT + FULLSCREEN + FOCUSPREV +# quirk[OpenOffice.org 2.4:VCLSalFrame] = FLOAT +# quirk[OpenOffice.org 3.0:VCLSalFrame] = FLOAT +# quirk[OpenOffice.org 3.1:VCLSalFrame] = FLOAT +# quirk[Firefox-bin:firefox-bin] = TRANSSZ +# quirk[Firefox:Dialog] = FLOAT +# quirk[Gimp:gimp] = FLOAT + ANYWHERE +# quirk[XTerm:xterm] = XTERM_FONTADJ +# quirk[xine:Xine Window] = FLOAT + ANYWHERE +# quirk[Xitk:Xitk Combo] = FLOAT + ANYWHERE +# quirk[xine:xine Panel] = FLOAT + ANYWHERE +# quirk[Xitk:Xine Window] = FLOAT + ANYWHERE +# quirk[xine:xine Video Fullscreen Window] = FULLSCREEN + FLOAT +# quirk[pcb:pcb] = FLOAT diff --git a/linux/conf/skel/.vim/backup/.gitignore b/linux/conf/skel/.vim/backup/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/linux/conf/skel/.vim/colors/wombat256mod.vim b/linux/conf/skel/.vim/colors/wombat256mod.vim new file mode 100644 index 0000000..1137eb8 --- /dev/null +++ b/linux/conf/skel/.vim/colors/wombat256mod.vim @@ -0,0 +1,96 @@ +" Vim color file +" Original Maintainer: Lars H. Nielsen (dengmao@gmail.com) +" Last Change: 2010-07-23 +" +" Modified version of wombat for 256-color terminals by +" David Liang (bmdavll@gmail.com) +" based on version by +" Danila Bespalov (danila.bespalov@gmail.com) + +set background=dark + +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +let colors_name = "wombat256mod" + + +" General colors +hi Normal ctermfg=252 ctermbg=234 cterm=none guifg=#e3e0d7 guibg=#242424 gui=none +hi Cursor ctermfg=234 ctermbg=228 cterm=none guifg=#242424 guibg=#eae788 gui=none +hi Visual ctermfg=251 ctermbg=239 cterm=none guifg=#c3c6ca guibg=#554d4b gui=none +hi VisualNOS ctermfg=251 ctermbg=236 cterm=none guifg=#c3c6ca guibg=#303030 gui=none +hi Search ctermfg=177 ctermbg=241 cterm=none guifg=#d787ff guibg=#636066 gui=none +hi Folded ctermfg=103 ctermbg=237 cterm=none guifg=#a0a8b0 guibg=#3a4046 gui=none +hi Title ctermfg=230 cterm=bold guifg=#ffffd7 gui=bold +hi StatusLine ctermfg=230 ctermbg=238 cterm=none guifg=#ffffd7 guibg=#444444 gui=italic +hi VertSplit ctermfg=238 ctermbg=238 cterm=none guifg=#444444 guibg=#444444 gui=none +hi StatusLineNC ctermfg=241 ctermbg=238 cterm=none guifg=#857b6f guibg=#444444 gui=none +hi LineNr ctermfg=241 ctermbg=232 cterm=none guifg=#857b6f guibg=#080808 gui=none +hi SpecialKey ctermfg=241 ctermbg=235 cterm=none guifg=#626262 guibg=#2b2b2b gui=none +hi WarningMsg ctermfg=203 guifg=#ff5f55 +hi ErrorMsg ctermfg=196 ctermbg=236 cterm=bold guifg=#ff2026 guibg=#3a3a3a gui=bold + +" Vim >= 7.0 specific colors +if version >= 700 +hi CursorLine ctermbg=236 cterm=none guibg=#32322f +hi MatchParen ctermfg=228 ctermbg=101 cterm=bold guifg=#eae788 guibg=#857b6f gui=bold +hi Pmenu ctermfg=230 ctermbg=238 guifg=#ffffd7 guibg=#444444 +hi PmenuSel ctermfg=232 ctermbg=192 guifg=#080808 guibg=#cae982 +endif + +" Diff highlighting +hi DiffAdd ctermbg=17 guibg=#2a0d6a +hi DiffDelete ctermfg=234 ctermbg=60 cterm=none guifg=#242424 guibg=#3e3969 gui=none +hi DiffText ctermbg=53 cterm=none guibg=#73186e gui=none +hi DiffChange ctermbg=237 guibg=#382a37 + +"hi CursorIM +"hi Directory +"hi IncSearch +"hi Menu +"hi ModeMsg +"hi MoreMsg +"hi PmenuSbar +"hi PmenuThumb +"hi Question +"hi Scrollbar +"hi SignColumn +"hi SpellBad +"hi SpellCap +"hi SpellLocal +"hi SpellRare +"hi TabLine +"hi TabLineFill +"hi TabLineSel +"hi Tooltip +"hi User1 +"hi User9 +"hi WildMenu + + +" Syntax highlighting +hi Keyword ctermfg=111 cterm=none guifg=#88b8f6 gui=none +hi Statement ctermfg=111 cterm=none guifg=#88b8f6 gui=none +hi Constant ctermfg=173 cterm=none guifg=#e5786d gui=none +hi Number ctermfg=173 cterm=none guifg=#e5786d gui=none +hi PreProc ctermfg=173 cterm=none guifg=#e5786d gui=none +hi Function ctermfg=192 cterm=none guifg=#cae982 gui=none +hi Identifier ctermfg=192 cterm=none guifg=#cae982 gui=none +hi Type ctermfg=186 cterm=none guifg=#d4d987 gui=none +hi Special ctermfg=229 cterm=none guifg=#eadead gui=none +hi String ctermfg=113 cterm=none guifg=#95e454 gui=italic +hi Comment ctermfg=246 cterm=none guifg=#9c998e gui=italic +hi Todo ctermfg=101 cterm=none guifg=#857b6f gui=italic + + +" Links +hi! link FoldColumn Folded +hi! link CursorColumn CursorLine +hi! link NonText LineNr + +" vim:set ts=4 sw=4 noet: diff --git a/linux/conf/skel/.vim/swap/.gitignore b/linux/conf/skel/.vim/swap/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/linux/conf/skel/.vim/undodir/.gitignore b/linux/conf/skel/.vim/undodir/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/linux/conf/skel/.vim/views/.gitignore b/linux/conf/skel/.vim/views/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/linux/conf/skel/.vimrc b/linux/conf/skel/.vimrc new file mode 100644 index 0000000..fb4445f --- /dev/null +++ b/linux/conf/skel/.vimrc @@ -0,0 +1,156 @@ +" Use Vim settings, rather than Vi settings (much better!). +" This must be first, because it changes other options as a side effect. +set nocompatible + +"" allow backspacing over everything in insert mode +"set backspace=indent,eol,start +" +if has("vms") + set nobackup " do not keep a backup file, use versions instead +else + set backup " keep a backup file (restore to previous version) + set undofile " keep an undo file (undo changes after closing) +endif + +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time +set showcmd " display incomplete commands +set incsearch " do incremental searching + +"" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries +"" let &guioptions = substitute(&guioptions, "t", "", "g") +" +"" Don't use Ex mode, use Q for formatting +"map Q gq +" +"" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, +"" so that you can undo CTRL-U after inserting a line break. +"inoremap u +" +"" In many terminal emulators the mouse works just fine, thus enable it. +"if has('mouse') +" set mouse=a +"endif +" +"" Switch syntax highlighting on, when the terminal has colors +"" Also switch on highlighting the last used search pattern. + +" colorscheme desert +set t_Co=256 +if &t_Co > 2 || has("gui_running") + syntax on + set hlsearch + set background=dark + colorscheme wombat256mod + " colorscheme desert + :hi SpellBad ctermfg=Black guifg=Black +endif + + +"" Only do this part when compiled with support for autocommands. +if has("autocmd") +" +" " Enable file type detection. +" " Use the default filetype settings, so that mail gets 'tw' set to 72, +" " 'cindent' is on in C files, etc. +" " Also load indent files, to automatically do language-dependent indenting. + filetype plugin indent on +" +" " Put these in an autocmd group, so that we can delete them easily. + augroup vimrcEx + au! +" +" " For all text files set 'textwidth' to 78 characters. +" autocmd FileType text setlocal textwidth=78 +" +" " When editing a file, always jump to the last known cursor position. +" " Don't do it when the position is invalid or when inside an event handler +" " (happens when dropping a file on gvim). + autocmd BufReadPost * + \ if line("'\"") >= 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + + augroup END + +else + set autoindent " always set autoindenting on + +endif " has("autocmd") + +"" Convenient command to see the difference between the current buffer and the +"" file it was loaded from, thus the changes you made. +"" Only define it when not defined already. +"if !exists(":DiffOrig") +" command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis +" \ | wincmd p | diffthis +"endif +" +"if has('langmap') && exists('+langnoremap') +" " Prevent that the langmap option applies to characters that result from a +" " mapping. If unset (default), this may break plugins (but it's backward +" " compatible). +" set langnoremap +"endif + +" Search down into subfolders +" Provides tab-completion for all file-related tasks +set path+=** + +" Display all matching files when we tab complete +set wildmenu + +" Better file browsing +let g:netrw_banner=0 " disable annoying banner +let g:netrw_browse_split=4 " open in prior window +let g:netrw_altv=1 " open splits to the right +let g:netrw_liststyle=3 " tree view +let g:netrw_list_hide=netrw_gitignore#Hide() +let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' + + +map :tabnew +map :tabprevious +map :tabnext +" +"" Show Line Numbers +set relativenumber +set complete=.,b,u,] +set wildmode=longest,list:longest +set completeopt=menu,preview +" +"" Directories +set backupdir=~/.vim/backup +set undodir=~/.vim/undodir +set viewdir=~/.vim/views +set directory=~/.vim/swap +" +"" Spell Check +set spell spelllang=en_us +" +"" Strips whitespace +nnoremap W :%s/\s\+$//:let @/='' +" +"" Whitespace fixes +highlight ExtraWhitespace ctermbg=red guibg=red + +match ExtraWhitespace /\s\+$/ +autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ +autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@ ~/photoid-for-key-%k.%t" -# -# Use your MIME handler to view photos: -# photo-viewer "metamail -q -d -b -c %T -s 'KeyID 0x%k' -f GnuPG" - - -# Because some mailers change lines starting with "From " to ">From " -# it is good to handle such lines in a special way when creating -# cleartext signatures; all other PGP versions do it this way too. -# To enable full OpenPGP compliance you may want to use this option. - -#no-escape-from-lines - - -# Uncomment the following option to get rid of the copyright notice - -#no-greeting diff --git a/tools/conf/etc/skel/.mutt/external b/tools/conf/etc/skel/.mutt/external deleted file mode 100644 index 8ade1b1..0000000 --- a/tools/conf/etc/skel/.mutt/external +++ /dev/null @@ -1,27 +0,0 @@ -color status blue default - -unset sendmail - -set folder="~/.mailext" -set mbox_type=Maildir -set spoolfile="~/.mailext" -set keep_flagged=yes # esc-f to mark messages in spool, and - -set mbox="~/.mailext" -set postponed="+.Drafts" -set record="+.Sent" - -set use_from=yes -set ssl_starttls=yes -set ssl_force_tls = yes - -set realname='User Name' -set from=mail@external.org - -set pop_user="mail@external.org" -set pop_pass="password" -set pop_delete=yes -set pop_host="pops://$pop_user:$pop_pass@pop.external.org:995" - -set smtp_url="smtps://$pop_user:$pop_pass@smtp.external.org/" - diff --git a/tools/conf/etc/skel/.mutt/gpg.rc b/tools/conf/etc/skel/.mutt/gpg.rc deleted file mode 100644 index 2ef0ae2..0000000 --- a/tools/conf/etc/skel/.mutt/gpg.rc +++ /dev/null @@ -1,88 +0,0 @@ -# -*-muttrc-*- -# -# Command formats for gpg. -# -# This version uses gpg-2comp from -# http://70t.de/download/gpg-2comp.tar.gz -# -# $Id$ -# -# %p The empty string when no passphrase is needed, -# the string "PGPPASSFD=0" if one is needed. -# -# This is mostly used in conditional % sequences. -# -# %f Most PGP commands operate on a single file or a file -# containing a message. %f expands to this file's name. -# -# %s When verifying signatures, there is another temporary file -# containing the detached signature. %s expands to this -# file's name. -# -# %a In "signing" contexts, this expands to the value of the -# configuration variable $pgp_sign_as. You probably need to -# use this within a conditional % sequence. -# -# %r In many contexts, mutt passes key IDs to pgp. %r expands to -# a list of key IDs. - -# Note that we explicitly set the comment armor header since GnuPG, when used -# in some localiaztion environments, generates 8bit data in that header, thereby -# breaking PGP/MIME. - -# decode application/pgp -set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" - -# verify a pgp/mime signature -set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" - -# decrypt a pgp/mime attachment -set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" - -# create a pgp/mime signed attachment -# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" -set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" - -# create a application/pgp signed (old-style) message -# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" -set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" - -# create a pgp/mime encrypted attachment -# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" -set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" - -# create a pgp/mime encrypted and signed attachment -# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" -set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" - -# import a key into the public key ring -set pgp_import_command="gpg --no-verbose --import %f" - -# export a key from the public key ring -set pgp_export_command="gpg --no-verbose --export --armor %r" - -# verify a key -set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r" - -# read in the public key ring -set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-keys %r" - -# read in the secret key ring -set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-secret-keys %r" - -# fetch keys -# set pgp_getkeys_command="pkspxycwrap %r" - -# pattern for good signature - may need to be adapted to locale! - -# set pgp_good_sign="^gpgv?: Good signature from " - -# OK, here's a version which uses gnupg's message catalog: -# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`" - -# This version uses --status-fd messages -set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" - -# pattern to verify a decryption occurred -set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY" - diff --git a/tools/conf/etc/skel/.mutt/mail_alias b/tools/conf/etc/skel/.mutt/mail_alias deleted file mode 100644 index e69de29..0000000 diff --git a/tools/conf/etc/skel/.mutt/muttrc b/tools/conf/etc/skel/.mutt/muttrc deleted file mode 100644 index 6ec1da4..0000000 --- a/tools/conf/etc/skel/.mutt/muttrc +++ /dev/null @@ -1,60 +0,0 @@ -set config_charset="utf-8" -# set locale="de_CH" -set charset="utf-8" -set send_charset="utf-8" -set editor="vim" -set visual=vim -set auto_tag -set sort=threads - -set sort_browser=reverse-date -set sort_aux=reverse-last-date-received -set duplicate_threads=yes - -set crypt_use_gpgme=yes - -## automatically sign all outgoing messages -set crypt_autosign=yes - -## automatically encrypt outgoing messages -set crypt_autoencrypt=yes - -## automatically verify the sign of a message when opened -set crypt_verify_sig=yes - -set pgp_sign_as=0x8BF422F79FC7C975BDF07828E88440BC35095A74 -#set pgp_sign_as=0x8BF422F7 -set pgp_timeout=1800 -set pgp_autosign=yes -#set pgp_replyencrypt=yes - -source ~/.mutt/gpg.rc - -source "~/.mutt/mail_alias" -set alias_file=~/.mutt/mail_alias - -# Header -set header_cache =~/.mutt/cache/headers -set message_cachedir =~/.mutt/cache/bodies -set certificate_file =~/.mutt/certificates - -set timeout=10 # mutt 'presses' (like) a key for you - #(while you're idle) each x sec to trigger - #the thing below -set mail_check=5 # mutt checks for new mails on every keystroke - # but not more often then once in 5 seconds -set beep_new # beep on new messages in the mailboxes - -## Local system account -folder-hook '.mail' 'source ~/.mutt/system' - -## Remote account -folder-hook '.mailext' 'source ~/.mutt/external' - -## Default account -source ~/.mutt/system - -## Shortcuts -macro index,pager 'source ~/.mutt/external!' - -macro index,pager 'source ~/.mutt/system!' diff --git a/tools/conf/etc/skel/.mutt/system b/tools/conf/etc/skel/.mutt/system deleted file mode 100644 index ae23778..0000000 --- a/tools/conf/etc/skel/.mutt/system +++ /dev/null @@ -1,25 +0,0 @@ -color status green default - -set folder="~/.mail" -set mbox_type=Maildir -set spoolfile=/var/spool/mail/username -set keep_flagged=yes - -set mbox="~/.mail" # ~/.mailext/read_inbox -set postponed="+.Drafts" -set record="+.Sent" - -set use_from=yes - -set sendmail=/usr/sbin/exim -set ssl_starttls=no -set ssl_force_tls=no - -unset pop_user -unset pop_pass -unset pop_delete -unset pop_host -unset smtp_url - -set realname='username' -set from=username@localhost diff --git a/tools/conf/etc/skel/.vim/backup/.gitignore b/tools/conf/etc/skel/.vim/backup/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/tools/conf/etc/skel/.vim/colors/wombat256mod.vim b/tools/conf/etc/skel/.vim/colors/wombat256mod.vim deleted file mode 100644 index 1137eb8..0000000 --- a/tools/conf/etc/skel/.vim/colors/wombat256mod.vim +++ /dev/null @@ -1,96 +0,0 @@ -" Vim color file -" Original Maintainer: Lars H. Nielsen (dengmao@gmail.com) -" Last Change: 2010-07-23 -" -" Modified version of wombat for 256-color terminals by -" David Liang (bmdavll@gmail.com) -" based on version by -" Danila Bespalov (danila.bespalov@gmail.com) - -set background=dark - -if version > 580 - hi clear - if exists("syntax_on") - syntax reset - endif -endif - -let colors_name = "wombat256mod" - - -" General colors -hi Normal ctermfg=252 ctermbg=234 cterm=none guifg=#e3e0d7 guibg=#242424 gui=none -hi Cursor ctermfg=234 ctermbg=228 cterm=none guifg=#242424 guibg=#eae788 gui=none -hi Visual ctermfg=251 ctermbg=239 cterm=none guifg=#c3c6ca guibg=#554d4b gui=none -hi VisualNOS ctermfg=251 ctermbg=236 cterm=none guifg=#c3c6ca guibg=#303030 gui=none -hi Search ctermfg=177 ctermbg=241 cterm=none guifg=#d787ff guibg=#636066 gui=none -hi Folded ctermfg=103 ctermbg=237 cterm=none guifg=#a0a8b0 guibg=#3a4046 gui=none -hi Title ctermfg=230 cterm=bold guifg=#ffffd7 gui=bold -hi StatusLine ctermfg=230 ctermbg=238 cterm=none guifg=#ffffd7 guibg=#444444 gui=italic -hi VertSplit ctermfg=238 ctermbg=238 cterm=none guifg=#444444 guibg=#444444 gui=none -hi StatusLineNC ctermfg=241 ctermbg=238 cterm=none guifg=#857b6f guibg=#444444 gui=none -hi LineNr ctermfg=241 ctermbg=232 cterm=none guifg=#857b6f guibg=#080808 gui=none -hi SpecialKey ctermfg=241 ctermbg=235 cterm=none guifg=#626262 guibg=#2b2b2b gui=none -hi WarningMsg ctermfg=203 guifg=#ff5f55 -hi ErrorMsg ctermfg=196 ctermbg=236 cterm=bold guifg=#ff2026 guibg=#3a3a3a gui=bold - -" Vim >= 7.0 specific colors -if version >= 700 -hi CursorLine ctermbg=236 cterm=none guibg=#32322f -hi MatchParen ctermfg=228 ctermbg=101 cterm=bold guifg=#eae788 guibg=#857b6f gui=bold -hi Pmenu ctermfg=230 ctermbg=238 guifg=#ffffd7 guibg=#444444 -hi PmenuSel ctermfg=232 ctermbg=192 guifg=#080808 guibg=#cae982 -endif - -" Diff highlighting -hi DiffAdd ctermbg=17 guibg=#2a0d6a -hi DiffDelete ctermfg=234 ctermbg=60 cterm=none guifg=#242424 guibg=#3e3969 gui=none -hi DiffText ctermbg=53 cterm=none guibg=#73186e gui=none -hi DiffChange ctermbg=237 guibg=#382a37 - -"hi CursorIM -"hi Directory -"hi IncSearch -"hi Menu -"hi ModeMsg -"hi MoreMsg -"hi PmenuSbar -"hi PmenuThumb -"hi Question -"hi Scrollbar -"hi SignColumn -"hi SpellBad -"hi SpellCap -"hi SpellLocal -"hi SpellRare -"hi TabLine -"hi TabLineFill -"hi TabLineSel -"hi Tooltip -"hi User1 -"hi User9 -"hi WildMenu - - -" Syntax highlighting -hi Keyword ctermfg=111 cterm=none guifg=#88b8f6 gui=none -hi Statement ctermfg=111 cterm=none guifg=#88b8f6 gui=none -hi Constant ctermfg=173 cterm=none guifg=#e5786d gui=none -hi Number ctermfg=173 cterm=none guifg=#e5786d gui=none -hi PreProc ctermfg=173 cterm=none guifg=#e5786d gui=none -hi Function ctermfg=192 cterm=none guifg=#cae982 gui=none -hi Identifier ctermfg=192 cterm=none guifg=#cae982 gui=none -hi Type ctermfg=186 cterm=none guifg=#d4d987 gui=none -hi Special ctermfg=229 cterm=none guifg=#eadead gui=none -hi String ctermfg=113 cterm=none guifg=#95e454 gui=italic -hi Comment ctermfg=246 cterm=none guifg=#9c998e gui=italic -hi Todo ctermfg=101 cterm=none guifg=#857b6f gui=italic - - -" Links -hi! link FoldColumn Folded -hi! link CursorColumn CursorLine -hi! link NonText LineNr - -" vim:set ts=4 sw=4 noet: diff --git a/tools/conf/etc/skel/.vim/swap/.gitignore b/tools/conf/etc/skel/.vim/swap/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/tools/conf/etc/skel/.vim/undodir/.gitignore b/tools/conf/etc/skel/.vim/undodir/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/tools/conf/etc/skel/.vim/views/.gitignore b/tools/conf/etc/skel/.vim/views/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/tools/conf/etc/skel/.vimrc b/tools/conf/etc/skel/.vimrc deleted file mode 100644 index fb4445f..0000000 --- a/tools/conf/etc/skel/.vimrc +++ /dev/null @@ -1,156 +0,0 @@ -" Use Vim settings, rather than Vi settings (much better!). -" This must be first, because it changes other options as a side effect. -set nocompatible - -"" allow backspacing over everything in insert mode -"set backspace=indent,eol,start -" -if has("vms") - set nobackup " do not keep a backup file, use versions instead -else - set backup " keep a backup file (restore to previous version) - set undofile " keep an undo file (undo changes after closing) -endif - -set history=50 " keep 50 lines of command line history -set ruler " show the cursor position all the time -set showcmd " display incomplete commands -set incsearch " do incremental searching - -"" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries -"" let &guioptions = substitute(&guioptions, "t", "", "g") -" -"" Don't use Ex mode, use Q for formatting -"map Q gq -" -"" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, -"" so that you can undo CTRL-U after inserting a line break. -"inoremap u -" -"" In many terminal emulators the mouse works just fine, thus enable it. -"if has('mouse') -" set mouse=a -"endif -" -"" Switch syntax highlighting on, when the terminal has colors -"" Also switch on highlighting the last used search pattern. - -" colorscheme desert -set t_Co=256 -if &t_Co > 2 || has("gui_running") - syntax on - set hlsearch - set background=dark - colorscheme wombat256mod - " colorscheme desert - :hi SpellBad ctermfg=Black guifg=Black -endif - - -"" Only do this part when compiled with support for autocommands. -if has("autocmd") -" -" " Enable file type detection. -" " Use the default filetype settings, so that mail gets 'tw' set to 72, -" " 'cindent' is on in C files, etc. -" " Also load indent files, to automatically do language-dependent indenting. - filetype plugin indent on -" -" " Put these in an autocmd group, so that we can delete them easily. - augroup vimrcEx - au! -" -" " For all text files set 'textwidth' to 78 characters. -" autocmd FileType text setlocal textwidth=78 -" -" " When editing a file, always jump to the last known cursor position. -" " Don't do it when the position is invalid or when inside an event handler -" " (happens when dropping a file on gvim). - autocmd BufReadPost * - \ if line("'\"") >= 1 && line("'\"") <= line("$") | - \ exe "normal! g`\"" | - \ endif - - augroup END - -else - set autoindent " always set autoindenting on - -endif " has("autocmd") - -"" Convenient command to see the difference between the current buffer and the -"" file it was loaded from, thus the changes you made. -"" Only define it when not defined already. -"if !exists(":DiffOrig") -" command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis -" \ | wincmd p | diffthis -"endif -" -"if has('langmap') && exists('+langnoremap') -" " Prevent that the langmap option applies to characters that result from a -" " mapping. If unset (default), this may break plugins (but it's backward -" " compatible). -" set langnoremap -"endif - -" Search down into subfolders -" Provides tab-completion for all file-related tasks -set path+=** - -" Display all matching files when we tab complete -set wildmenu - -" Better file browsing -let g:netrw_banner=0 " disable annoying banner -let g:netrw_browse_split=4 " open in prior window -let g:netrw_altv=1 " open splits to the right -let g:netrw_liststyle=3 " tree view -let g:netrw_list_hide=netrw_gitignore#Hide() -let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' - - -map :tabnew -map :tabprevious -map :tabnext -" -"" Show Line Numbers -set relativenumber -set complete=.,b,u,] -set wildmode=longest,list:longest -set completeopt=menu,preview -" -"" Directories -set backupdir=~/.vim/backup -set undodir=~/.vim/undodir -set viewdir=~/.vim/views -set directory=~/.vim/swap -" -"" Spell Check -set spell spelllang=en_us -" -"" Strips whitespace -nnoremap W :%s/\s\+$//:let @/='' -" -"" Whitespace fixes -highlight ExtraWhitespace ctermbg=red guibg=red - -match ExtraWhitespace /\s\+$/ -autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ -autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@ Date: Wed, 3 Mar 2021 03:07:44 +0000 Subject: OpenBSD documentation dev/c system dev rev --- dev/c/index.html | 15 +- dev/c/src/basic/Makefile | 4 +- dev/c/src/basic/shell.c | 57 ++++++++ dev/c/src/fork/Makefile | 11 ++ dev/c/src/fork/fork.c | 38 +++++ dev/c/src/fork/fork_exec.c | 40 +++++ dev/c/src/hello/Makefile | 3 +- dev/c/src/hello/hello.c | 6 +- dev/c/src/linux/Makefile | 13 ++ dev/c/src/linux/init.c | 8 + dev/c/src/linux/rungdb.sh | 12 ++ dev/c/system.html | 101 +++++++++++-- openbsd/conf/skel/.Xdefaults | 4 - openbsd/conf/skel/.Xresources | 25 ++++ openbsd/conf/skel/.kshrc | 3 +- openbsd/conf/skel/.lynx.cfg | 5 + openbsd/conf/skel/.lynxrc | 333 ++++++++++++++++++++++++++++++++++++++++++ openbsd/index.html | 36 +++++ openbsd/install.html | 124 ++++++++++++++++ openbsd/network.html | 25 ++++ openbsd/partitions.html | 27 ++++ openbsd/pf.html | 151 +++++++++++++++++++ openbsd/sources.html | 79 ++++++++++ tools/index.html | 1 + tools/qemu.html | 32 ++-- tools/tar.html | 2 +- 26 files changed, 1106 insertions(+), 49 deletions(-) create mode 100644 dev/c/src/basic/shell.c create mode 100644 dev/c/src/fork/Makefile create mode 100644 dev/c/src/fork/fork.c create mode 100644 dev/c/src/fork/fork_exec.c create mode 100644 dev/c/src/linux/Makefile create mode 100644 dev/c/src/linux/init.c create mode 100644 dev/c/src/linux/rungdb.sh create mode 100644 openbsd/conf/skel/.Xresources create mode 100644 openbsd/conf/skel/.lynx.cfg create mode 100644 openbsd/conf/skel/.lynxrc create mode 100644 openbsd/install.html create mode 100644 openbsd/network.html create mode 100644 openbsd/partitions.html create mode 100644 openbsd/pf.html create mode 100644 openbsd/sources.html diff --git a/dev/c/index.html b/dev/c/index.html index 1622cc1..eaf54a8 100644 --- a/dev/c/index.html +++ b/dev/c/index.html @@ -14,6 +14,7 @@
        • Elements @@ -48,12 +49,7 @@
        • Control Flow
        • Functions
        • Input & Output
        • -
        • Basic - -
        • -
        • Libraries +
        • Libraries
            diff --git a/dev/c/src/basic/Makefile b/dev/c/src/basic/Makefile index f165c15..88f7890 100644 --- a/dev/c/src/basic/Makefile +++ b/dev/c/src/basic/Makefile @@ -1,7 +1,7 @@ CC=gcc CFLAGS=-Wall -basic-c: main.o basic.o +shell: shell.c clean: - rm -f *.o basic-c + rm -f *.o shell diff --git a/dev/c/src/basic/shell.c b/dev/c/src/basic/shell.c new file mode 100644 index 0000000..addc8a7 --- /dev/null +++ b/dev/c/src/basic/shell.c @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +char *getinput(char *buffer, size_t buflen) { + printf("$$ "); + return fgets(buffer, buflen, stdin); +} + +void sig_int(int signo) { + printf("\nCaught SIGINT (Signal #%d)!\n$$ ", signo); + (void)fflush(stdout); +} + +int main(int argc, char **argv) { + char buf[BUFSIZ]; + pid_t pid; + int status; + + /* cast to void to silence compiler warnings */ + (void)argc; + (void)argv; + + if (signal(SIGINT, sig_int) == SIG_ERR) { + fprintf(stderr, "signal error: %s\n", strerror(errno)); + exit(1); + } + + while (getinput(buf, sizeof(buf))) { + buf[strlen(buf) - 1] = '\0'; + + if((pid=fork()) == -1) { + fprintf(stderr, "shell: can't fork: %s\n", + strerror(errno)); + continue; + } else if (pid == 0) { /* child */ + execlp(buf, buf, (char *)0); + fprintf(stderr, "shell: couldn't exec %s: %s\n", buf, + strerror(errno)); + exit(EX_UNAVAILABLE); + } + + /* parent waits */ + if ((pid=waitpid(pid, &status, 0)) < 0) { + fprintf(stderr, "shell: waitpid error: %s\n", + strerror(errno)); + } + } + + exit(EX_OK); +} diff --git a/dev/c/src/fork/Makefile b/dev/c/src/fork/Makefile new file mode 100644 index 0000000..a737794 --- /dev/null +++ b/dev/c/src/fork/Makefile @@ -0,0 +1,11 @@ + +progs=fork fork_exec +all: $(progs) + +fork: fork.c + +fork_exec: fork_exec.c + + +clean: + rm $(progs) diff --git a/dev/c/src/fork/fork.c b/dev/c/src/fork/fork.c new file mode 100644 index 0000000..25e4909 --- /dev/null +++ b/dev/c/src/fork/fork.c @@ -0,0 +1,38 @@ + +#include +#include +#include +#include +#include +#include +#include + +int main(){ + + pid_t cpid,ppid; + char errbuf[1024]; + + cpid = fork(); + if (cpid == -1) { + (void) snprintf(errbuf, sizeof(errbuf), + "fork: %s", strerror(errno)); + printf("%s\n", errbuf); + exit(1); + } + + if (cpid == 0) { + //child + ppid = getppid(); + if(ppid == 1){ + printf("parent died ?\n"); + _exit(1); + } + printf("I'm child with %i, parent %i\n", getpid(), ppid); + _exit(0); + } +/* parent */ + wait(NULL); + printf("Child id: %i\n", cpid); + return 0; +} + diff --git a/dev/c/src/fork/fork_exec.c b/dev/c/src/fork/fork_exec.c new file mode 100644 index 0000000..7f87c84 --- /dev/null +++ b/dev/c/src/fork/fork_exec.c @@ -0,0 +1,40 @@ +#include +#include +#include +#include +#include +#include +#include + +int main(){ + + pid_t cpid,ppid; + char errbuf[1024]; + + char *prog = "vim"; + char *const args[3]= {"vim", "fork_exec.c", NULL}; + + cpid = fork(); + if (cpid == -1) { + (void) snprintf(errbuf, sizeof(errbuf), + "fork: %s", strerror(errno)); + printf("%s\n", errbuf); + exit(1); + } + + if (cpid == 0) { + //child + ppid = getppid(); + if(ppid == 1){ + printf("parent died ?\n"); + _exit(1); + } + execvp(prog, args); + _exit(0); + } +/* parent */ + wait(NULL); + printf("Child id: %i\n", cpid); + return 0; +} + diff --git a/dev/c/src/hello/Makefile b/dev/c/src/hello/Makefile index a6d9f07..2c0ff2d 100644 --- a/dev/c/src/hello/Makefile +++ b/dev/c/src/hello/Makefile @@ -1,7 +1,6 @@ -CC=gcc CFLAGS=-Wall -hello: hello.o +hello: hello.c clean: rm -f *.o hello diff --git a/dev/c/src/hello/hello.c b/dev/c/src/hello/hello.c index df66493..092efa5 100644 --- a/dev/c/src/hello/hello.c +++ b/dev/c/src/hello/hello.c @@ -1,6 +1,10 @@ #include +#include int main() { - printf("hello World!"); + char *name; + name = getlogin(); + + printf("hello %s!\n", name); return 0; } diff --git a/dev/c/src/linux/Makefile b/dev/c/src/linux/Makefile new file mode 100644 index 0000000..e026551 --- /dev/null +++ b/dev/c/src/linux/Makefile @@ -0,0 +1,13 @@ +CC=gcc +CFLAGS=-Wall -static +#LDFLAGS=-lc -lnss_files -lnss_dns -lresolv + +all: init ramdisk + +init: init.c + +ramdisk: + find . | cpio -o -H newc | gzip > rootfs.cpio.gz + +clean: + rm -f *.o init rootfs.cpio.gz diff --git a/dev/c/src/linux/init.c b/dev/c/src/linux/init.c new file mode 100644 index 0000000..10af0be --- /dev/null +++ b/dev/c/src/linux/init.c @@ -0,0 +1,8 @@ +#include +#include + +int main() { + printf("FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR\n"); + sleep(0xFFFFFFFF); + return 0; +} diff --git a/dev/c/src/linux/rungdb.sh b/dev/c/src/linux/rungdb.sh new file mode 100644 index 0000000..9408d7f --- /dev/null +++ b/dev/c/src/linux/rungdb.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +gdb \ + -ex "add-auto-load-safe-path $(pwd)" \ + -ex "file vmlinux" \ + -ex 'set arch i386:x86-64:intel' \ + -ex 'target remote localhost:1234' \ + -ex 'hbreak start_kernel' \ + -ex 'continue' \ + -ex 'disconnect' \ + -ex 'set arch i386:x86-64' \ + -ex 'target remote localhost:1234' diff --git a/dev/c/system.html b/dev/c/system.html index eedf242..d1d6558 100644 --- a/dev/c/system.html +++ b/dev/c/system.html @@ -15,35 +15,87 @@ will run on and GDB will connect to it to help us understand how things tick.

            -

            Kernel Build

            +

            Build Kernel

            -        $ tar xf linux-4.9.48.tar.xz
            -        $ cd linux-4.9.48
            +        $ tar xf linux-4.9.258.tar.xz
            +        $ cd linux-4.9.258
                     

            Default configuration disable some security configurations that allow us to debug (random memory - layout).

            + layout KALSR), CONFIG_COMPAT_BRK don't randomize + position of the programs (randomize_va_space) useful when + debugging a program (tracing). + Configuration flags to enable;

            + +
              +
            • CONFIG_64BIT
            • +
            • CONFIG_DEBUG_KERNEL
            • +
            • CONFIG_HAVE_ARCH_KGDB
            • +
            • CONFIG_FTRACE
            • +
            • CONFIG_PRINTK
            • +
            • CONFIG_BLK_DEV_INITRD
            • +
            • CONFIG_BINFMT_ELF
            • +
            • CONFIG_TTY
            • +
            • CONFIG_DEBUG_INFO
            • +
            • CONFIG_DEBUG_INFO_DWARF4
            • +
            • CONFIG_GDB_SCRIPTS
            • +
            • CONFIG_READABLE_ASM
            • +
            • CONFIG_FRAME_POINTER
            • +
            • CONFIG_KGDB
            • +
            • CONFIG_KGDB_LOW_LEVEL_TRAP
            • +
            • CONFIG_EARLY_PRINTK
            • +
            • CONFIG_COMPAT_BRK
            • +
            + +

            And to disable;

            + +
              +
            • CONFIG_CC_OPTIMIZE_FOR_SIZE
            • +
            + + +

            This changes can be achieved by creating a config-fragment and then + merge it with the configuration.

            -        $ make x86_64_defconfig
            +        $ cat <<EOF >.config-fragment
            +        CONFIG_64BIT=y
            +        CONFIG_DEBUG_KERNEL=y
            +        CONFIG_HAVE_ARCH_KGDB=y
            +        CONFIG_COMPAT_BRK=y
            +        CONFIG_FTRACE=y
            +        CONFIG_PRINTK=y
            +        CONFIG_BLK_DEV_INITRD=y
            +        CONFIG_BINFMT_ELF=y
            +        CONFIG_TTY=y
            +        CONFIG_DEBUG_INFO=y
            +        CONFIG_DEBUG_INFO_DWARF4=y
            +        CONFIG_GDB_SCRIPTS=y
            +        CONFIG_READABLE_ASM=y
            +        CONFIG_FRAME_POINTER=y
            +        CONFIG_KGDB=y
            +        CONFIG_KGDB_LOW_LEVEL_TRAP=y
            +        CONFIG_EARLY_PRINTK=y
            +        CONFIG_CC_OPTIMIZE_FOR_SIZE=n
            +        EOF
                     
            -

            Enable CONFIG_DEBUG_INFO, CONFIG_DEBUG_INFO_DWARF4 - and CONFIG_GDB_SCRIPTS in the kernel;

            +

            Create a tiny config;

            -        make x86_64_defconfig
            -        cat <<EOF >.config-fragment
            -        CONFIG_DEBUG_INFO=y
            -        CONFIG_DEBUG_KERNEL=y
            -        CONFIG_GDB_SCRIPTS=y
            -        EOF
            -        ./scripts/kconfig/merge_config.sh .config .config-fragment
            +        $ make ARCH=x86_64 tinyconfig
                     
            -

            Check or change to your needs the configuration;

            +

            Merge config with the following script;

            + +
            +        $ ./scripts/kconfig/merge_config.sh .config .config-fragment
            +        
            + +

            Check or change the configuration according to your needs;

            +
                     $ make nconfig
                     
            @@ -138,7 +190,7 @@ -ex "file vmlinux" \ -ex 'set arch i386:x86-64:intel' \ -ex 'target remote localhost:1234' \ - -ex 'break start_kernel' \ + -ex 'hbreak start_kernel' \ -ex 'continue' \ -ex 'disconnect' \ -ex 'set arch i386:x86-64' \ @@ -169,6 +221,23 @@ (gdb) +

            lx-symbols allows to debug kernel modules, after starting the vm and loading + the module use lx-symbols to load the symbols from all the modules loaded in + the kernel.

            + +
            +        (gdb) apropos lx
            +        (gdb) lx-symbols
            +        
            + +

            It's useful to set conditional breakpoints or a break point can be trigger + by unrelated tasks, example of a break point on do_exit function but only by + the process with pid 1;

            + +
            +        (gdb) br do_exit if $lx_current()->pid == 1
            +        
            + C Index

            This is part of the LeetIO System Documentation. diff --git a/openbsd/conf/skel/.Xdefaults b/openbsd/conf/skel/.Xdefaults index 8594a7c..2f7b5bc 100644 --- a/openbsd/conf/skel/.Xdefaults +++ b/openbsd/conf/skel/.Xdefaults @@ -1,6 +1,2 @@ ! $OpenBSD: dot.Xdefaults,v 1.3 2014/07/10 10:22:59 jasper Exp $ XTerm*loginShell:true -XTerm*vt100.faceName: terminus:pixelsize=14 -XTerm*vt100.scrollBar: false -*.foreground: #bbbbbb -*.background: #222222 diff --git a/openbsd/conf/skel/.Xresources b/openbsd/conf/skel/.Xresources new file mode 100644 index 0000000..46b58d2 --- /dev/null +++ b/openbsd/conf/skel/.Xresources @@ -0,0 +1,25 @@ +XTerm*faceName:DeJavuMono +XTerm*faceSize:11 +XTerm*allowBoldFonts:false +XTerm*scrollBar:false +XTerm*loginShell:true +XTerm*eightBitInput:false +XTerm*internalBorder:2 +XTerm*foreground:white +XTerm*background:black +XTerm*color0:#2e3436 +XTerm*color8:#888A85 +XTerm*color1:#cc0000 +XTerm*color9:#ef2929 +XTerm*color2:#4e9a06 +XTerm*color10:#8ae234 +XTerm*color3:#edd400 +XTerm*color11:#fce94f +XTerm*color4:#3465a4 +XTerm*color12:#729fcf +XTerm*color5:#92659a +XTerm*color13:#c19fbe +XTerm*color6:#07c7ca +XTerm*color14:#63e9e9 +XTerm*color7:#d3d7cf +XTerm*color15:#eeeeee diff --git a/openbsd/conf/skel/.kshrc b/openbsd/conf/skel/.kshrc index 9c83cd7..7ce4d45 100644 --- a/openbsd/conf/skel/.kshrc +++ b/openbsd/conf/skel/.kshrc @@ -2,4 +2,5 @@ alias glog='git log --stat --decorate'; export glog alias gloga='git log --graph --abbrev-commit --decorate --date=relative --all'; export gloga - +# When dealing with CVS in ports +export CVSROOT="anoncvs@anoncvs.fr.openbsd.org:/cvs" diff --git a/openbsd/conf/skel/.lynx.cfg b/openbsd/conf/skel/.lynx.cfg new file mode 100644 index 0000000..35e51bb --- /dev/null +++ b/openbsd/conf/skel/.lynx.cfg @@ -0,0 +1,5 @@ +#INCLUDE:~./lynx.cfg for COLOR VIEWER KEYMAP STARTFILE DEFAULT_INDEX_FILE +STARTFILE:gopher://localhost +#HELPFILE:https://lynx.invisible-island.net/lynx_help/lynx_help_main.html +#.ex +#DEFAULT_INDEX_FILE:http://scout.wisc.edu/ diff --git a/openbsd/conf/skel/.lynxrc b/openbsd/conf/skel/.lynxrc new file mode 100644 index 0000000..a28eaa1 --- /dev/null +++ b/openbsd/conf/skel/.lynxrc @@ -0,0 +1,333 @@ +# Lynx User Defaults File +# +# This file contains options saved from the Lynx Options Screen (normally +# with the 'o' key). To save options with that screen, you must select the +# checkbox: +# Save options to disk +# +# You must then save the settings using the link on the line above the +# checkbox: +# Accept Changes +# +# You may also use the command-line option "-forms_options", which displays +# the simpler Options Menu instead. Save options with that using the '>' key. +# +# There is normally no need to edit this file manually, since the defaults +# here can be controlled from the Options Screen, and the next time options +# are saved from the Options Screen this file will be completely rewritten. +# You have been warned... +# +# If you are looking for the general configuration file - it is normally +# called "lynx.cfg". It has different content and a different format. +# It is not this file. + +# accept_all_cookies allows the user to tell Lynx to automatically +# accept all cookies if desired. The default is "FALSE" which will +# prompt for each cookie. Set accept_all_cookies to "TRUE" to accept +# all cookies. +accept_all_cookies=off + +# anonftp_password allows the user to tell Lynx to use the personal +# email address as the password for anonymous ftp. If no value is given, +# Lynx will use the personal email address. Set anonftp_password +# to a different value if you choose. +anonftp_password= + +# bookmark_file specifies the name and location of the default bookmark +# file into which the user can paste links for easy access at a later +# date. +bookmark_file=lynx_bookmarks.html + +# If case_sensitive_searching is "on" then when the user invokes a search +# using the 's' or '/' keys, the search performed will be case sensitive +# instead of case INsensitive. The default is usually "off". +case_sensitive_searching=off + +# The character_set definition controls the representation of 8 bit +# characters for your terminal. If 8 bit characters do not show up +# correctly on your screen you may try changing to a different 8 bit +# set or using the 7 bit character approximations. +# Current valid characters sets are: +# Western (ISO-8859-1) +# 7 bit approximations (US-ASCII) +# Western (ISO-8859-15) +# Western (cp850) +# Western (windows-1252) +# IBM PC US codepage (cp437) +# DEC Multinational +# Macintosh (8 bit) +# NeXT character set +# HP Roman8 +# Chinese +# Japanese (EUC-JP) +# Japanese (Shift_JIS) +# Korean +# Taipei (Big5) +# Vietnamese (VISCII) +# Transparent +# Eastern European (ISO-8859-2) +# Eastern European (cp852) +# Eastern European (windows-1250) +# Latin 3 (ISO-8859-3) +# Latin 4 (ISO-8859-4) +# Baltic Rim (ISO-8859-13) +# Baltic Rim (cp775) +# Baltic Rim (windows-1257) +# Cyrillic (ISO-8859-5) +# Cyrillic (cp866) +# Cyrillic (windows-1251) +# Cyrillic (KOI8-R) +# Arabic (ISO-8859-6) +# Arabic (cp864) +# Arabic (windows-1256) +# Celtic (ISO-8859-14) +# Greek (ISO-8859-7) +# Greek (cp737) +# Greek2 (cp869) +# Greek (windows-1253) +# Hebrew (ISO-8859-8) +# Hebrew (cp862) +# Hebrew (windows-1255) +# Turkish (ISO-8859-9) +# Turkish (cp857) +# North European (ISO-8859-10) +# UNICODE (UTF-8) +# RFC 1345 w/o Intro +# RFC 1345 Mnemonic +# Ukrainian Cyrillic (cp866u) +# Ukrainian Cyrillic (KOI8-U) +# Cyrillic-Asian (PT154) +character_set=Western (ISO-8859-1) + +# cookie_accept_domains and cookie_reject_domains are comma-delimited +# lists of domains from which Lynx should automatically accept or reject +# all cookies. If a domain is specified in both options, rejection will +# take precedence. The accept_all_cookies parameter will override any +# settings made here. +cookie_accept_domains= + +# cookie_file specifies the file from which to read persistent cookies. +# The default is ~/.lynx_cookies. +cookie_file= + +# cookie_loose_invalid_domains, cookie_strict_invalid_domains, and +# cookie_query_invalid_domains are comma-delimited lists of which domains +# should be subjected to varying degrees of validity checking. If a +# domain is set to strict checking, strict conformance to RFC2109 will +# be applied. A domain with loose checking will be allowed to set cookies +# with an invalid path or domain attribute. All domains will default to +# querying the user for an invalid path or domain. +cookie_loose_invalid_domains= + +cookie_query_invalid_domains= + +cookie_reject_domains= + +cookie_strict_invalid_domains= + +# If emacs_keys is to "on" then the normal EMACS movement keys: +# ^N = down ^P = up +# ^B = left ^F = right +# will be enabled. +emacs_keys=off + +# file_editor specifies the editor to be invoked when editing local files +# or sending mail. If no editor is specified, then file editing is disabled +# unless it is activated from the command line, and the built-in line editor +# will be used for sending mail. +file_editor=vim + +# The file_sorting_method specifies which value to sort on when viewing +# file lists such as FTP directories. The options are: +# BY_FILENAME -- sorts on the name of the file +# BY_TYPE -- sorts on the type of the file +# BY_SIZE -- sorts on the size of the file +# BY_DATE -- sorts on the date of the file +file_sorting_method=BY_FILENAME + +# If keypad_mode is set to "NUMBERS_AS_ARROWS", then the numbers on +# your keypad when the numlock is on will act as arrow keys: +# 8 = Up Arrow +# 4 = Left Arrow 6 = Right Arrow +# 2 = Down Arrow +# and the corresponding keyboard numbers will act as arrow keys, +# regardless of whether numlock is on. +# If keypad_mode is set to "LINKS_ARE_NUMBERED", then numbers will +# appear next to each link and numbers are used to select links. +# If keypad_mode is set to "LINKS_AND_FORM_FIELDS_ARE_NUMBERED", then +# numbers will appear next to each link and visible form input field. +# Numbers are used to select links, or to move the "current link" to a +# form input field or button. In addition, options in popup menus are +# indexed so that the user may type an option number to select an option in +# a popup menu, even if the option isn't visible on the screen. Reference +# lists and output from the list command also enumerate form inputs. +# NOTE: Some fixed format documents may look disfigured when +# "LINKS_ARE_NUMBERED" or "LINKS_AND_FORM_FIELDS_ARE_NUMBERED" are +# enabled. +keypad_mode=LINKS_ARE_NOT_NUMBERED + +# lineedit_mode specifies the key binding used for inputting strings in +# prompts and forms. If lineedit_mode is set to "Default Binding" then +# the following control characters are used for moving and deleting: +# +# Prev Next Enter = Accept input +# Move char: <- -> ^G = Cancel input +# Move word: ^P ^N ^U = Erase line +# Delete char: ^H ^R ^A = Beginning of line +# Delete word: ^B ^F ^E = End of line +# +# Current lineedit modes are: +# Default Binding +# Alternate Bindings +# Bash-like Bindings +lineedit_mode=Default Binding + +# The following allow you to define sub-bookmark files and descriptions. +# The format is multi_bookmark=, +# Up to 26 bookmark files (for the English capital letters) are allowed. +# We start with "multi_bookmarkB" since 'A' is the default (see above). +multi_bookmarkB= +multi_bookmarkC= +multi_bookmarkD= +multi_bookmarkE= +multi_bookmarkF= +multi_bookmarkG= +multi_bookmarkH= +multi_bookmarkI= +multi_bookmarkJ= +multi_bookmarkK= +multi_bookmarkL= +multi_bookmarkM= +multi_bookmarkN= +multi_bookmarkO= +multi_bookmarkP= +multi_bookmarkQ= +multi_bookmarkR= +multi_bookmarkS= +multi_bookmarkT= +multi_bookmarkU= +multi_bookmarkV= +multi_bookmarkW= +multi_bookmarkX= +multi_bookmarkY= +multi_bookmarkZ= + +# personal_mail_address specifies your personal mail address. The +# address will be sent during HTTP file transfers for authorization and +# logging purposes, and for mailed comments. +# If you do not want this information given out, set the NO_FROM_HEADER +# to TRUE in lynx.cfg, or use the -nofrom command line switch. You also +# could leave this field blank, but then you won't have it included in +# your mailed comments. +personal_mail_address= + +# personal_mail_name specifies your personal name, for mail. The +# name is sent for mailed comments. Lynx will prompt for this, +# showing the configured value as a default when sending mail. +# This is not necessarily the same as a name provided as part of the +# personal_mail_address. +# Lynx does not save your changes to that default value as a side-effect +# of sending email. To update the default value, you must use the options +# menu, or modify this file directly. +personal_mail_name= + +# preferred_charset specifies the character set in MIME notation (e.g., +# ISO-8859-2, ISO-8859-5) which Lynx will indicate you prefer in requests +# to http servers using an Accept-Charset header. The value should NOT +# include ISO-8859-1 or US-ASCII, since those values are always assumed +# by default. May be a comma-separated list. +# If a file in that character set is available, the server will send it. +# If no Accept-Charset header is present, the default is that any +# character set is acceptable. If an Accept-Charset header is present, +# and if the server cannot send a response which is acceptable +# according to the Accept-Charset header, then the server SHOULD send +# an error response, though the sending of an unacceptable response +# is also allowed. +preferred_charset= + +# preferred_language specifies the language in MIME notation (e.g., en, +# fr, may be a comma-separated list in decreasing preference) +# which Lynx will indicate you prefer in requests to http servers. +# If a file in that language is available, the server will send it. +# Otherwise, the server will send the file in its default language. +preferred_language=en + +# select_popups specifies whether the OPTIONs in a SELECT block which +# lacks a MULTIPLE attribute are presented as a vertical list of radio +# buttons or via a popup menu. Note that if the MULTIPLE attribute is +# present in the SELECT start tag, Lynx always will create a vertical list +# of checkboxes for the OPTIONs. A value of "on" will set popup menus +# as the default while a value of "off" will set use of radio boxes. +# The default can be overridden via the -popup command line toggle. +select_popups=on + +# show_color specifies how to set the color mode at startup. A value of +# "never" will force color mode off (treat the terminal as monochrome) +# at startup even if the terminal appears to be color capable. A value of +# "always" will force color mode on even if the terminal appears to be +# monochrome, if this is supported by the library used to build lynx. +# A value of "default" will yield the behavior of assuming +# a monochrome terminal unless color capability is inferred at startup +# based on the terminal type, or the -color command line switch is used, or +# the COLORTERM environment variable is set. The default behavior always is +# used in anonymous accounts or if the "option_save" restriction is set. +# The effect of the saved value can be overridden via +# the -color and -nocolor command line switches. +# The mode set at startup can be changed via the "show color" option in +# the 'o'ptions menu. If the option settings are saved, the "on" and +# "off" "show color" settings will be treated as "default". +show_color=default + +# show_cursor specifies whether to 'hide' the cursor to the right (and +# bottom, if possible) of the screen, or to place it to the left of the +# current link in documents, or current option in select popup windows. +# Positioning the cursor to the left of the current link or option is +# helpful for speech or braille interfaces, and when the terminal is +# one which does not distinguish the current link based on highlighting +# or color. A value of "on" will set positioning to the left as the +# default while a value of "off" will set 'hiding' of the cursor. +# The default can be overridden via the -show_cursor command line toggle. +show_cursor=off + +# show_dotfiles specifies that the directory listing should include +# "hidden" (dot) files/directories. If set "on", this will be +# honored only if enabled via userdefs.h and/or lynx.cfg, and not +# restricted via a command line switch. If display of hidden files +# is disabled, creation of such files via Lynx also is disabled. +show_dotfiles=off + +# If sub_bookmarks is not turned "off", and multiple bookmarks have +# been defined (see below), then all bookmark operations will first +# prompt the user to select an active sub-bookmark file. If the default +# Lynx bookmark_file is defined (see above), it will be used as the +# default selection. When this option is set to "advanced", and the +# user mode is advanced, the 'v'iew bookmark command will invoke a +# statusline prompt instead of the menu seen in novice and intermediate +# user modes. When this option is set to "standard", the menu will be +# presented regardless of user mode. +sub_bookmarks=OFF + +# user_mode specifies the users level of knowledge with Lynx. The +# default is "NOVICE" which displays two extra lines of help at the +# bottom of the screen to aid the user in learning the basic Lynx +# commands. Set user_mode to "INTERMEDIATE" to turn off the extra info. +# Use "ADVANCED" to see the URL of the currently selected link at the +# bottom of the screen. +user_mode=NOVICE + +# If verbose_images is "on", lynx will print the name of the image +# source file in place of [INLINE], [LINK] or [IMAGE] +# See also VERBOSE_IMAGES in lynx.cfg +verbose_images=on + +# If vi_keys is set to "on", then the normal VI movement keys: +# j = down k = up +# h = left l = right +# will be enabled. These keys are only lower case. +# Capital 'H', 'J' and 'K will still activate help, jump shortcuts, +# and the keymap display, respectively. +vi_keys=on + +# The visited_links setting controls how Lynx organizes the information +# in the Visited Links Page. +visited_links=LAST_REVERSED diff --git a/openbsd/index.html b/openbsd/index.html index 8b13789..f220b01 100644 --- a/openbsd/index.html +++ b/openbsd/index.html @@ -1 +1,37 @@ + + + + + OpenBSD + + + Documentation Index + +

            OpenBSD

            + +

            OpenBSD is a Unix system forked from NetBSD with the highest coding standards, as such there is no space for deprecated code, code is constantly audited, and, all the procedures that goes along with high software quality project such as documentation.

            + +

            1. Install notes

            + + +

            2. System administration

            + + Documentation Index + +

            + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. + See the file Gnu Free Documentation License + for copying conditions.

            + + + diff --git a/openbsd/install.html b/openbsd/install.html new file mode 100644 index 0000000..eb6ec78 --- /dev/null +++ b/openbsd/install.html @@ -0,0 +1,124 @@ + + + + + 1.1. Install OpenBSD notes + + + + OpenBSD Index + +

            1.1. Install OpenBSD notes

            + + +

            OpenBSD bsd.rd is ram file system meant for installation or recovery procedures;

            + +
            +        # mount -o loop /srv/qemu/iso/install68.iso /media/
            +        # cp /media/6.8/amd64/bsd.rd /boot
            +        
            + +

            Reboot machine and press c on grub menu, and set partition root, kernel location and boot, example;

            + +
            +        grub> set root=(hd0,gpt3)
            +        grub> kopenbsd /bsd.rd
            +        grub> boot
            +        
            + +

            Press enter and follow the instructions, OpenBSD installation is known to be one of the most easy of all operating systems. Read OpenBSD documentation.

            + +

            Don't enable xenodm, enable after install and post install procedures.

            + +

            Don't skip network configuration, it will need to fetch updates and synchronize clock.

            + +

            Don't skip user creation, will be default administrator

            + +

            When formatting the disk select auto and then resize of auto created partitions that shrink the last one (home). After install it will run syspatch and fw_update.

            + +

            Post-Install

            + +

            After install reboot, by default it will run syspatch and fw_updateo to check and install updates.

            + +

            Install your favorite tools, example of a minimal setup;

            + +
            +        # pkg_add vim git lynx irssi
            +        # pkg_add xsel spectrwm
            +        
            + +

            User created during install is part of wheel group by default, copy /etc/example/doas.conf to /etc/ to enable doas command;

            + +
            +        # cp /etc/examples/doas.conf /etc/
            +        
            + +

            Copy skeleton files;

            + +
            +        # cp -r ~/doc/openbsd/conf/skel /etc/skel
            +        
            + +

            Add regular user not part of wheel group

            + +
            +        # useradd -m user_name
            +        
            + +

            X

            + +
            +        ~/.Xresources
            +        XTerm*faceName:DeJavuMono
            +        XTerm*faceSize:11
            +        XTerm*allowBoldFonts:false
            +        XTerm*scrollBar:false
            +        XTerm*loginShell:true
            +        XTerm*eightBitInput:false
            +        XTerm*internalBorder:2
            +        XTerm*foreground:white
            +        XTerm*background:black
            +        XTerm*color0:#2e3436
            +        XTerm*color8:#888A85
            +        XTerm*color1:#cc0000
            +        XTerm*color9:#ef2929
            +        XTerm*color2:#4e9a06
            +        XTerm*color10:#8ae234
            +        XTerm*color3:#edd400
            +        XTerm*color11:#fce94f
            +        XTerm*color4:#3465a4
            +        XTerm*color12:#729fcf
            +        XTerm*color5:#92659a
            +        XTerm*color13:#c19fbe
            +        XTerm*color6:#07c7ca
            +        XTerm*color14:#63e9e9
            +        XTerm*color7:#d3d7cf
            +        XTerm*color15:#eeeeee
            +        
            + +
            +        ~/.xsession
            +        export ENV=$HOME/.kshrc
            +        xrdb -merge "$HOME/.Xresources"
            +        spectrwm
            +        
            + +

            Mouse tap

            + +
            +        libernaut# wsconsctl mouse.tp.tapping=1
            +        mouse.tp.tapping -> 1
            +        libernaut# cat /etc/wsconsctl.conf
            +        mouse.tp.tapping=1
            +        libernaut#
            +        
            + + OpenBSD Index +

            This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. + See the file Gnu Free Documentation License + for copying conditions.

            + + + diff --git a/openbsd/network.html b/openbsd/network.html new file mode 100644 index 0000000..446f112 --- /dev/null +++ b/openbsd/network.html @@ -0,0 +1,25 @@ + + + + + 2.0. Network + + + + OpenBSD Index + +

            2.0. Network

            + +
            +        # ifconfig iwn0 nwid ID wpakey pass
            +        
            + + OpenBSD Index +

            This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. + See the file Gnu Free Documentation License + for copying conditions.

            + + + diff --git a/openbsd/partitions.html b/openbsd/partitions.html new file mode 100644 index 0000000..ac78cea --- /dev/null +++ b/openbsd/partitions.html @@ -0,0 +1,27 @@ + + + + + 1.2. Partitions + + + OpenBSD Index + +

            Partitions

            + +
            +        fdisk
            +        dislabel
            +        newfs
            +        sysctl hw.disknames
            +        
            + + OpenBSD Index +

            This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. + See the file Gnu Free Documentation License + for copying conditions.

            + + + diff --git a/openbsd/pf.html b/openbsd/pf.html new file mode 100644 index 0000000..88ec76a --- /dev/null +++ b/openbsd/pf.html @@ -0,0 +1,151 @@ + + + + + 1.1. Install OpenBSD notes + + + + OpenBSD Index + +

            1.1. Install OpenBSD notes

            + +

            Quick introduction to Packet Filter

            + +

            Packet filter

            + +

            Packet filter or pf is the system that controls the flow of packets, read more about it on OpenBSD faq and it's man page.

            + +

            As a service can be enable or disable with rcctl or by pfctl program. PF uses /etc/pf.conf as it's main configuration file, after boot can load more rules from other files if needed.

            + + +

            Configuration

            + +

            To setup a simple firewall edit /etc/pf.conf, default comes with very simple rules;

            + +
            +        # $OpenBSD: pf.conf,v 1.55 2017/12/03 20:40:04 sthen Exp $
            +        #
            +        # See pf.conf(5) and /etc/examples/pf.conf
            +
            +        set skip on lo
            +
            +        block return	# block stateless traffic
            +        pass		# establish keep-state
            +
            +        # By default, do not permit remote connections to X11
            +        block return in on ! lo0 proto tcp to port 6000:6010
            +
            +        # Port build user does not need network
            +        block return out log proto {tcp udp} user _pbuild
            +        
            + +

            This configuration allows incoming connections and outgoing connections except for was is commented such as X11 or user that port system runs under when building.

            + +

            Control

            + +

            After boot PF operation can be managed using pfctl;

            + +
            +        pfctl -f  /etc/pf.conf    Load the pf.conf file
            +        pfctl -nf /etc/pf.conf    Parse the file, but don't load it
            +        pfctl -sr                 Show the current ruleset
            +        pfctl -ss                 Show the current state table
            +        pfctl -si                 Show filter stats and counters
            +        pfctl -sa                 Show EVERYTHING it can show
            +        
            + +

            Logs

            + +

            Documentation tells that when logging a packet a copy of it's header is sent to pflog interface with additional data such as the interface, action pf took, etc.

            + +

            pflog interface allows user space applications to receive this data from the kernel. At boot when pf is enabled pflogd is also started and by default listens on pflog0 and writes to /var/log/pflog file.

            + +

            To read log file;

            + +
            +        # tcpdum -n -e -ttt -r /var/log/pflog
            +        
            + +

            To read log in real time;

            + +
            +        # tcpdump -n -e -ttt -i pflog0
            +        
            + + +

            Simple firewall

            + +

            Simplified syntax for filter rules is;

            + +
            +        action [direction] [log] [quick] [on interface] [af]
            +        [proto protocol] [from src_addr [port src_port]]
            +        [to dst_addr [port dst_port]] [flags tcp_flags] [state]
            +        
            + +

            Start changing default configuration by setting "default policy to deny" and to log all packets. Change configuration file to contain first filter rule;

            + +
            +        int_if  = "re0"
            +        lan_net = "10.0.0.0/24"
            +
            +        set skip on lo
            +
            +        # scrub incoming packets
            +        match in all scrub (no-df)
            +
            +        set block-policy drop # block silenty 
            +        block drop log all    # block and log everything
            +
            +        # activate spoofing protection for all interfaces
            +        block in quick from urpf-failed
            +
            +        # allow out dns
            +        pass out on $int_if proto udp to 10.0.0.254 port domain
            +
            +        # allow out ntp
            +        pass out on $int_if proto udp to any port ntp
            +
            +        # allow out https
            +        pass out on $int_if proto tcp to any port 443
            +
            +        # allow out ssh
            +        pass out on $int_if proto tcp to any port { 22, 2222 }
            +
            +        # allow in ssh
            +        pass in log on $int_if proto tcp from any to 10.0.0.10 port 22
            +
            +        # do not permit remote connections to X11
            +        block in on ! lo0 proto tcp to port 6000:6010
            +
            +        # port build user does not need network
            +        block out log proto {tcp udp} user _pbuild    
            +        
            + +

            To reload configuration file;

            + +
            +        # pfctl -f /etc/pf.conf
            +        
            + +

            See what ports are open;

            + +
            +        # netstat -na -f inet | grep LISTEN
            +        
            + +

            Check rules;

            + +
            +        # pfctl -sr
            +        
            + + OpenBSD Index +

            This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. + See the file Gnu Free Documentation License + for copying conditions.

            + + diff --git a/openbsd/sources.html b/openbsd/sources.html new file mode 100644 index 0000000..019044d --- /dev/null +++ b/openbsd/sources.html @@ -0,0 +1,79 @@ + + + + + 2.1. Sources + + + + OpenBSD Index + +

            2.1. Sources

            + +

            Allows to fetch sources;

            + +
            +        # usermod -G wsrc exampleuser
            +        
            + +

            Allows to build from ports;

            + +
            +        # usermod -G wobj exampleuser
            +        
            + +

            Create directory xenocara and ports

            + +
            +        cd /usr
            +        mkdir -p   xenocara ports
            +        chgrp wsrc xenocara ports
            +        chmod 775  xenocara ports
            +        
            + +

            Group wobj should have rwx

            + +
            +        /usr/obj
            +        
            + +

            Get sources

            + +
            +        ftp https://cdn.openbsd.org/pub/OpenBSD/$(uname -r)/{ports.tar.gz,SHA256.sig}
            +
            +signify -Cp /etc/signify/openbsd-$(uname -r | cut -c 1,3)-base.pub -x SHA256.sig ports.tar.gz
            +        
            + +
            +        $ cd /usr/src
            +        $ tar xzf ~/src.tar.gz
            +        $ tar xzf ~/sys.tar.gz
            +        $ cd /usr
            +        $ tar xzf ~/ports.tar.gz
            +        $ cd /usr/xenocara
            +        $ tar xzf ~/xenocara.tar.gz
            +        
            + + +
            +        echo 'export CVSROOT="anoncvs@anoncvs.fr.openbsd.org:/cvs"' >> .kshrc
            +        $ cd /usr/ports
            +        $ cvs -d anoncvs@anoncvs.fr.openbsd.org:/cvs -q up -Pd -rOPENBSD_6_8
            +        
            + +

            Repeat above to the other sources, to update the ports tree later:

            + +
            +        $ cd /usr/ports
            +        $ cvs -q up -Pd -rOPENBSD_6_8
            +        
            + + OpenBSD Index +

            This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. + See the file Gnu Free Documentation License + for copying conditions.

            + + diff --git a/tools/index.html b/tools/index.html index 991a1b5..dd73571 100644 --- a/tools/index.html +++ b/tools/index.html @@ -97,6 +97,7 @@
          • 6. Logs
        • +
        • Nginx
        • Gitolite
          • 1. Install Gitolite
          • diff --git a/tools/qemu.html b/tools/qemu.html index 04c367d..44f48ae 100644 --- a/tools/qemu.html +++ b/tools/qemu.html @@ -43,7 +43,7 @@ this describes how to create a qcow2 type;

            -        $ qemu-img create -f qcow2 crux-img.qcow2 15G
            +        $ qemu-img create -f qcow2 crux-img.qcow2 20G
                     

            2.1. Mount images

            @@ -68,19 +68,15 @@ unit mib \ mkpart primary 2 4 \ name 1 grub \ - mkpart ESP fat32 4 128 \ + mkpart ESP fat32 4 132 \ name 2 efi \ - mkpart primary ext4 128 1128 \ + mkpart primary ext4 132 1132 \ name 3 boot \ - mkpart primary ext4 1128 12128 \ - name 4 root \ - mkpart primary ext4 12128 14128 \ - name 5 var \ - mkpart primary ext4 14128 100% \ - name 6 lvm \ + mkpart primary 1132 100% \ + name 4 lvm \ set 1 bios_grub on \ set 2 boot on \ - set 6 lvm on + set 4 lvm on
            @@ -89,12 +85,20 @@
             
                     

            Use /dev/mapper/$(name_of_device) to assign correct blocks;

            +
            +	pvcreate           /dev/mapper/${DEV_NAME}p4
            +        vgcreate vg_system /dev/mapper/${DEV_NAME}p4
            +        lvcreate -L 15G -n lv_root vg_system
            +        lvcreate -L 2G -n lv_var vg_system
            +        lvcreate -l 100%FREE -n lv_home vg_system
            +        
            +
             	mkfs.fat -F 32  /dev/mapper/${DEV_NAME}p2
             	mkfs.ext4       /dev/mapper/${DEV_NAME}p3
            -	mkfs.ext4       /dev/mapper/${DEV_NAME}p4
            -	mkfs.ext4       /dev/mapper/${DEV_NAME}p5
            -	pvcreate        /dev/mapper/${DEV_NAME}p6
            +	mkfs.ext4       /dev/vg_system/lv_root
            +	mkfs.ext4       /dev/vg_system/lv_var
            +	mkfs.ext4       /dev/vg_system/lv_home
                     

            Read lvm documentation on how to setup @@ -103,7 +107,7 @@

            Mount partition;

            -	mount /dev/mapper/${DEV_NAME}p4 $CHROOT
            +	mount /dev/vg_system/
             	mkdir -p $CHROOT/proc
             	mkdir -p $CHROOT/sys
             	mkdir -p $CHROOT/dev
            diff --git a/tools/tar.html b/tools/tar.html
            index 32fe945..02c7c73 100644
            --- a/tools/tar.html
            +++ b/tools/tar.html
            @@ -15,7 +15,7 @@
                     

            To create a simple compressed tar;

            -        $ tar -czvf tar_name.tar.gz /path/to/archive
            +        $ tar -czpvf tar_name.tar.gz /path/to/archive
                     

            Script -- cgit 1.4.1-2-gfad0