diff options
-rw-r--r-- | retiolum/scripts/tinc_setup/README.md (renamed from retiolum/scripts/tinc_setup/README) | 0 | ||||
-rwxr-xr-x | retiolum/scripts/tinc_setup/build_arch.sh | 14 | ||||
-rwxr-xr-x | retiolum/scripts/tinc_setup/build_debian.sh | 32 | ||||
-rwxr-xr-x | retiolum/scripts/tinc_setup/build_debian_clean.sh | 31 | ||||
-rwxr-xr-x | retiolum/scripts/tinc_setup/build_ec2.sh | 16 | ||||
-rw-r--r-- | retiolum/scripts/tinc_setup/build_no.de.sh | 1 | ||||
-rwxr-xr-x | retiolum/scripts/tinc_setup/install.sh | 84 | ||||
-rw-r--r-- | ship/lib/vim | 37 | ||||
-rw-r--r-- | ship/src/vim_sane_defaults | 11 |
9 files changed, 48 insertions, 178 deletions
diff --git a/retiolum/scripts/tinc_setup/README b/retiolum/scripts/tinc_setup/README.md index 11d6f6e9..11d6f6e9 100644 --- a/retiolum/scripts/tinc_setup/README +++ b/retiolum/scripts/tinc_setup/README.md diff --git a/retiolum/scripts/tinc_setup/build_arch.sh b/retiolum/scripts/tinc_setup/build_arch.sh deleted file mode 100755 index 5ef5d765..00000000 --- a/retiolum/scripts/tinc_setup/build_arch.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -e -sudo pacman -S openssl gcc lzo -curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz -cd tinc-1.0.13 -./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var -make -sudo make install -cd .. - -echo "overwriting python to python2" -sed 's/\/usr\/bin\/python/\/usr\/bin\/python2/g' install.sh >install2.sh -mv install2.sh install.sh - diff --git a/retiolum/scripts/tinc_setup/build_debian.sh b/retiolum/scripts/tinc_setup/build_debian.sh deleted file mode 100755 index 52e61390..00000000 --- a/retiolum/scripts/tinc_setup/build_debian.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -set -x -if [ ! "$MYIP" ] -then - MYIP=10.0.7.7.55 -fi -if [ ! "$MYHOSTNAME" ] -then - MYHOSTNAME="penis" -fi - -if [ "$MYHOSTNAME" = "penis" ]; -then - read -n1 -p "name is penis, are u sure? [yN]" - if [[ "$REPLY" != [yY] ]] - then - echo "then better RTFC" - echo "bailing out" - exit 0 - fi -fi -apt-get install tinc git curl python - -./install.sh "$MYHOSTNAME" "$MYIP" - -# for autostart -sed -i '/retiolum/d' /etc/tinc/nets.boot -echo "retiolum" >> /etc/tinc/nets.boot -sed -i '/EXTRA/d' /etc/tinc/nets.boot -echo "EXTRA=\"\"" >> /etc/default/tinc - -/etc/init.d/tinc start diff --git a/retiolum/scripts/tinc_setup/build_debian_clean.sh b/retiolum/scripts/tinc_setup/build_debian_clean.sh deleted file mode 100755 index a7332f4e..00000000 --- a/retiolum/scripts/tinc_setup/build_debian_clean.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -set -xe -MYIP=10.0.7.7.55 - -apt-get install tinc git curl gcc gcc-dev build-essential libssl-dev python - -git clone https://github.com/makefu/shack-retiolum.git - -mkdir build -cd build -curl http://www.oberhumer.com/opensource/lzo/download/lzo-2.04.tar.gz | tar -xz -cd lzo-2.04 -./configure --prefix=/usr -make -sudo make install -cd .. -curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz -cd tinc-1.0.13 -./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var -make -sudo make install -cd ../.. - -cd shack-retiolum -./install.sh `hostname` $MYIP - -rm shack-retiolum -# for autostart -echo "retiolum" >> /etc/tinc/nets.boot -echo "EXTRA=\"--user=tincd --chroot\"" >> /etc/default/tinc diff --git a/retiolum/scripts/tinc_setup/build_ec2.sh b/retiolum/scripts/tinc_setup/build_ec2.sh deleted file mode 100755 index 79f2af28..00000000 --- a/retiolum/scripts/tinc_setup/build_ec2.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -set -e -sudo yum install -y gcc openssl-devel -mkdir build -cd build -curl http://www.oberhumer.com/opensource/lzo/download/lzo-2.04.tar.gz | tar xz -cd lzo-2.04 -./configure --prefix=/usr -make -sudo make install -cd .. -curl http://www.tinc-vpn.org/packages/tinc-1.0.13.tar.gz | tar xz -cd tinc-1.0.13 -./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var -make -sudo make install diff --git a/retiolum/scripts/tinc_setup/build_no.de.sh b/retiolum/scripts/tinc_setup/build_no.de.sh deleted file mode 100644 index 2976d3a2..00000000 --- a/retiolum/scripts/tinc_setup/build_no.de.sh +++ /dev/null @@ -1 +0,0 @@ -pkgin in lzo gcc-tools gcc-compiler gcc34 diff --git a/retiolum/scripts/tinc_setup/install.sh b/retiolum/scripts/tinc_setup/install.sh deleted file mode 100755 index 9efe863c..00000000 --- a/retiolum/scripts/tinc_setup/install.sh +++ /dev/null @@ -1,84 +0,0 @@ -#! /bin/sh -# USE WITH GREAT CAUTION -set -eu - -if test "${nosudo-false}" != true -a `id -u` != 0; then - echo "we're going sudo..." >&2 - exec sudo "$0" "$@" - exit 23 # go to hell -fi - -#make -C ../../ update -set -e -DIRNAME=`dirname $0` -CURR=`readlink -f ${DIRNAME}` -MYBIN=${CURR}/../../bin -netname=retiolum -# create configuration directory for $netname -mkdir -p /etc/tinc/$netname/hosts -cd /etc/tinc/$netname - -echo "added known hosts:" -ls -1 hosts | LC_ALL=C sort -echo "delete the nodes you do not trust!" - -hostname="${HOSTNAME-`cat /etc/hostname`}" -myname="${1:-}" -if [ ! "$myname" ] -then - printf "select node name [$hostname]: " - read myname - if test -z "$myname"; then - myname="$hostname" - fi -fi -if [ ! -e "hosts/$myname" ] -then - - # TODO eloop until we found a free IPv4 - # myipv4=$(echo 42.$(for i in `seq 1 3`; do echo "ibase=16;`bin/fillxx xx|tr [a-f] [A-F]`" | bc; done)|tr \ .)/32 - - myipv4="${2:-}" - mynet4=10.243.0.0 - - if [ ! "$myipv4" ] - then - printf 'select v4 subnet ip (1-255): ' - read v4num - until $MYBIN/check-free-retiolum-v4 10.243.0.$v4num; do - echo "your're an idiot!" - printf 'select unused v4 subnet ip (1-255): ' - read v4num - done - myipv4="10.243.0.$v4num" - fi - echo "Subnet = $myipv4" > hosts/$myname - - myipv6=`$MYBIN/fillxx 42:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx`/128 - echo "Subnet = $myipv6" >> hosts/$myname -else - echo "own host file already exists! will not write again!" -fi - -cat>tinc.conf<<EOF -Name = $myname -ConnectTo = euer -ConnectTo = albi10 -ConnectTo = pigstarter -ConnectTo = slowpoke -Device = /dev/net/tun -EOF - -if [ ! -e rsa_key.priv ] -then - echo "creating new keys" - tincd -n $netname -K - $MYBIN/announce_pubkey $myname || \ - echo "cannot write public key to IRC, you are on your own. Good Luck" -else - echo "key files already exist, skipping" - echo "if you know what you are doing, remove rsa_key.priv" -fi -# add user tincd -# this is what the setup scripts for the distribution has to do -#useradd tincd diff --git a/ship/lib/vim b/ship/lib/vim new file mode 100644 index 00000000..de1ec5b0 --- /dev/null +++ b/ship/lib/vim @@ -0,0 +1,37 @@ +# configure vim + +vimrc=$HOME/.vimrc + +vim_conf_sane_defaults(){ + cat >>$vimrc<<EOF +set nocompatible +filetype plugin indent on +syntax on +set vb +set foldenable +set foldmethod=syntax +set ignorecase +set incsearch +set showmatch +set matchtime=3 +set hlsearch +set backupdir=~/.vim/backup +set directory=~/.vim/backup +inoremap <F1> <ESC> +nnoremap <F1> <ESC> +vnoremap <F1> <ESC> +set wildignore=*.o,*.obj,*.bak,*.exe,*.os +colorscheme darkblue +set background=dark +set number +set mouse= +set shiftwidth=2 +set tabstop=2 +set et +set sw=2 +set smarttab +set autoindent +set backspace=indent,eol,start +set nocp +EOF +} diff --git a/ship/src/vim_sane_defaults b/ship/src/vim_sane_defaults new file mode 100644 index 00000000..eb8c4c5d --- /dev/null +++ b/ship/src/vim_sane_defaults @@ -0,0 +1,11 @@ +#!/bin/sh +#@strict +#@include core +#@include vim +#@punani +#@mainifyme +info "installing punani" +punani install vim +touch $vimrc +info "configuring vim" +vim_conf_sane_defaults |