[Fai-commit] r6763 - in trunk: . utils

Thomas Lange lange at alioth.debian.org
Sun Oct 23 10:38:13 UTC 2011


Author: lange
Date: 2011-10-23 10:38:12 +0000 (Sun, 23 Oct 2011)
New Revision: 6763

Removed:
   trunk/utils/all_hosts
   trunk/utils/prtnetgr
   trunk/utils/rshall
Modified:
   trunk/Makefile
Log:
remove obsolete utils which are not closely connected to fai

Closes: #618521


Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2011-10-23 10:23:00 UTC (rev 6762)
+++ trunk/Makefile	2011-10-23 10:38:12 UTC (rev 6763)
@@ -11,8 +11,8 @@
 
 # for syntax checks
 BASH_SCRIPTS = lib/fai-divert lib/fai-mount-disk lib/fai-savelog lib/fai-vol_id lib/get-boot-info lib/get-config-dir lib/get-config-dir-cvs lib/get-config-dir-file lib/get-config-dir-git lib/get-config-dir-hg lib/get-config-dir-nfs lib/get-config-dir-svn lib/mkramdisk lib/mount2dir lib/prcopyleft lib/subroutines lib/task_sysinfo lib/updatebase
-SHELL_SCRIPTS = lib/check_status lib/create_resolv_conf lib/updatebase lib/fai-abort lib/fai-divert lib/load_keymap_consolechars lib/disk-info lib/list_disks utils/mkdebmirror utils/all_hosts utils/rshall bin/policy-rc.d.fai bin/dhclient-fai-script
-PERL_SCRIPTS = lib/setup-storage/*.pm bin/ainsl bin/device2grub bin/dhcp-edit bin/fai-chboot bin/faimond bin/faimond-gui bin/fcopy bin/install_packages bin/setup-storage examples/simple/tests/Faitest.pm lib/dhclient-perl lib/fai-savelog-ftp utils/prtnetgr
+SHELL_SCRIPTS = lib/check_status lib/create_resolv_conf lib/updatebase lib/fai-abort lib/fai-divert lib/load_keymap_consolechars lib/disk-info lib/list_disks utils/mkdebmirror bin/policy-rc.d.fai bin/dhclient-fai-script
+PERL_SCRIPTS = lib/setup-storage/*.pm bin/ainsl bin/device2grub bin/dhcp-edit bin/fai-chboot bin/faimond bin/faimond-gui bin/fcopy bin/install_packages bin/setup-storage examples/simple/tests/Faitest.pm lib/dhclient-perl lib/fai-savelog-ftp
 
 # do not include .svn dir and setup-storage subdir
 libfiles=$(patsubst lib/setup-storage,,$(wildcard lib/[a-z]*))

Deleted: trunk/utils/all_hosts
===================================================================
--- trunk/utils/all_hosts	2011-10-23 10:23:00 UTC (rev 6762)
+++ trunk/utils/all_hosts	2011-10-23 10:38:12 UTC (rev 6763)
@@ -1,57 +0,0 @@
-#! /bin/sh
-
-# determine the list of all hosts that respond to a ping
-#
-# (c) Thomas Lange, Institut fuer Informatik, Uni Koeln, 1998,2001
-
-# define a netgroup called allhosts which is the list of all hostnames
-
-fpingopt="-i40"
-
-make_hostlist() {
-
-    # example for a Beowulf cluster
-    server=atom00
-    nodeprefix=atom
-    endnum=25
-    # create the list of all hosts
-    i=1
-    while [ $i -le $endnum ]; do
-	num=`printf "%.2d" $i`
-	nodes="$nodes $nodeprefix$num"
-	i=$(($i+1))
-    done
-    allhosts="$server $nodes"
-}
-
-usage() {
-cat <<EOF
-   Usage: all_hosts [parameter]
-
-    all_hosts without any option show all answering hosts.
-
-    -h     print this message.
-    -n     show all non answering hosts.
-    -p     print only the list of all hosts
-
-EOF
-exit 0
-}
-
-# - - - - - - - - - - - - - - - - - - - -
-# if using NIS this is very nice
-# prtnetgr prints all hosts belonging to a netgroup
-allhosts=`prtnetgr allhosts`
-#make_hostlist
-
-while getopts anhp opt
-do
-        case "$opt" in
-	n) fping $fpingopt -u $allhosts 2>/dev/null ;;
-        h) usage ;;
-        p) echo $allhosts ;;
-	*) usage
-	    exit 2;;
-	esac
-done
-[ -n "$1" ] || fping $fpingopt -a $allhosts 2>/dev/null

Deleted: trunk/utils/prtnetgr
===================================================================
--- trunk/utils/prtnetgr	2011-10-23 10:23:00 UTC (rev 6762)
+++ trunk/utils/prtnetgr	2011-10-23 10:38:12 UTC (rev 6763)
@@ -1,53 +0,0 @@
-#! /usr/bin/perl
-
-#*********************************************************************
-#
-# prtnetgr -- print a host netgroup, convert the netgroup tree to a flat listing
-#
-# (c) 2001-2002 by Thomas Lange, lange at informatik.uni-koeln.de
-# Universitaet zu Koeln
-#
-#*********************************************************************
-# TODO: match the form (,,); currently these lines are skipped
-# global variable
-# %netgroup
-
-# - - - - - - - - - - - - - - - - - - - - -
-sub usage {
-
-  print <<EOM
-  Usage: prtnetgrp netgroup_name
-
-  prtnetgrp prints a plain list of all hosts belonging to the netgroup
-EOM
-}
-# - - - - - - - - - - - - - - - - - - - - -
-sub mklist {
-
-  my $grp = shift;
-  $netgroup{$grp} || return $grp;
-  map { mklist($_) } @{$netgroup{$grp}};
-}
-# - - - - - - - - - - - - - - - - - - - - -
-
-&usage unless @ARGV;
-
-# for debugging
-#open NET, "<netgroup " or die "Can't read NIS netgroup info\n";
-
-open NET, "ypcat -k netgroup |" or die "Can't read NIS netgroup info\n";
-while (<NET>) {
-  next if /^\s*$/;
-  next if /\(/;
-  next if /^#/;
-  ($grp, @members) = split;
-  $netgroup{$grp} = [ @members ];
-}
-
-# only one argument: the name of a host netgroup
-$arg = shift;
-# exit if argument is not a netgroup
-exit 1 unless $netgroup{$arg};
-$plist = join ' ', mklist($arg);
-print "$plist\n";
-exit 0;

Deleted: trunk/utils/rshall
===================================================================
--- trunk/utils/rshall	2011-10-23 10:23:00 UTC (rev 6762)
+++ trunk/utils/rshall	2011-10-23 10:38:12 UTC (rev 6763)
@@ -1,124 +0,0 @@
-#! /bin/sh 
-
-# executes a command on all hosts which are return by all_hosts
-# T. Lange; jan 2000 Institut fuer Informatik, Uni Koeln
-# A. Menze und F. Möllers; März 2003 Institut für Informatik, Uni Köln
-# Add usage and exclude function
-
-
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-usage() {
-cat <<EOF
-   Usage: rshall [option] arguments
-
-     rshall with given arguments executes those arguments on all alive
- hosts of the network 
-
- options:
-
-    -h                   print this message.
-    -e host[,host ...]   exclude this comma sperated list of machines
-
-
- examples:
-
-    rshall date
-    rshall -e rubens,frueh,suenner,[...] date
-
-
-EOF
-exit 0
-}
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-list() {
-
-    if [ -n "$nohosts" ] ; then
-	echo
-	echo The command will not be executed on the following hosts because 
-	echo they are down: $nohosts
-#	echo You have 5 seconds to stop by typing "control c"
-	sleep 5s
-    fi
-
-    for h in $hosts; do
-        echo ''
-        echo ''
-        echo '*****   '$h:
-        rsh $h "$@"
-    done
-}
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-typos() {
-
-    all=`prtnetgr allhosts`
-
-    for e in $ehosts; do
-	exists=0
-	for a in $all; do
-	    if [ $e = $a ] ; then
-		exists=1
-	    fi
-	done
-
-	if [ $exists = 0 ] ; then
-	    error=1
-	    error_hosts="$error_hosts $e"
-	fi
-    done
-
-    if [ $error = 1 ] ; then
-        echo +++ !!! +++ ATTENTION PLEASE +++ !!! +++
-        echo
-        echo The following machine\(s\) does not exist: $error_hosts 
-        echo
-        exit 1
-    fi
-}
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-exclude() {
-
-    ehosts=`echo $* | sed "s/,/ /g"`
-    error=0
-
-    typos
-   
-    for h in $allhosts; do
-	einf=1
-	for e in $ehosts; do
-	    if [ $h = $e ] ; then
-		einf=0
-	    fi
-	done
-
-	if [ $einf = 1 ] ; then
-	    dhosts="$dhosts $h"
-       	fi
-    done
-}
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-eflag=0
-
-while getopts e:h a
-do
-        case "$a" in
-        h) usage;;
-        e) eflag=1;; 
-	*) usage;;
-	
-	esac
-done
-
-[ -z "$1" ] && usage;
-
-allhosts=`all_hosts`
-nohosts=`all_hosts -n`
-
-if [ $eflag = 0 ]; then
-    hosts=$allhosts
-else
-    exclude $OPTARG
-    shift `expr $OPTIND - 1`
-    hosts=$dhosts
-fi
-
-list "$*"




More information about the Fai-commit mailing list