From 406bd43f4ae60a0c6153a823a8b33d087ed7c754 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 30 Mar 2018 14:27:22 +0200 Subject: [PATCH] Remove some very outdated / ununused scripts --- add-new-package | 3 - add.wddb-to-fsdb | 80 ----------------------- add_usb_storage | 3 - attach | 153 -------------------------------------------- backup.to.eiche | 10 --- backup_to_eiche.nfs | 18 ------ bootstrap | 4 -- bright-max | 3 - buch_start.sh | 30 --------- buch_stop.sh | 2 - build-autoconf.sh | 13 ---- ceph_create_osd.sh | 38 ----------- change.old.new | 9 --- clear-link-dirs | 29 --------- compile.package | 14 ---- 15 files changed, 409 deletions(-) delete mode 100644 add-new-package delete mode 100755 add.wddb-to-fsdb delete mode 100644 add_usb_storage delete mode 100755 attach delete mode 100755 backup.to.eiche delete mode 100644 backup_to_eiche.nfs delete mode 100644 bootstrap delete mode 100755 bright-max delete mode 100755 buch_start.sh delete mode 100755 buch_stop.sh delete mode 100755 build-autoconf.sh delete mode 100644 ceph_create_osd.sh delete mode 100755 change.old.new delete mode 100644 clear-link-dirs delete mode 100644 compile.package diff --git a/add-new-package b/add-new-package deleted file mode 100644 index b8c4fcc..0000000 --- a/add-new-package +++ /dev/null @@ -1,3 +0,0 @@ -/root/scripts/add-links "$1" -/root/scripts/rekursivperms "$1" -chown -R .util "$1" diff --git a/add.wddb-to-fsdb b/add.wddb-to-fsdb deleted file mode 100755 index ce8a5f5..0000000 --- a/add.wddb-to-fsdb +++ /dev/null @@ -1,80 +0,0 @@ -BASEDIR=/home/server/www/org/wddb/www/ -tmp=/tmp/wddb-$$ - -function report() -{ - # sender - UFLINE - - # return path - RPLINE - - # we - RECIPIENT - - # delivered to.. - DTLINE - # set -} - -function init() -{ - cat > $tmp - - -} - -# continent -continent=`grep "^continent" "$1" | sed 's/.*="\(.*\)"/\1/'` - -case "$continent" in - africa|asia|australia|europe|northamerica|southamerica) ;; - *) report "Allowed continents: africa|asia|australia|europe|northamerica|southamerica" ;; -esac - -# other vars -essid=`grep "^essid" "$1" | sed 's/.*="\(.*\)"/\1/'` - -# remove possible dots -country=`grep "^country" "$1" | sed 's/.*="\(.*\)"/\1/' | sed 's/\.\.//g'` -area=`grep "^area" "$1" | sed 's/.*="\(.*\)"/\1/' | sed 's/\//-/g' | sed 's/ //c'` -mac=`grep "^mac" "$1" | sed 's/.*="\(.*\)"/\1/'` -rate=`grep "^rate" "$1" | sed 's/.*="\(.*\)"/\1/'` -wep=`grep "^wep" "$1" | sed 's/.*="\(.*\)"/\1/'` -hints=`grep "^hints" "$1" | sed 's/.*="\(.*\)"/\1/'` -location=`grep "^location" "$1" | sed 's/.*="\(.*\)"/\1/'` - -# check for empty fields -for a in essid country area mac rate wep hints location; do - eval tmp="\$$a" - if [ -z "$tmp" ]; then - report "Empty field: $a" - fi -done - -if [ ! -f $BASEDIR/$continent/$country/$area.html ]; then - cat << EOF > "$1" - - - wddb.org - WarDriver's DataBase - - - - - -else - lines=`cat "$BASEDIR/$continent/$country/$area.html" | wc |awk '{ print $1 }'` - use_lines=$[$lines-7] - head -n $use_lines "$BASEDIR/$continent/$country/$area.html" > "$1" - -fi - -cat << EOF >> "$1" - -
- << One step back -

Submit new network or changes - - - -EOF diff --git a/add_usb_storage b/add_usb_storage deleted file mode 100644 index 4f64f02..0000000 --- a/add_usb_storage +++ /dev/null @@ -1,3 +0,0 @@ -modprobe usb-storage -modprobe ohci-hcd -modprobe sd_mod diff --git a/attach b/attach deleted file mode 100755 index 3f101b2..0000000 --- a/attach +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/perl -wT -# -# TWiki Collaboration Platform, http://TWiki.org/ -# -# Copyright (C) 1999-2003 Peter Thoeny, peter@thoeny.com -# -# For licensing info read license.txt file in the TWiki root. -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details, published at -# http://www.gnu.org/copyleft/gpl.html - -# Set library paths in @INC, at compile time -BEGIN { unshift @INC, '.'; require 'setlib.cfg'; } - -use CGI::Carp qw( fatalsToBrowser ); -use CGI; -use TWiki; - -use strict; - -#open(STDERR,'>&STDOUT'); # redirect error to browser -$| = 1; # no buffering - -&main(); - - -# ========================= -sub listVersions -{ - my( $web, $topic, $attachment ) = @_; - - my $latestRev = TWiki::Store::getRevisionNumber( $web, $topic, $attachment ); - $latestRev =~ /\.(.*)/; - my $maxRevNum = $1; - - my $found = 0; - - my $result = "\n| *Version:* | *Action:* | *Date:* | *Who:* | *Comment:* |\n"; - - for( my $version = $maxRevNum; $version >= 1; $version-- ) { - - my $rev = "1.$version"; - - my( $date, $userName, $dummy, $comment ) = - TWiki::Store::getRevisionInfo( $web, $topic, $rev, "TWiki date", $attachment ); - my $wikiUserName = &TWiki::userToWikiName( $userName ); - - my $viewAction = "view"; - $result .= "| 1.$version | $viewAction | $date | $wikiUserName | $comment |\n"; - } - - $result = "$result"; - return $result; -} - - -# ========================= -sub main -{ - my $query = new CGI; - my $thePathInfo = $query->path_info(); - my $theRemoteUser = $query->remote_user(); - my $theTopic = $query->param( 'topic' ); - my $theUrl = $query->url; - - my( $topic, $webName, $dummy, $userName ) = - &TWiki::initialize( $thePathInfo, $theRemoteUser, $theTopic, $theUrl, $query ); - $dummy = ""; # to suppress warning - - my $tmpl = ""; - my $text = ""; - my $meta = ""; - my $atext = ""; - my $fileName = ""; - my $fileUser = ""; - my $wikiUserName = &TWiki::userToWikiName( $userName ); - - my $isHideChecked = ""; - - if( ! &TWiki::Store::webExists( $webName ) ) { - my $url = &TWiki::getOopsUrl( $webName, $topic, "oopsnoweb" ); - TWiki::redirect( $query, $url ); - return; - } - - my( $mirrorSiteName, $mirrorViewURL ) = &TWiki::readOnlyMirrorWeb( $webName ); - if( $mirrorSiteName ) { - my $url = &TWiki::getOopsUrl( $webName, $topic, "oopsmirror", $mirrorSiteName, $mirrorViewURL ); - TWiki::redirect( $query, $url ); - return; - } - - # check access permission - if( ! &TWiki::Access::checkAccessPermission( "change", $wikiUserName, "", $topic, $webName ) ) { - my $url = &TWiki::getOopsUrl( $webName, $topic, "oopsaccesschange" ); - TWiki::redirect( $query, $url ); - return; - } - - $fileName = $query->param( 'filename' ) || ""; - - if( &TWiki::Store::topicExists( $webName, $topic ) ) { - ( $meta, $text ) = &TWiki::Store::readTopic( $webName, $topic ); - } - - my %args = $meta->findOne( "FILEATTACHMENT", $fileName ); - %args = ( "attr" => "", "path" => "", "comment" => "" ) if( ! % args ); - - if ( $args{"attr"} =~ /h/o ) { - $isHideChecked = "checked"; - } - - if ( $fileName ) { - $atext = listVersions( $webName, $topic, $fileName ); - } - - # why log attach before post is called? - # FIXME: Move down, log only if successful (or with error msg?) - # Attach is a read function, only has potential for a change - if( $TWiki::doLogTopicAttach ) { - # write log entry - &TWiki::Store::writeLog( "attach", "$webName.$topic", $fileName ); - } - - my $fileWikiUser = ""; - my $skin = $query->param( "skin" ) || TWiki::Prefs::getPreferencesValue( "SKIN" ); - if( $fileName && %args ) { - $tmpl = TWiki::Store::readTemplate( "attachagain", $skin ); - $fileWikiUser = &TWiki::userToWikiName( $args{"user"} ); - } else { - $tmpl = TWiki::Store::readTemplate( "attachnew", $skin ); - } - $tmpl =~ s/%ATTACHTABLE%/$atext/go; - $tmpl =~ s/%FILEUSER%/$fileWikiUser/go; - $tmpl = &TWiki::handleCommonTags( $tmpl, $topic ); - $tmpl = &TWiki::getRenderedVersion( $tmpl ); - $tmpl = &TWiki::handleMetaTags( $webName, $topic, $tmpl, $meta ); - $tmpl =~ s/%HIDEFILE%/$isHideChecked/go; - $tmpl =~ s/%FILENAME%/$fileName/go; - $tmpl =~ s/%FILEPATH%/$args{"path"}/go; - $tmpl =~ s/%FILECOMMENT%/$args{"comment"}/go; - TWiki::writeHeader( $query ); - print $tmpl; -} - -# EOF diff --git a/backup.to.eiche b/backup.to.eiche deleted file mode 100755 index 145dcf3..0000000 --- a/backup.to.eiche +++ /dev/null @@ -1,10 +0,0 @@ -HOST=eiche -DESTDIR=/mnt/datennirvana/backup/bruehe -EXCLUDE_FILE=/root/.backup-exclude - -#time rsync -e ssh -av --exclude-from=/root/.backup-exclude / 192.168.23.33:/mnt/backup/bruehe - -time rsync -e ssh -av --exclude-from=$EXCLUDE_FILE / "$HOST":"$DESTDIR" - -#echo "Shutting down $HOST..." -#ssh $HOST "shutdown -h now" diff --git a/backup_to_eiche.nfs b/backup_to_eiche.nfs deleted file mode 100644 index 28f747d..0000000 --- a/backup_to_eiche.nfs +++ /dev/null @@ -1,18 +0,0 @@ -NEWROOT=/mnt/eiche -DATA_DIRS="bin boot etc home lib opt root sbin tmp usr var" -SCRIPTS="/root/scripts/to_eiche" - -# display how long we backup -date -for script in $SCRIPTS; do - $script -done - -# create empty dirs -mkdir -p $NEWROOT/dev $NEWROOT/proc $NEWROOT/mnt -for a in /mnt/*; do mkdir -p $NEWROOT/$a; done - -cd / -tar cf - $DATA_DIRS | ( cd $NEWROOT; tar xf - ) - -date diff --git a/bootstrap b/bootstrap deleted file mode 100644 index 85970db..0000000 --- a/bootstrap +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -mkdir ~/p/ -mr checkout diff --git a/bright-max b/bright-max deleted file mode 100755 index 9827529..0000000 --- a/bright-max +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/max_brightness | sudo tee /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness diff --git a/buch_start.sh b/buch_start.sh deleted file mode 100755 index d1a3fa5..0000000 --- a/buch_start.sh +++ /dev/null @@ -1,30 +0,0 @@ - -dev1="/dev/sd$1"; shift -dev2="/dev/sd$1"; shift -dev3="/dev/sd$1"; shift - -#devs='/dev/sde /dev/sdf /dev/sdg' -devs="/dev/sde /dev/sdc /dev/sdd" -set -e -set -x -mdadm --assemble /dev/md0 $dev1 $dev2 $dev3 -cryptsetup luksOpen /dev/md0 raid -fsck /dev/mapper/raid -mount /home/services/raid - -exit 0 - -#mdadm --assemble /dev/md0 /dev/sde /dev/sdf /dev/sdg -#cryptsetup luksOpen /dev/md0 raid - -[19:25] denkbrett:~nico# mdadm --assemble --scan -/dev/md0: File exists -mdadm: /dev/md/0 has been started with 2 drives (out of 3). -mdadm: /dev/md/0 already active, cannot restart it! -mdadm: /dev/md/0 needed for /dev/sdc... -mdadm: /dev/md/0 already active, cannot restart it! -mdadm: /dev/md/0 needed for /dev/sdc... -[19:25] denkbrett:~nico# mdadm --manage -a /dev/md0 /dev/sdc -mdadm: re-added /dev/sdc -[19:25] denkbrett:~nico# - diff --git a/buch_stop.sh b/buch_stop.sh deleted file mode 100755 index 6481fe6..0000000 --- a/buch_stop.sh +++ /dev/null @@ -1,2 +0,0 @@ -cryptsetup luksClose raid -mdadm --misc --stop /dev/md0 diff --git a/build-autoconf.sh b/build-autoconf.sh deleted file mode 100755 index e5ed06e..0000000 --- a/build-autoconf.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# Nico Schottelius -# Date: 17-Sep-2005 -# Last Modified: - -# - -[ $# -eq 1 ] || exit 23 - -PACKAGE=$1; shift -PREFIX=/usr/packages/$PACKAGE - -./configure --prefix=$PREfIX $@ && make diff --git a/ceph_create_osd.sh b/ceph_create_osd.sh deleted file mode 100644 index 3b11821..0000000 --- a/ceph_create_osd.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -if [ $# -lt 1 ]; then - echo "$0 disk [fullsize]" - exit 1 -fi - -set -x - -export DEV=$1; shift -export ID=$(ceph osd create) - -ceph-disk zap $DEV -ceph-disk prepare --bluestore $DEV --osd-id ${ID} --osd-uuid $(uuidgen) --crush-device-class hdd - -mkdir /var/lib/ceph/osd/ceph-${ID} -mount ${DEV}1 /var/lib/ceph/osd/ceph-${ID} -touch /var/lib/ceph/osd/ceph-${ID}/sysvinit -ceph auth get-or-create osd.${ID} osd 'allow *' mon 'allow profile osd' > /var/lib/ceph/osd/ceph-${ID}/keyring -echo ${ID} > /var/lib/ceph/osd/ceph-${ID}/whoami -ceph-osd --cluster ceph -i ${ID} --mkfs -chown -R ceph:ceph /var/lib/ceph/osd/ceph-${ID} - -SIZE_REAL=$(fdisk -l | grep ${DEV}2 | cut -d " " -f7 | sed 's/T//') - -# Start with small data to get a feeling if disk really works -SIZE_FAKE=0.1 - -if [ $# -ge 1 ]; then - SIZE=$SIZE_REAL -else - SIZE=$SIZE_FAKE -fi - - -ceph osd crush add osd.${ID} ${SIZE} host=$(hostname) - -/etc/init.d/ceph start osd.${ID} diff --git a/change.old.new b/change.old.new deleted file mode 100755 index 8c73c52..0000000 --- a/change.old.new +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -OLD='\[ Nico at Schottelius dot org \]' -NEM='\[ info: use finger @schottelius.org ]' - -if [ ! -d "$1" ]; then - cat "$1" | sed "s/$OLD/$NEW/g" - #> $1.tmp - #mv $1.tmp $1 -fi diff --git a/clear-link-dirs b/clear-link-dirs deleted file mode 100644 index 87c630c..0000000 --- a/clear-link-dirs +++ /dev/null @@ -1,29 +0,0 @@ - -check_file() -{ - if [ ! -h "$1" ]; then - echo "$1" is not a link\! Please FIXME\! - if [ ! -e "$1" ]; then - echo "$1" is broken. removing. - #rm "$1" - fi - fi -} - -for a in /usr/bin/* ; do - check_file "$a" -done - -for a in /usr/lib/* ; do - check_file "$a" -done - -for a in /usr/sbin/*; do - check_file "$a" -done - -for a in /usr/include/*; do - check_file "$a" -done - - diff --git a/compile.package b/compile.package deleted file mode 100644 index a292309..0000000 --- a/compile.package +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# cLinux -# Nico Schottelius (nico-linux@schottelius.org) -# 2005-03-27 -# build a standard package - -[ $# -ne 1 ] && exit 1 - -PRE_PREFIX=/usr/packages -PKGDL=$1 - -PREFIX=${PRE_PREFIX}/${PKGDL} - -./configure "--prefix=${PREFIX}"