summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-12-03 20:30:29 +0000
committerru <ru@FreeBSD.org>2005-12-03 20:30:29 +0000
commitabad3468e54877fd55bb0060a5b1ab2feb1b4146 (patch)
tree7c1ce1476ffc92b70cf1eb4ee4f8ab0cd8e6fe90 /tools
parent239dea2f89762ae60ab5140ae9a174b95911aeaa (diff)
downloadFreeBSD-src-abad3468e54877fd55bb0060a5b1ab2feb1b4146.zip
FreeBSD-src-abad3468e54877fd55bb0060a5b1ab2feb1b4146.tar.gz
Move the 2->3 upgrade kit on the attic.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/README1
-rwxr-xr-xtools/tools/upgrade/doupgrade.sh78
-rwxr-xr-xtools/tools/upgrade/getosreldate.sh8
-rwxr-xr-xtools/tools/upgrade/move_aout_libs.sh139
4 files changed, 0 insertions, 226 deletions
diff --git a/tools/tools/README b/tools/tools/README
index cde85ce..313fe47 100644
--- a/tools/tools/README
+++ b/tools/tools/README
@@ -49,7 +49,6 @@ scsi-defects Get at the primary or grown defect list of a SCSI disk.
sysdoc Build a manual page with available sysctls for a specific
kernel configuration.
tinderbox Sample script for nightly test builds.
-upgrade Scripts used for upgrading an installed system.
vop_table Generates a HTML document that shows all the VOP's in
the kernel.
whereintheworld Summarizes "make world" output.
diff --git a/tools/tools/upgrade/doupgrade.sh b/tools/tools/upgrade/doupgrade.sh
deleted file mode 100755
index 9fa73ec..0000000
--- a/tools/tools/upgrade/doupgrade.sh
+++ /dev/null
@@ -1,78 +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}
-
-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. wd0 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 100755
index 3c95648..0000000
--- a/tools/tools/upgrade/getosreldate.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/sh
-# $FreeBSD$
-
-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 100755
index e525200..0000000
--- a/tools/tools/upgrade/move_aout_libs.sh
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-# 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 -L $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
OpenPOWER on IntegriCloud