Remove old FreeBSD upgrade tools.
authorSascha Wildner <swildner@dragonflybsd.org>
Sat, 26 Apr 2008 09:49:50 +0000 (09:49 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Sat, 26 Apr 2008 09:49:50 +0000 (09:49 +0000)
tools/tools/README
tools/tools/upgrade/doupgrade.sh [deleted file]
tools/tools/upgrade/getosreldate.sh [deleted file]
tools/tools/upgrade/move_aout_libs.sh [deleted file]

index b936c74..befd9a2 100644 (file)
@@ -1,5 +1,5 @@
 # $FreeBSD: src/tools/tools/README,v 1.18.2.2 2003/02/24 22:52:36 sam Exp $
-# $DragonFly: src/tools/tools/README,v 1.11 2008/04/06 03:23:49 sephe Exp $
+# $DragonFly: src/tools/tools/README,v 1.12 2008/04/26 09:49:50 swildner Exp $
 
 This directory is for tools.
 
@@ -22,13 +22,12 @@ kerninclude Shellscript to find unused #includes in the kernel.
 kernxref       Shellscript to cross reference symbols in the LINT kernel.
 local_syms     Shellscript to find symbols not referenced by other files.
 mid            Create a Message-ID database for mailing lists.
+netrate                Generate network packets.
 pciid          Generate src/share/misc/pci_vendors.
 scsi-defects   Get at the primary or grown defect list of a SCSI disk.
 splitpatch     Python script to split a large patch file into independent
                patches.  Default name convention is compatible with
                the patch framework.
-upgrade         Scripts used for upgrading an installed system.
 vop_table      Generates a HTML document that shows all the VOP's in
                the kernel.
 wlandebug      Manipulate netproto/802_11 debug flags symbolically.
-netrate                Generate network packets.
diff --git a/tools/tools/upgrade/doupgrade.sh b/tools/tools/upgrade/doupgrade.sh
deleted file mode 100755 (executable)
index 4de8a3a..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-
-# Simple helper script for upgrade target.
-
-# Expects MACHINE to be passed in with the environment, the "pass number"
-# as the first argument the name of the file to leave its droppings in
-# as the second.  CURDIR is also passed in the environment from ${.CURDIR}
-#
-# $DragonFly: src/tools/tools/upgrade/Attic/doupgrade.sh,v 1.3 2005/02/26 12:00:55 swildner Exp $
-
-PASS=$1
-CONF=$2
-
-cd ${CURDIR}/sys/${MACHINE}/conf
-
-# Create kernel configuration file for pass #1
-if [ $PASS -eq 1 ]; then
-       echo "The following files are in ${CURDIR}/sys/${MACHINE}/conf:"; echo
-       ls -C
-       echo; echo -n "Which config file do you wish to use? [GENERIC] "
-       read answer
-       if [ -z "${answer}" ]; then
-               KERN=GENERIC
-       else
-               KERN="${answer}"
-       fi
-       if [ ! -f ${KERN} ]; then
-               KERN=GENERIC
-       fi
-       if ! grep -q atkbdc0 ${KERN}; then
-               if [ ! -f ${KERN}.bkup ]; then
-                       cp ${KERN} ${KERN}.bkup
-               fi
-               sed -e 's/^device.*sc0.*$/ \
-controller      atkbdc0 at isa? port IO_KBD tty \
-device          atkbd0  at isa? tty irq 1 \
-device          vga0    at isa? port ? conflicts \
-device          sc0     at isa? tty \
-pseudo-device   splash \
-/' -e 's/sd\([0-9]\)/da\1/' -e 's/st\([0-9]\)/sa\1/' < ${KERN}.bkup > ${KERN}
-       fi
-
-       ROOTDEV=`awk '$2~/\/$/{print substr($1, 6, 3)}' /etc/fstab`
-       echo -n "What is your boot device (e.g. ad0 or sd0)? [${ROOTDEV}] "
-       read answer
-       if [ -n "${answer}" ]; then
-               ROOTDEV="${answer}"
-       fi
-       echo "KERNEL=${KERN}" > ${CONF}
-       echo "ROOTDEV=${ROOTDEV}" >> ${CONF}
-       if ! file /kernel | grep -q ELF; then
-               echo "NEWBOOT=YES" >> ${CONF}
-       fi
-fi
-
-# Build and install kernel as pass #2
-if [ $PASS -eq 2 -a -f ${CONF} ]; then
-       . ${CONF}
-       if [ "x${NEWBOOT}" = "xYES" ]; then
-          echo "--------------------------------------------------------------"
-          echo " Installing new boot blocks"
-          echo "--------------------------------------------------------------"
-          if [ ! -f /boot/loader ]; then
-             (cd ${CURDIR}/lib/libstand; make obj; make -B depend all install)
-             (cd ${CURDIR}/sys/boot; make obj; make -B depend all install)
-          fi
-          if ! disklabel -B ${ROOTDEV}; then
-               echo "Installation of new boot blocks failed!  Please correct"
-               echo "this manually BEFORE you reboot your system!"
-               exit 1
-          fi
-       fi
-       if ! file /kernel | grep -q ELF; then
-               echo "--------------------------------------------------------------"
-               echo " Building an elf kernel for ${KERNEL} using the new tools"
-               echo "--------------------------------------------------------------"
-               config -r ${KERNEL}
-               cd ${CURDIR}/sys/compile/${KERNEL} && make -B depend -DFORCE all install
-       fi
-fi
diff --git a/tools/tools/upgrade/getosreldate.sh b/tools/tools/upgrade/getosreldate.sh
deleted file mode 100644 (file)
index 342934d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /bin/sh
-# $FreeBSD: src/tools/tools/upgrade/getosreldate.sh,v 1.2 1999/08/28 00:54:34 peter Exp $
-# $DragonFly: src/tools/tools/upgrade/Attic/getosreldate.sh,v 1.2 2003/06/17 04:29:11 dillon Exp $
-
-RELDATE=`sysctl -n kern.osreldate 2>/dev/null`
-if [ "x$RELDATE" = x ]; then
-  RELDATE=200000       # assume something really old
-fi
-echo $RELDATE
diff --git a/tools/tools/upgrade/move_aout_libs.sh b/tools/tools/upgrade/move_aout_libs.sh
deleted file mode 100644 (file)
index 2006936..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: src/tools/tools/upgrade/move_aout_libs.sh,v 1.6 1999/08/28 00:54:34 peter Exp $
-# $DragonFly: src/tools/tools/upgrade/Attic/move_aout_libs.sh,v 1.2 2003/06/17 04:29:11 dillon Exp $
-# 
-# Search for a.out libraries and move them to an aout subdirectory of
-# the elf library directory.
-#
-# The arguments are the directories to search.
-#
-libdirs="$*"
-
-# Create a temporary tool to get the timestamp of libraries. No, I don't
-# want to use perl or whatever.
-create_get_time_stamp ( )
-{
-       echo "#include <stdio.h>" > /tmp/get_time_stamp.c
-       echo "#include <sys/stat.h>" >> /tmp/get_time_stamp.c
-       echo "int main(int argc, char *argv[]) {" >> /tmp/get_time_stamp.c
-       echo "int ierr; struct stat fs;" >> /tmp/get_time_stamp.c
-       echo "if ((ierr = stat(argv[1],&fs)) == 0)" >> /tmp/get_time_stamp.c
-       echo "printf(\"%ld\n\",(long) fs.st_mtime);" >> /tmp/get_time_stamp.c
-       echo "return (ierr); }" >> /tmp/get_time_stamp.c
-       gcc -o /tmp/get_time_stamp /tmp/get_time_stamp.c
-       rm /tmp/get_time_stamp.c
-       return
-}
-
-# Move an a.out library to the aout subdirectory of the elf directory.
-move_file ( ) 
-{
-       if test -d $dir/aout; then
-       else
-               echo "Creating directory $dir/aout"
-               mkdir $dir/aout
-               ldconfig -m $dir/aout
-       fi
-       fname=${file#$dir/}
-       if test -f $dir/aout/$fname; then
-               if test -x /tmp/get_time_stamp; then
-               else
-                       create_get_time_stamp
-               fi
-               t1=`/tmp/get_time_stamp $dir/aout/$fname`
-               t2=`/tmp/get_time_stamp $file`
-               if test $t1 -gt $t2; then
-                       echo $file is older than $dir/aout/$fname
-                       answer=""
-                       while test "$answer" != "y" -a "$answer" != "n"; do
-                               read -p "OK to delete the older file? (y/n) " answer
-                       done
-                       if test $answer = "y"; then
-                               echo Deleting $file
-                               chflags noschg $file
-                               rm $file
-                       else
-                               echo "You need to move $file out of $dir because that's an elf directory"
-                       fi
-               else
-                       echo $dir/aout/$fname is older than $file
-                       answer=""
-                       while test "$answer" != "y" -a "$answer" != "n"; do
-                               read -p "OK to overwrite the older file? (y/n) " answer
-                       done
-                       if test $answer = "y"; then
-                               echo Overwriting $dir/aout/$fname with $file
-                               chflags noschg $file
-                               mv $file $dir/aout/$fname
-                               ldconfig -R
-                       else
-                               echo "You need to move $file out of $dir because that's an elf directory"
-                       fi
-               fi
-       else
-               echo Move $fname from $dir to $dir/aout
-               chflags noschg $file
-               mv $file $dir/aout/$fname
-               ldconfig -R
-       fi
-       return
-}
-
-# Given a list of files in a directory, find those that are a.out
-# libraries and move them.
-move_if_aout ( ) 
-{
-       # Check each library
-       for file in $files
-       do
-               # Don't touch symbolic links yet. It's not clear how
-               # they should be handled.
-               if test -h $file; then
-               else
-                       # Check that this is a normal file.
-                       if test -f $file; then
-                               # Identify the file by magic
-                               filemagic=`file $file`
-
-                               # Check if the file is an a.out library
-                               if expr "$filemagic" : ".*$aoutmagic"; then
-                                       # Move the a.out library
-                                       move_file
-                               fi
-                       fi
-               fi
-       done
-       return
-}
-
-# Only search the directories specified.
-for dir in $libdirs
-do
-       # Make sure the directory exists, or ldconfig will choke later.
-       mkdir -p $dir $dir/aout
-
-       echo "Searching library directory $dir for a.out libraries..."
-
-       # Get a list of archive libraries.
-       files=`ls $dir/*.a 2> /dev/null`
-
-       # a.out archive libraries look like this:
-       aoutmagic="current ar archive random library"
-
-       # Move each a.out archive library:
-       move_if_aout
-
-       # Get a list of shared libraries
-       files=`ls $dir/*.so.*.* 2> /dev/null`
-
-       # a.out shared libraries look like this:
-       aoutmagic="FreeBSD/i386 compact demand paged shared library"
-
-       # Move each a.out shared library:
-       move_if_aout
-done
-
-# If we created the time stamp program, delete it:
-if test -x /tmp/get_time_stamp; then
-       rm /tmp/get_time_stamp
-fi