Index: trunk/minix/commands/scripts/DESCRIBE.sh
===================================================================
--- trunk/minix/commands/scripts/DESCRIBE.sh	(revision 9)
+++ 	(revision )
@@ -1,188 +1,0 @@
-#!/bin/sh
-#
-# DESCRIBE 2.2 - Describe the given devices.		Author: Kees J. Bot
-#
-# BUGS
-# - Arguments may not contain shell metacharacters.
-
-case $# in
-0)	flag=; set -$- /dev ;;
-*)	flag=d ;;
-esac
-
-ls -l$flag $* | \
-sed	-e '/^total/d' \
-	-e '/^[^bc]/s/.* /BAD BAD /' \
-	-e '/^[bc]/s/.* \([0-9][0-9]*\), *\([0-9][0-9]*\).* /\1 \2 /' \
-| {
-ex=0	# exit code
-
-while read major minor path
-do
-    case $path in
-    /*)	name=`expr $path : '.*/\\(.*\\)$'`
-	;;
-    *)	name=$path
-    esac
-    dev= des=
-
-    case $major in	# One of the controllers?  What is its controller nr?
-    3)	ctrlr=0	;;
-    8)	ctrlr=1	;;
-    10)	ctrlr=2	;;
-    12)	ctrlr=3	;;
-    esac
-
-    case $major,$minor in
-    1,0)	des="RAM disk" dev=ram
-	;;
-    1,1)	des="memory" dev=mem
-	;;
-    1,2)	des="kernel memory" dev=kmem
-	;;
-    1,3)	des="null device, data sink" dev=null
-	;;
-    2,*)	drive=`expr $minor % 4`
-	case `expr $minor - $drive` in
-	0)	des='auto density' dev="fd$drive"
-	    ;;
-	4)	des='360k, 5.25"' dev="pc$drive"
-	    ;;
-	8)	des='1.2M, 5.25"' dev="at$drive"
-	    ;;
-	12)	des='360k in 720k, 5.25"' dev="qd$drive"
-	    ;;
-	16)	des='720k, 3.5"' dev="ps$drive"
-	    ;;
-	20)	des='360k in 1.2M, 5.25"' dev="pat$drive"
-	    ;;
-	24)	des='720k in 1.2M, 5.25"' dev="qh$drive"
-	    ;;
-	28)	des='1.44M, 3.5"' dev="PS$drive"
-	    ;;
-	112)	des='auto partition 0' dev="fd${drive}p0"
-	    ;;
-	116)	des='auto partition 1' dev="fd${drive}p1"
-	    ;;
-	120)	des='auto partition 2' dev="fd${drive}p2"
-	    ;;
-	124)	des='auto partition 3' dev="fd${drive}p3"
-	    ;;
-	*)	dev=BAD
-	esac
-	des="floppy drive $drive ($des)"
-	;;
-    [38],[05]|[38],[123][05]|1[02],[05]|1[02],[123][05])
-	drive=`expr $minor / 5`
-	des="controller $ctrlr disk $drive" dev=c${ctrlr}d${drive}
-	;;
-    [38],?|[38],[123]?|1[02],?|1[02],[123]?)
-	drive=`expr $minor / 5`
-	par=`expr $minor % 5 - 1`
-	des="controller $ctrlr disk $drive partition $par"
-	dev=c${ctrlr}d${drive}p${par}
-	;;
-    [38],12[89]|[38],1[3-9]?|[38],2??|1[02],12[89]|1[02],1[3-9]?|1[02],2??)
-	drive=`expr \\( $minor - 128 \\) / 16`
-	par=`expr \\( \\( $minor - 128 \\) / 4 \\) % 4`
-	sub=`expr \\( $minor - 128 \\) % 4`
-	des="hard disk $drive, partition $par, subpartition $sub"
-	des="controller $ctrlr disk $drive partition $par slice $sub"
-	#par=`expr $drive '*' 5 + $par`
-	dev=c${ctrlr}d${drive}p${par}s${sub}
-	;;
-    [38],6[4-9]|[38],7?|1[02],6[4-9]|1[02],7?)
-	tape=`expr \\( $minor - 64 \\) / 2`
-	case $minor in
-	*[02468])
-	    des="controller $ctrlr tape $tape (non-rewinding)"
-	    dev=c${ctrlr}t${tape}n
-	    ;;
-	*[13579])
-	    des="controller $ctrlr tape $tape (rewinding)"
-	    dev=c${ctrlr}t${tape}
-	esac
-	;;
-    4,0)	des="console device" dev=console
-	;;
-    4,[1-7])des="virtual console $minor" dev=ttyc$minor
-	;;
-    4,15)	des="diagnostics device" dev=log
-	;;
-    4,1[6-9])
-	line=`expr $minor - 16`
-	des="serial line $line" dev=tty0$line
-	;;
-    4,12[89]|4,1[3-8]?|4,19[01])
-	p=`expr \\( $minor - 128 \\) / 16 | tr '0123' 'pqrs'`
-	n=`expr $minor % 16`
-	test $n -ge 10 && n=`expr $n - 10 | tr '012345' 'abcdef'`
-	des="pseudo tty `expr $minor - 128`" dev=tty$p$n
-	;;
-    4,???)
-	p=`expr \\( $minor - 192 \\) / 16 | tr '0123' 'pqrs'`
-	n=`expr $minor % 16`
-	test $n -ge 10 && n=`expr $n - 10 | tr '012345' 'abcdef'`
-	des="controller of tty$p$n" dev=pty$p$n
-	;;
-    5,0)	des="anonymous tty" dev=tty
-	;;
-    6,0)	des="line printer, parallel port" dev=lp
-	;;
-    7,*)
-	d=`expr $minor % 8`
-	n=`expr $minor / 8`
-	case $d in
-	0)  case $name in
-	    psip*)
-		des="Pseudo IP #$n" dev=psip
-		;;
-	    *)  des="raw ethernet #$n" dev=eth
-	    esac
-	    ;;
-	1)  des="raw IP #$n" dev=ip
-	    ;;
-	2)  des="TCP/IP #$n" dev=tcp
-	    ;;
-	3)  des="UDP #$n" dev=udp
-	esac
-	case $d in
-	[0123])
-	    if [ "$name" = "$dev" ]
-	    then
-		des="$des (default)"
-	    else
-		dev=$dev$n
-	    fi
-	esac
-	;;
-    13,0)
-	des="audio" dev=audio
-	;;
-    14,0)
-	des="audio mixer" dev=mixer
-	;;
-    BAD,BAD)
-	des= dev=
-	;;
-    *)	dev=BAD
-    esac
-
-    case $name:$dev in
-    *:)
-	echo "$path: not a device" >&2
-	ex=1
-	;;
-    *:*BAD*)
-	echo "$path: cannot describe: major=$major, minor=$minor" >&2
-	ex=1
-	;;
-    $dev:*)
-	echo "$path: $des"
-	;;
-    *:*)	echo "$path: nonstandard name for $dev: $des"
-    esac
-done
-
-exit $ex
-}
Index: trunk/minix/commands/scripts/M.sh
===================================================================
--- trunk/minix/commands/scripts/M.sh	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#!/bin/sh
-#
-#	M, U - mount or unmount standard devices.
-
-case $#:$2 in
-1:|2:-r)	;;
-*)	echo "Usage: $0 <abbreviation> [-r]" >&2; exit 1
-esac
-
-. /etc/fstab
-
-dev=$1 dir=$1
-
-case $1 in
-0)	dev=/dev/fd0 dir=fd0 ;;
-1)	dev=/dev/fd1 dir=fd1 ;;
-PS0|at0|fd0|pat0|pc0|ps0)	dev=/dev/$dev dir=fd0 ;;
-PS1|at1|fd1|pat1|pc1|ps1)	dev=/dev/$dev dir=fd1 ;;
-root)	dev=$root ;;
-tmp)	dev=$tmp ;;
-usr)	dev=$usr ;;
-*)	dev=/dev/$dev dir=mnt
-esac
-
-case $0 in
-*M)	mount $dev /$dir $2 ;;
-*U)	umount $dev
-esac
Index: trunk/minix/commands/scripts/MAKEDEV.sh
===================================================================
--- trunk/minix/commands/scripts/MAKEDEV.sh	(revision 9)
+++ 	(revision )
@@ -1,267 +1,0 @@
-#!/bin/sh
-#
-# MAKEDEV 3.3 - Make special devices.			Author: Kees J. Bot
-
-case $1 in
--n)	e=echo; shift ;;	# Just echo when -n is given.
-*)	e=
-esac
-
-case $#:$1 in
-1:std)		# Standard devices.
-    set -$- mem fd0 fd1 fd0p0 fd1p0 \
-	c0d0 c0d0p0 c0d0p0s0 c0d1 c0d1p0 c0d1p0s0 \
-	c0d2 c0d2p0 c0d2p0s0 c0d3 c0d3p0 c0d3p0s0 \
-	c0d4 c0d4p0 c0d4p0s0 c0d5 c0d5p0 c0d5p0s0 \
-	c0d6 c0d6p0 c0d6p0s0 c0d7 c0d7p0 c0d7p0s0 \
-	tty ttyc1 ttyc2 ttyc3 tty00 tty01 tty02 tty03 \
-	ttyp0 ttyp1 ttyp2 ttyp3 ttyp4 ttyp5 ttyp6 ttyp7 ttyp8 ttyp9 \
-	ttypa ttypb ttypc ttypd ttype ttypf \
-	ttyq0 ttyq1 ttyq2 ttyq3 ttyq4 ttyq5 ttyq6 ttyq7 ttyq8 ttyq9 \
-	ttyqa ttyqb ttyqc ttyqd ttyqe ttyqf \
-	eth klog random cmos rescue
-    ;;
-0:|1:-\?)
-    cat >&2 <<EOF
-Usage:	$0 [-n] key ...
-Where key is one of the following:
-  ram mem kmem null boot zero	  # One of these makes all these memory devices
-  fd0 fd1 ...		  # Floppy devices for drive 0, 1, ...
-  fd0p0 fd1p0 ...	  # Make floppy partitions fd0p[0-3], fd1p[0-3], ...
-  c0d0 c0d1 ...		  # Make disks c0d0, c0d1, ...
-  c0d0p0 c0d1p0 ...	  # Make partitions c0d0p[0-3], c0d1p[0-3], ...
-  c0d0p0s0 c0d1p0s0 ...	  # Subparts c0d0p[0-3]s[0-3], c0d1p[0-3]s[0-3], ...
-  c1d0(p0)(s0)		  # Likewise for controller 1
-  c0t0 c0t1 c1t0 ...	  # Make tape devices c0t0, c0t0n, c0t1, ...
-  console lp tty log	  # One of these makes all four
-  ttyc1 ... ttyc7         # Virtual consoles
-  tty00 ... tty03         # Make serial lines
-  ttyp0 ... ttyq0 ...     # Make tty, pty pairs
-  eth ip tcp udp	  # One of these makes some TCP/IP devices
-  audio mixer		  # Make audio devices
-  klog                    # Make /dev/klog
-  random                  # Make /dev/random, /dev/urandom
-  cmos                    # Make /dev/cmos
-  kbd                     # Make /dev/kbd
-  kbdaux                  # Make /dev/kbdaux
-  rescue                  # Make /dev/rescue
-  video                   # Make /dev/video
-  std			  # All standard devices
-EOF
-    exit 1
-esac
-
-umask 077
-ex=0
-
-for dev
-do
-    case $dev in	# One of the controllers?  Precompute major device nr.
-    c0*) maj=3  ;;
-    c1*) maj=8  ;;
-    c2*) maj=10 ;;
-    c3*) maj=12 ;;
-    esac
-
-    case $dev in
-    ram|mem|kmem|null|boot|zero)
-	# Memory devices.
-	#
-	$e mknod ram b 1 0;	$e chmod 600 ram
-	$e mknod mem c 1 1;	$e chmod 640 mem
-	$e mknod kmem c 1 2;	$e chmod 640 kmem
-	$e mknod null c 1 3;	$e chmod 666 null
-	$e mknod boot b 1 4;	$e chmod 600 ram
-	$e mknod zero c 1 5;	$e chmod 644 zero
-	$e chgrp kmem ram mem kmem null boot zero
-	;;
-    fd[0-3])
-	# Floppy disk drive n.
-	#
-	d=`expr $dev : '.*\\(.\\)'`	# Drive number.
-	$e mknod $dev  b 2 $d
-	$e chmod 666 $dev
-	;;
-    pc[0-3]|at[0-3]|qd[0-3]|ps[0-3]|pat[0-3]|qh[0-3]|PS[0-3])
-	# Obsolete density locked floppy disk drive n.
-	#
-	d=`expr $dev : '.*\\(.\\)'`	# Drive number.
-	m=$d				# Minor device number.
-
-	$e mknod pc$d  b 2 $m;	m=`expr $m + 4`
-	$e mknod at$d  b 2 $m;	m=`expr $m + 4`
-	$e mknod qd$d  b 2 $m;	m=`expr $m + 4`
-	$e mknod ps$d  b 2 $m;	m=`expr $m + 4`
-	$e mknod pat$d b 2 $m;	m=`expr $m + 4`
-	$e mknod qh$d  b 2 $m;	m=`expr $m + 4`
-	$e mknod PS$d  b 2 $m;	m=`expr $m + 4`
-
-	$e chmod 666 pc$d at$d qd$d ps$d pat$d qh$d PS$d
-	;;
-    fd[0-3]p[0-3])
-	# Floppy disk partitions.
-	#
-	n=`expr $dev : '\\(.*\\)..'`	# Name prefix.
-	d=`expr $dev : '..\\(.\\)'`	# Drive number.
-	m=`expr 112 + $d`		# Minor of partition 0.
-	alldev=
-
-	for p in 0 1 2 3
-	do
-	    m=`expr 112 + $d + $p '*' 4` # Minor of partition $p.
-	    $e mknod ${n}p${p} b 2 $m	# Make e.g. fd0p0 - fd0p3
-	    alldev="$alldev ${n}p${p}"
-	done
-	$e chmod 666 $alldev
-	;;
-    c[0-3]d[0-7])
-	# Whole disk devices.
-	d=`expr $dev : '...\\(.\\)'`	# Disk number.
-	m=`expr $d '*' 5`		# Minor device number.
-	$e mknod $dev b $maj $m
-	$e chmod 600 $dev
-	;;
-    c[0-3]d[0-7]p[0-3])
-	# Disk primary partitions.
-	n=`expr $dev : '\\(.*\\).'`	# Name prefix.
-	d=`expr $dev : '...\\(.\\)'`	# Disk number.
-	alldev=
-
-	for p in 0 1 2 3
-	do
-	    m=`expr $d '*' 5 + 1 + $p`	# Minor device number.
-	    $e mknod $n$p b $maj $m
-	    alldev="$alldev $n$p"
-	done
-	$e chmod 600 $alldev
-	;;
-    c[0-3]d[0-7]p[0-3]s[0-3])
-	# Disk subpartition.
-	n=`expr $dev : '\\(.*\\)...'`	# Name prefix.
-	d=`expr $dev : '...\\(.\\)'`	# Disk number.
-	alldev=
-
-	for p in 0 1 2 3
-	do
-	    for s in 0 1 2 3
-	    do
-		m=`expr 128 + $d '*' 16 + $p '*' 4 + $s`  # Minor device nr.
-		$e mknod ${n}${p}s${s} b $maj $m
-		alldev="$alldev ${n}${p}s${s}"
-	    done
-	done
-	$e chmod 600 $alldev
-	;;
-    c[0-3]t[0-7]|c[0-3]t[0-7]n)
-	# Tape devices.
-	n=`expr $dev : '\\(....\\)'`	# Name prefix.
-	t=`expr $dev : '...\\(.\\)'`	# Tape number.
-	m=`expr 64 + $t '*' 2`		# Minor device number.
-	$e mknod ${n}n c $maj $m
-	$e mknod ${n} c $maj `expr $m + 1`
-	$e chmod 660 ${n}n ${n}
-	;;
-    console|lp|tty|log|kbd|kbdaux|video)
-	# Console, line printer, anonymous tty, diagnostics device,
-	# raw keyboard, ps/2 mouse, video.
-	$e mknod console c 4 0
-	$e chmod 600 console
-	$e chgrp tty console
-	$e mknod tty c 5 0
-	$e chmod 666 tty
-	$e mknod lp c 6 0
-	$e chown daemon lp
-	$e chgrp daemon lp
-	$e chmod 200 lp
-	$e mknod log c 4 15
-	$e chmod 222 log
-	$e mknod kbd c 4 127
-	$e mknod kbdaux c 4 126
-	$e chmod 660 kbd kbdaux
-	$e chgrp operator kbd kbdaux
-	$e mknod video c 4 125
-	$e chmod 600 video
-	$e chgrp operator video
-	;;
-    ttyc[1-7])
-	# Virtual consoles.
-	#
-	m=`expr $dev : '....\\(.*\\)'`	# Minor device number.
-	$e mknod $dev c 4 $m
-	$e chgrp tty $dev
-	$e chmod 600 $dev
-	;;
-    tty0[0-3])
-	# Serial lines.
-	#
-	n=`expr $dev : '.*\\(.\\)'`
-	$e mknod $dev c 4 `expr $n + 16`
-	$e chmod 666 $dev
-	$e chgrp tty $dev
-	;;
-    tty[p-s][0-9a-f]|pty[p-s][0-9a-f])
-	# Pseudo ttys.
-	#
-	dev=`expr $dev : '...\\(..\\)'`
-	g=`expr $dev : '\\(.\\)'`	# Which group.
-	g=`echo $g | tr 'pqrs' '0123'`
-	n=`expr $dev : '.\\(.\\)'`	# Which pty in the group.
-	case $n in
-	[a-f])	n=1`echo $n | tr 'abcdef' '012345'`
-	esac
-
-	$e mknod tty$dev c 4 `expr $g '*' 16 + $n + 128`
-	$e mknod pty$dev c 4 `expr $g '*' 16 + $n + 192`
-	$e chgrp tty tty$dev pty$dev
-	$e chmod 666 tty$dev pty$dev
-	;;
-    eth|ip|tcp|udp|eth0|ip0|tcp0|udp0)
-	# TCP/IP devices.
-	#
-	$e mknod eth0 c 7 0		# Network 0 (Ethernet)
-	$e mknod ip0 c 7 1
-	$e mknod tcp0 c 7 2
-	$e mknod udp0 c 7 3
-	$e chmod 600 eth0 ip0
-	$e chmod 666 tcp0 udp0
-	$e ln -f eth0 eth		# Default interface
-	$e ln -f ip0 ip
-	$e ln -f tcp0 tcp
-	$e ln -f udp0 udp
-	;;
-    audio|mixer)
-	# Audio devices.
-	#
-   $e mknod audio c 13 0
-   $e mknod rec c 13 1
-   $e mknod mixer c 13 2
-   $e chmod 666 audio rec mixer
-	;;
-    random|urandom)
-	# random data generator.
-	$e mknod random c 16 0;	$e chmod 644 random
-	$e mknod urandom c 16 0; $e chmod 644 urandom
-	$e chgrp operator random urandom
-	;;
-    cmos)
-    	# cmos device (set/get system time).
-    	$e mknod cmos c 17 0
-	$e chmod 600 cmos
-	;;
-    rescue)
-    	# rescue device
-    	$e mknod rescue b 9 0
-	$e chmod 644 rescue
-	;;
-    klog)
-    	# logging device.
-    	$e mknod klog c 15 0
-	$e chmod 600 klog
-	;;
-    *)
-	echo "$0: don't know about $dev" >&2
-	ex=1
-    esac
-done
-
-exit $ex
Index: trunk/minix/commands/scripts/Makefile
===================================================================
--- trunk/minix/commands/scripts/Makefile	(revision 9)
+++ 	(revision )
@@ -1,180 +1,0 @@
-# Makefile for cmd/scripts.
-
-CFLAGS	= -D_MINIX -D_POSIX_SOURCE
-CCLD	= $(CC) -i $(CFLAGS)
-MAKE	= exec make -$(MAKEFLAGS) install
-
-all:		# Does nothing
-
-install:	usr root
-
-# Commands on the /usr partition.
-usr:	\
-	/usr/bin/DESCRIBE \
-	/usr/bin/M \
-		/usr/bin/U \
-	/usr/bin/MAKEDEV \
-	/usr/bin/bigmake \
-	/usr/bin/adduser \
-	/usr/bin/binpackage \
-	/usr/bin/binpackages \
-	/usr/bin/cd \
-		/usr/bin/[ \
-		/usr/bin/command \
-		/usr/bin/easypack \
-		/usr/bin/echo \
-		/usr/bin/expr \
-		/usr/bin/false \
-		/usr/bin/getopts \
-		/usr/bin/getpack \
-		/usr/bin/read \
-		/usr/bin/test \
-		/usr/bin/true \
-		/usr/bin/umask \
-		/usr/bin/wait \
-	/usr/bin/checkhier \
-	/usr/bin/clear \
-		/usr/bin/clr \
-	/usr/bin/makewhatis \
-	/usr/bin/mkdep \
-	/usr/bin/mkdist \
-	/bin/setup \
-	/usr/bin/binsizes \
-	/usr/bin/rotate \
-	/usr/bin/floppysetup \
-	/usr/bin/packit \
-	/usr/bin/packman \
-	/usr/bin/spell \
-	/usr/bin/srccrc \
-	/usr/bin/svclog \
-	/usr/bin/version \
-	/usr/bin/whatis \
-		/usr/bin/apropos \
-	/usr/bin/whereis \
-
-# Commands on the root partition.
-root:	\
-	/bin/M \
-		/bin/U \
-	/bin/cd \
-		/bin/[ \
-		/bin/command \
-		/bin/echo \
-		/bin/expr \
-		/bin/false \
-		/bin/getopts \
-		/bin/read \
-		/bin/test \
-		/bin/true \
-		/bin/umask \
-		/bin/wait \
-
-clean:
-
-/usr/bin/DESCRIBE:	DESCRIBE.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/M:	M.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/U:	/usr/bin/M
-	install -m 755 -l $? $@
-
-/usr/bin/MAKEDEV:	MAKEDEV.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/bigmake:	bigmake.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/binpackage:	binpackage.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/binpackages:	binpackages.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/adduser:	adduser.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/cd:	cd.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/[ /usr/bin/command /usr/bin/echo /usr/bin/expr /usr/bin/false \
-/usr/bin/getopts /usr/bin/read /usr/bin/test /usr/bin/true /usr/bin/umask \
-/usr/bin/wait:	/usr/bin/cd
-	install -m 755 -l $? $@
-
-/usr/bin/easypack:	easypack.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/getpack:	getpack.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/checkhier:	checkhier.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/clear:	clear.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/clr:	/usr/bin/clear
-	install -m 755 -l $? $@
-
-/usr/bin/makewhatis:	makewhatis.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/mkdep:	mkdep.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/mkdist:	mkdist.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/floppysetup:	floppysetup.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/rotate:	rotate.sh
-	install -m 755 -c -o bin $? $@
-
-/bin/setup:	setup.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/binsizes:	binsizes.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/packit:	packit.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/packman:	packman.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/spell:	spell.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/srccrc:	srccrc.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/svclog:	svclog.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/version:	version.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/whatis:	whatis.sh
-	install -m 755 -c -o bin $? $@
-
-/usr/bin/apropos:	/usr/bin/whatis
-	install -m 755 -l $? $@
-
-/usr/bin/whereis:	whereis.sh
-	install -m 755 -c -o bin $? $@
-
-/bin/M:	/usr/bin/M
-	install -m 755 -c -o bin $? $@
-
-/bin/U:	/bin/M
-	install -m 755 -l $? $@
-
-/bin/cd:	/usr/bin/cd
-	install -m 755 -lc $? $@
-
-/bin/[ /bin/command /bin/echo /bin/expr /bin/false /bin/getopts \
-/bin/read /bin/test /bin/true /bin/umask /bin/wait:	/bin/cd
-	install -m 755 -l $? $@
Index: trunk/minix/commands/scripts/adduser.sh
===================================================================
--- trunk/minix/commands/scripts/adduser.sh	(revision 9)
+++ 	(revision )
@@ -1,121 +1,0 @@
-#!/bin/sh
-#
-#	adduser 1.0 - add a new user to the system	Author: Kees J. Bot
-#								16 Jan 1996
-
-# Check arguments.
-case "$#" in
-3)	user="$1"; group="$2"; home="$3"
-	;;
-*)	echo "Usage: adduser user group home-dir" >&2; exit 1
-esac
-
-# We need to be root.
-case "`id`" in
-'uid=0('*)
-	;;
-*)	echo "adduser: you must be root to add users" >&2; exit 1
-esac
-
-# User and group names must be alphanumeric and no longer than 8 characters.
-len=`expr "$user" : '[a-z][a-z0-9]*$'`
-if [ "$len" -eq 0 -o "$len" -gt 8 ]
-then
-	echo >&2 \
-"adduser: the user name must be alphanumeric and no longer than 8 characters"
-	exit 1
-fi
-
-len=`expr "$group" : '[a-z][a-z0-9]*$'`
-if [ "$len" -eq 0 -o "$len" -gt 8 ]
-then
-	echo >&2 \
-"adduser: the group name must be alphanumeric and no longer than 8 characters"
-	exit 1
-fi
-
-# The new user name must not exist, but the group must exist.
-if grep "^$user:" /etc/passwd >/dev/null
-then
-	echo "adduser: user $user already exists" >&2
-	exit 1
-fi
-
-gid=`sed -e "/^$group:/!d" -e 's/^[^:]*:[^:]*:\\([^:]*\\):.*/\\1/' /etc/group`
-if [ `expr "$gid" : '[0-9]*$'` -eq 0 ]
-then
-	echo "adduser: group $group does not exist" >&2
-	exit 1
-fi
-
-# Find the first free user-id of 10 or higher.
-uid=10
-while grep "^[^:]*:[^:]*:$uid:.*" /etc/passwd >/dev/null
-do
-	uid=`expr $uid + 1`
-done
-
-# No interruptions.
-trap '' 1 2 3 15
-
-# Lock the password file.
-ln /etc/passwd /etc/ptmp || {
-	echo "adduser: password file busy, try again later"
-	exit 1
-}
-
-# Make the new home directory, it should not exist already.
-mkdir "$home" || {
-	rm -rf /etc/ptmp
-	exit 1
-}
-
-# Make the new home directory by copying the honorary home directory of our
-# fearless leader.
-echo cpdir /usr/ast "$home"
-cpdir /usr/ast "$home" || {
-	rm -rf /etc/ptmp "$home"
-	exit 1
-}
-
-# Change the ownership to the new user.
-echo chown -R $uid:$gid "$home"
-chown -R $uid:$group "$home" || {
-	rm -rf /etc/ptmp "$home"
-	exit 1
-}
-
-# Is there a shadow password file?  If so add an entry.
-if [ -f /etc/shadow ]
-then
-	echo "echo $user::0:0::: >>/etc/shadow"
-	echo "$user::0:0:::" >>/etc/shadow || {
-		rm -rf /etc/ptmp "$home"
-		exit 1
-	}
-	pwd="##$user"
-else
-	pwd=
-fi
-
-# Finish up by adding a password file entry.
-echo "echo $user:$pwd:$uid:$gid:$user:$home: >>/etc/passwd"
-echo "$user:$pwd:$uid:$gid:$user:$home:" >>/etc/passwd || {
-	rm -rf /etc/ptmp "$home"
-	exit 1
-}
-
-# Remove the lock.
-rm /etc/ptmp || exit
-
-echo "
-The new user $user has been added to the system.  Note that the password,
-full name, and shell may be changed with the commands passwd(1), chfn(1),
-and chsh(1).  The password is now empty, so only console logins are possible."
-if [ $gid = 0 ]
-then
-	echo "\
-Also note that a new operator needs an executable search path (\$PATH) that
-does not contain the current directory (an empty field or "." in \$PATH)."
-fi
-exit 0
Index: trunk/minix/commands/scripts/bigmake.sh
===================================================================
--- trunk/minix/commands/scripts/bigmake.sh	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#!/bin/sh
-binsizes big
-make $*
-c=$?
-binsizes normal
-exit $c
Index: trunk/minix/commands/scripts/binpackage.sh
===================================================================
--- trunk/minix/commands/scripts/binpackage.sh	(revision 9)
+++ 	(revision )
@@ -1,66 +1,0 @@
-#!/bin/sh 
-
-PI=.postinstall
-INFO=.minixpackage
-
-set -e
-
-# No trailing slashes in the directory, because we want to base the
-# package filename on it.
-dir=`echo "$1" | sed 's/\/*$//'`
-
-if [ $# -ne 2 ]
-then	echo "Usage: $0 sourcedir packagedir"
-	exit 1
-fi
-
-if [ ! -d "$dir" ]
-then	echo "Error: $dir isn't a directory."
-	exit 1
-fi
-
-here=`pwd`
-
-case "$dir" in
-/*) srcdir="$dir" ;;
-*) srcdir="$here/$dir" ;;
-esac
-
-case $2 in
-/*) pdir="$2" ;;
-*) pdir="$here/$2" ;;
-esac
-
-packagestart=$srcdir/now
-findlist=$srcdir/findlist
-tar=$srcdir/"`basename ${dir}`".tar
-tarbz=$tar.bz2
-
-mkdir $pdir 2>/dev/null || true
-binsizes=big
-rc=$dir/.binpackage
-if [ -f $rc ]
-then	 . $rc
-fi
-binsizes $binsizes
-touch $packagestart
-sleep 1
-cd $dir
-
-if [ ! -f build -a ! -f build.minix ]
-then	echo "Error: No build or build.minix script in $dir."
-	exit 1
-fi
-
-if [ -f build.minix ]
-then	sh -e build.minix
-else	sh -e build
-fi
-
-echo " * Building package"
-echo "Minix package $dir built `date`." >$INFO
-( echo $INFO ; if [ -f $PI ]; then echo $PI; fi; find / -cnewer $packagestart | egrep -v "^($srcdir|/(dev|tmp)|/usr/(tmp|log|adm|run)|/etc/utmp|/var/run)" ) | pax -w -d | bzip2 >$tarbz
-rm -f $packagestart $findlist $tarcmd
-binsizes normal
-mv $tarbz $pdir
-exit 0
Index: trunk/minix/commands/scripts/binpackages.sh
===================================================================
--- trunk/minix/commands/scripts/binpackages.sh	(revision 9)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#!/bin/sh
-
-pdir=Packages
-
-for d in */build
-do
-	dir="`echo $d | sed 's/\/build$//'`"
-	if [ ! -f $pdir/$dir.tar.gz ]
-	then
-		echo " * $dir"
-		binpackage $dir $pdir
-	fi
-done
Index: trunk/minix/commands/scripts/binsizes.sh
===================================================================
--- trunk/minix/commands/scripts/binsizes.sh	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-#!/bin/sh
-
-t=/etc/binary_sizes
-
-if [ "$#" -ne 1 ]
-then	echo "Usage: $0 <big|normal>"
-	exit 1
-fi
-
-if [ "$1" != normal ]
-then	t=$t.$1
-fi
-
-chmem =250000 /usr/lib/* /usr/lib/i386/* >/dev/null 2>&1
-chmem =600000 /usr/lib/ego/*  >/dev/null 2>&1
-if [ -f $t ]
-then	cat "$t" | while read line
-	do	awk '{ print "chmem =" $2 " " $1 " 2>&1 | grep -v area.changed.from  || exit 1"}'
-	done | /bin/sh -e || exit 1
-else
-	echo "$0: $t does not exist" >&2
-	exit 1
-fi
-exit 0
Index: trunk/minix/commands/scripts/build
===================================================================
--- trunk/minix/commands/scripts/build	(revision 9)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/bin/sh
-make clean
-make && make install
Index: trunk/minix/commands/scripts/cd.sh
===================================================================
--- trunk/minix/commands/scripts/cd.sh	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#!/bin/sh
-#
-# cd 1.3 - equivalents for normally builtin commands.	Author: Kees J. Bot
-
-case $0 in
-*/*)	command="`expr "$0" : '.*/\(.*\)'`"
-	;;
-*)	command="$0"
-esac
-
-"$command" "$@"
Index: trunk/minix/commands/scripts/checkhier.sh
===================================================================
--- trunk/minix/commands/scripts/checkhier.sh	(revision 9)
+++ 	(revision )
@@ -1,181 +1,0 @@
-#!/bin/sh
-#
-#	checkhier 2.7 - check the directory hierarchy	Author: Kees J. Bot
-#								7 May 1995
-
-case "`id`" in
-'uid=0('*)	;;
-*)	echo "$0: must be run by root" >&2
-	exit 1
-esac
-
-# List of all interesting top level files and directories, with mode,
-# owner and group.  Only the key files are listed, the rest is owned
-# by bin, has mode 755 or 644, and is not critical to the operation of
-# the system.
-{
-	cat <<'EOF'
-drwxr-xr-x	root	operator	/
-drwxr-xr-x	bin	operator	/bin
-drwxr-xr-x	root	operator	/dev
-drwxr-xr-x	root	operator	/etc
--rw-r--r--	root	operator	/etc/fstab
--rw-r--r--	root	operator	/etc/group
--rw-r--r--	root	operator	/etc/hostname.file
--rw-r--r--	root	operator	/etc/inet.conf
--rw-r--r--	root	operator	/etc/motd
--rw-r--r--	root	operator	/etc/mtab
--rw-r--r--	root	operator	/etc/passwd
--rw-r--r--	root	operator	/etc/profile
--rw-r--r--	root	operator	/etc/protocols
--rw-r--r--	root	operator	/etc/rc
--rw-r--r--	root	operator	/etc/services
--rw-------	root	operator	/etc/shadow
--rw-r--r--	root	operator	/etc/termcap
--rw-r--r--	root	operator	/etc/ttytab
--rw-r--r--	root	operator	/etc/utmp
-dr-xr-xr-x	root	operator	/mnt
-dr-xr-xr-x	root	operator	/root
-drwxrwxrwx	root	operator	/tmp
-drwxr-xr-x	root	operator	/usr
-drwxr-xr-x	root	operator	/usr/adm
--rw-r--r--	root	operator	/usr/adm/lastlog
--rw-r--r--	root	operator	/usr/adm/wtmp
-drwxr-xr-x	ast	other		/usr/ast
-drwxr-xr-x	bin	operator	/usr/bin
-drwxr-xr-x	root	operator	/usr/etc
-drwxr-xr-x	bin	operator	/usr/include
-drwxr-xr-x	bin	operator	/usr/lib
-drwxrwxr-x	root	operator	/usr/local
-drwxrwxr-x	bin	operator	/usr/local/bin
-drwxrwxr-x	bin	operator	/usr/local/include
-drwxrwxr-x	bin	operator	/usr/local/lib
-drwxrwxr-x	bin	operator	/usr/local/man
-drwxrwxr-x	bin	operator	/usr/local/src
-drwxr-xr-x	bin	operator	/usr/man
-drwxr-xr-x	bin	operator	/usr/mdec
-drwx------	root	operator	/usr/preserve
-drwxr-xr-x	root	operator	/usr/run
-drwxr-xr-x	root	operator	/usr/spool
-drwx--x--x	root	operator	/usr/spool/at
-drwx--x--x	root	operator	/usr/spool/at/past
-drwx------	root	operator	/usr/spool/crontabs
-drwxrwxr-x	root	uucp		/usr/spool/locks
-drwx------	daemon	daemon		/usr/spool/lpd
-drwxr-xr-x	bin	operator	/usr/src
-drwxrwxrwx	root	operator	/usr/tmp
--rwsr-xr-x	root	?		/usr/bin/at
--rwsr-xr-x	root	?		/usr/bin/chfn
--rwsr-xr-x	root	?		/usr/bin/chsh
--rwsr-xr-x	root	?		/usr/bin/df
--rwsr-xr-x	root	?		/usr/bin/elvprsv
--rwsr-xr-x	root	?		/usr/bin/elvrec
--rwsr-xr-x	root	?		/usr/bin/format
--rwsr-xr-x	root	?		/usr/bin/hostaddr
--rwsr-xr-x	root	?		/usr/bin/install
--rwsr-xr-x	daemon	?		/usr/bin/lpd
--rwsr-xr-x	root	?		/usr/bin/mail
--rwsr-xr-x	root	?		/usr/bin/mount
--rwsr-xr-x	root	?		/usr/bin/passwd
--rwsr-xr-x	root	?		/usr/bin/ping
--rwxr-sr-x	?	kmem		/usr/bin/ps
--rwsr-xr--	root	?		/usr/bin/shutdown
--rwsr-xr-x	root	?		/usr/bin/su
--rwxr-sr-x	?	uucp		/usr/bin/term
--rwsr-xr-x	root	?		/usr/bin/umount
--rwxr-sr-x	?	tty		/usr/bin/write
-EOF
-
-} | {
-	# Check if each file has the proper attributes.  Offer a correction
-	# if not.
-	banner="\
-# List of commands to fix the top level hierarchy.  Do not apply these
-# commands blindly, but check and repair by hand.
-"
-
-	while read mode owner group file
-	do
-	    ( # "fix" a memory leak in set...
-
-		set -$- `ls -ld $file 2>/dev/null` '' '' '' ''
-		curmode=$1 curowner=$3 curgroup=$4
-		test $owner = '?' && curowner=$owner
-		test $group = '?' && curgroup=$group
-
-		# File types?
-		if [ x`expr "$mode" : '\\(.\\)'` != \
-					x`expr "$curmode" : '\\(.\\)'` ]
-		then
-			case $curmode in
-			?*)	echo "${banner}rm -r $file"
-				banner=
-			esac
-			curmode= curowner= curgroup=
-			case $mode in
-			d*)	echo "${banner}mkdir $file"
-				;;
-			-*)	echo "${banner}> $file"
-				;;
-			*)	echo "$0: $mode $file: unknown filetype" >&2
-				exit 1
-			esac
-			banner=
-		fi
-
-		# Mode?
-		if [ x$mode != x$curmode ]
-		then
-			octmode=
-			m=$mode
-			for i in u g o
-			do
-				r=0 w=0 x=0
-				case $m in
-				?r??*)		r=4
-				esac
-				case $m in
-				??w?*)		w=2
-				esac
-				case $m in
-				???[xst]*)	x=1
-				esac
-				octmode=$octmode`expr $r + $w + $x`
-				m=`expr $m : '...\\(.*\\)'`
-			done
-			r=0 w=0 x=0
-			case $mode in
-			???[sS=]??????)	r=4
-			esac
-			case $mode in
-			??????[sS=]???)	w=2
-			esac
-			case $mode in
-			?????????[tT=])	x=1
-			esac
-			case $r$w$x in
-			000)	;;
-			*)	octmode=`expr $r + $w + $x`$octmode
-			esac
-
-			echo "${banner}chmod $octmode $file"
-			banner=
-		fi
-
-		# Ownership?
-		if [ x$owner != x$curowner -o x$group != x$curgroup ]
-		then
-			echo "${banner}chown $owner:$group $file"
-			banner=
-		fi
-
-		# The Minix shell forgets processes, so wait explicitly.
-		wait
-
-	    case "$banner" in '') exit 1;; *) exit 0;; esac) || banner=
-	done
-	case "$banner" in
-	'')	exit 1
-	esac
-	exit 0
-}
Index: trunk/minix/commands/scripts/clear.sh
===================================================================
--- trunk/minix/commands/scripts/clear.sh	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#!/bin/sh
-#
-#	clear 1.0 - clear the screen			Author: Kees J. Bot
-#								30 Mar 1996
-export PATH=/bin:/usr/bin
-exec tget -str cl
Index: trunk/minix/commands/scripts/easypack.sh
===================================================================
--- trunk/minix/commands/scripts/easypack.sh	(revision 9)
+++ 	(revision )
@@ -1,118 +1,0 @@
-#!/bin/sh
-
-# This script gets and installs a package from the Website.
-# It is called by getpack package1 ...
-# A package must be in the form of pack.tar.bz2 and must
-# include a build script that makes and installs it.
-# The build script should succeed if installation works, else fail
-
-# Examples:
-#	easypack awk elle telnet	# fetch and install 3 packages
-#	easypack -o awk elle telnet	# fetch and replace existing packs
-
-SOURCE_DIR=/usr/src/commands		# where the source is deposited
-OVERWRITE=0				# can an installed package be overwritten?
-SOFTWARE_DIR="http://www.minix3.org/software"	# Tested and approved S/W
-BETA_DIR="http://www.minix3.org/beta_software"	# Untested software
-
-
-# Check for at least one parameter
-case $# in
-0)	echo Usage: $0 package ...
-	exit ;;
-esac
-
-# Change to source directory
-ORIG_DIR=`pwd`
-rm -f Log			# remove old debugging log
-cd $SOURCE_DIR || exit
-
-if [ "`id -u`" -ne 0 ]
-then
-	# Check for write permission here
-	if test ! -w . 
-	   then echo You do not have write permission for $SOURCE_DIR
-	   exit 1
-	fi
-fi
-
-# Check for -o flag; if found, set OVERWRITE
-if test $1 = "-o"
-   then OVERWRITE=1
-        shift
-fi
-
-# Loop on the packages
-for i
-do # Check to see if it exists. Don't overwrite unless -o given
-   echo " " ; echo Start fetching package $i 
-   echo " " >>$ORIG_DIR/Log
-   echo ------------- Start fetching $i ------------------ >>$ORIG_DIR/Log
-   if test -r $i
-      then # Directory already exists. May it be overwritten?
-	   if test $OVERWRITE = 0
-              then echo $i already exists. Skipping this package
-                   continue
-	      else # Remove the directory
-		   rm -rf $i
-		   echo Existing directory $i removed
-	   fi
-    fi
-
-   # Remove any junk from previous attempts
-   rm -f $i.tar.bz2 $i.tar
-
-   # Get the package
-   URL=$SOFTWARE_DIR/$i.tar.bz2
-   URL1=$URL
-   TARBZ=$i.tar.bz2
-   if urlget $URL >$TARBZ 2>/dev/null
-   then :
-   else # It is not in the directory of tested software. Try beta dir.
-	   URL=$BETA_DIR/$TARBZ
-	   if urlget $URL >$TARBZ 2>/dev/null
-	   then :
-	   else
-	   	   echo Cannot get $i.
-		   echo "   " Tried $URL1
-		   echo "   " Tried $URL
-		   echo "   " Skipping this package
-		   rm -f $TARBZ
-		   continue
-	   fi
-   fi
-
-   # We got it. Unpack it.
-   echo Package $i fetched
-   bunzip2 $TARBZ || smallbunzip2 $TARBZ
-   tar xf $i.tar
-   if test ! -d $i
-      then echo Unable to unpack $i
-	   continue
-      else echo Package $i unpacked
-   fi
-
-   # It is now unpacked. Build it
-   cd $i
-   binsizes big
-   if [ -f build.minix ]
-   then	sh build.minix >>$ORIG_DIR/Log 2>&1
-	r=$?
-   else	sh build >>$ORIG_DIR/Log 2>&1
-	r=$?
-   fi
-   if [ $r -eq 0 ] 
-      then echo Package $i installed
-      else echo Package $i failed to install, see Log
-   fi
-   if [ -f .postinstall ]
-   then	echo Running postinstall script.
-	sh -e .postinstall
-   fi
-   binsizes normal
-
-   # Clean up
-   cd ..
-   rm -f $i.tar $TARBZ # Remove whatever is still lying around
-done
-
Index: trunk/minix/commands/scripts/floppysetup.sh
===================================================================
--- trunk/minix/commands/scripts/floppysetup.sh	(revision 9)
+++ 	(revision )
@@ -1,408 +1,0 @@
-#!/bin/sh
-#
-#	setup 4.1 - install a Minix distribution	Author: Kees J. Bot
-#								20 Dec 1994
-
-PATH=/bin:/usr/bin
-export PATH
-
-usage()
-{
-    cat >&2 <<'EOF'
-Usage:	setup		# Install a skeleton system on the hard disk.
-	setup /usr	# Install the rest of the system (binaries or sources).
-
-	# To install from other things then floppies:
-
-	urlget http://... | setup /usr		# Read from a web site.
-	urlget ftp://... | setup /usr		# Read from an FTP site.
-	mtools copy c0d0p0:... - | setup /usr	# Read from the C: drive.
-	dosread c0d0p0 ... | setup /usr		# Likewise if no mtools.
-EOF
-    exit 1
-}
-
-# No options.
-while getopts '' opt; do usage; done
-shift `expr $OPTIND - 1`
-
-# Installing a floppy set?
-case $# in
-0)  # No, we're installing a skeleton system on the hard disk.
-    ;;
-1)
-    cd "$1" || exit
-
-    # Annoying message still there?
-    grep "'setup /usr'" /etc/issue >/dev/null 2>&1 && rm -f /etc/issue
-
-    if [ -t 0 ]
-    then
-	size=bad
-	while [ "$size" = bad ]
-	do
-	    echo -n "\
-What is the size of the images on the diskettes? [all] "; read size
-
-	    case $size in
-	    ''|360|720|1200|1440)
-		;;
-	    *)	echo "Sorry, I don't believe \"$size\", try again." >&2
-		size=bad
-	    esac
-	done
-
-	drive=
-	while [ -z "$drive" ]
-	do
-	    echo -n "What floppy drive to use? [0] "; read drive
-
-	    case $drive in
-	    '')	drive=0
-		;;
-	    [01])
-		;;
-	    *)	echo "It must be 0 or 1, not \"$drive\"."
-		drive=
-	    esac
-	done
-
-	vol -r $size /dev/fd$drive | uncompress | tar xvfp -
-    else
-	# Standard input is where we can get our files from.
-	uncompress | tar xvfp -
-    fi
-
-    echo Done.
-    exit
-    ;;
-*)
-    usage
-esac
-
-# Installing Minix on the hard disk.
-# Must be in / or we can't mount or umount.
-if [ ! -f /CD ]
-then
-	case "`pwd`" in
-	/?*)
-	    echo "Please type 'cd /' first, you are locking up `pwd`" >&2	
-	    exit 1
-	esac
-fi
-
-case "$0" in
-/tmp/*)
-    rm -f "$0"
-    ;;
-*)  cp -p "$0" /tmp/setup
-    exec /tmp/setup
-esac
-
-# Find out what we are running from.
-exec 9<&0 </etc/mtab			# Mounted file table.
-read thisroot rest			# Current root (/dev/ram or /dev/fd?)
-read fdusr rest				# USR (/dev/fd? or /dev/fd?p2)
-exec 0<&9 9<&-
-
-# What do we know about ROOT?
-case $thisroot:$fdusr in
-/dev/ram:/dev/fd0p2)	fdroot=/dev/fd0		# Combined ROOT+USR in drive 0
-			;;
-/dev/ram:/dev/fd1p2)	fdroot=/dev/fd1		# Combined ROOT+USR in drive 1
-			;;
-/dev/ram:/dev/fd*)	fdroot=unknown		# ROOT is some other floppy
-			;;
-/dev/fd*:/dev/fd*)	fdroot=$thisroot	# ROOT is mounted directly
-			;;
-*)			fdroot=$thisroot	# ?
-    if [ -f /CD ]
-    then
-    	:
-    else
-	    echo -n "\
-It looks like Minix has been installed on disk already.  Are you sure you
-know what you are doing? [n] "
-	    read yn
-	    case "$yn" in
-	    [yY]*|sure)	;;
-	    *)	exit
-	    esac
-     fi
-esac
-
-echo -n "\
-This is the Minix installation script.
-
-Note 1: If the screen blanks suddenly then hit CTRL+F3 to select \"software
-	scrolling\".
-
-Note 2: If things go wrong then hit DEL and start over.
-
-Note 3: The installation procedure is described in the manual page
-	usage(8).  It will be hard without it.
-
-Note 4: Some questions have default answers, like this: [y]
-	Simply hit RETURN (or ENTER) if you want to choose that answer.
-
-Note 5: If you see a colon (:) then you should hit RETURN to continue.
-:"
-read ret
-
-echo "
-What type of keyboard do you have?  You can choose one of:
-"
-ls -C /usr/lib/keymaps | sed -e 's/\.map//g' -e 's/^/    /'
-echo -n "
-Keyboard type? [us-std] "; read keymap
-test -n "$keymap" && loadkeys "/usr/lib/keymaps/$keymap.map"
-
-echo -n "
-Minix needs one primary partition of at about 210 MB for a full install
-with sources.  (The full install also fits in about 180 MB, but it
-needs more if fully recompiled.  Add more space to taste.)
-
-  * Minix currently only understands filesystems up to 4GB, so don't make
-    it bigger.
-
-If there is no free space on your disk then you have to back up one of the
-other partitions, shrink, and reinstall.  See the appropriate manuals of the
-the operating systems currently installed.  Restart your Minix installation
-after you have made space.
-
-To make this partition you will be put in the editor \"part\".  Follow the
-advice under the '!' key to make a new partition of type MINIX.  Do not
-touch an existing partition unless you know precisely what you are doing!
-Please note the name of the partition (e.g. c0d0p1, c0d1p3, c1d1p0) you
-make.  (See the devices section in usage(8) on Minix device names.)
-:"
-read ret
-
-primary=
-while [ -z "$primary" ]
-do
-    part || exit
-
-    echo -n "
-Please finish the name of the primary partition you have created:
-(Just type RETURN if you want to rerun \"part\")                   /dev/"
-    read primary
-done
-
-root=${primary}s0
-swap=${primary}s1
-usr=${primary}s2
-
-hex2int()
-{
-    # Translate hexadecimal to integer.
-    local h d i
-
-    h=$1
-    i=0
-    while [ -n "$h" ]
-    do
-	d=$(expr $h : '\(.\)')
-	h=$(expr $h : '.\(.*\)')
-	d=$(expr \( 0123456789ABCDEF : ".*$d" \) - 1)
-	i=$(expr $i \* 16 + $d)
-    done
-    echo $i
-}
-
-# Ask user about networking
-echo ""
-echo "Minix currently supports the Intel Pro/100 and RealTek 8139 "
-echo "Ethernet cards. Please choose: "
-echo ""
-echo "0. No Ethernet card (no networking)"
-echo "1. An Intel Pro/100 Ethernet card is installed"
-echo "2. A Realtek 8139 Ethernet card is installed"
-echo "3. A different Ethernet card is installed (no networking)"
-echo ""
-echo "You can always change your mind after the install."
-echo ""
-echo "Choice? "
-read eth
-driver=""
-inetparams=""
-case "$eth" in
-	1)	driver=FXP;	inetparams="servers=inet;" ;;
-	2)	driver=RTL8139;	inetparams="servers=inet;" ;;
-esac
-
-# Compute the amount of memory available to Minix.
-memsize=0
-ifs="$IFS"
-IFS=','
-set -- $(sysenv memory)
-IFS="$ifs"
-
-for mem
-do
-    mem=$(expr $mem : '.*:\(.*\)')
-    memsize=$(expr $memsize + $(hex2int $mem) / 1024)
-done
-
-# Compute an advised swap size.
-swapadv=0
-case `arch` in
-i86)
-    test $memsize -lt 4096 && swapadv=$(expr 4096 - $memsize)
-    ;;
-*)  test $memsize -lt 6144 && swapadv=$(expr 6144 - $memsize)
-esac
-
-echo -n "
-How much swap space would you like?  Swapspace is only needed if this
-system is memory starved, like a 16-bit system with less then 2M, or a
-32-bit system with less then 4M.  Minix swapping isn't very good yet, so
-there is no need for it otherwise.
-		    Size in kilobytes? [$swapadv] "
-swapsize=
-read swapsize
-test -z "$swapsize" && swapsize=$swapadv
-
-echo -n "
-You have created a partition named:	/dev/$primary
-The following subpartitions are about to be created on /dev/$primary:
-
-    Root subpartition:	/dev/$root	16 MB
-    Swap subpartition:	/dev/$swap	$swapsize kb
-    /usr subpartition:	/dev/$usr	rest of $primary
-
-Hit return if everything looks fine, or hit DEL to bail out if you want to
-think it over.  The next step will destroy /dev/$primary.
-:"
-read ret
-					# Secondary master bootstrap.
-installboot -m /dev/$primary /usr/mdec/masterboot >/dev/null || exit
-
-					# Partition the primary.
-p3=0:0
-test "$swapsize" -gt 0 && p3=81:`expr $swapsize \* 2`
-partition /dev/$primary 1 81:32768* $p3 81:0+ || exit
-
-if [ "$swapsize" -gt 0 ]
-then
-    # We must have that swap, now!
-    mkswap -f /dev/$swap || exit
-    mount -s /dev/$swap || exit
-else
-    # Forget about swap.
-    swap=
-fi
-
-echo "
-Migrating to disk...
-"
-
-mkfs /dev/$usr
-echo "\
-Scanning /dev/$usr for bad blocks.  (Hit DEL to stop the scan if you are
-absolutely sure that there can not be any bad blocks.  Otherwise just wait.)"
-trap ': nothing' 2
-readall -b /dev/$usr | sh
-sleep 2
-trap 2
-
-mount /dev/$usr /mnt || exit		# Mount the intended /usr.
-
-cpdir -v /usr /mnt || exit		# Copy the usr floppy.
-
-umount /dev/$usr || exit		# Unmount the intended /usr.
-
-umount $fdusr				# Unmount the /usr floppy.
-
-mount /dev/$usr /usr || exit		# A new /usr
-
-if [ $fdroot = unknown ]
-then
-    echo "
-By now the floppy USR has been copied to /dev/$usr, and it is now in use as
-/usr.  Please insert the installation ROOT floppy in a floppy drive."
-
-    drive=
-    while [ -z "$drive" ]
-    do
-	echo -n "What floppy drive is it in? [0] "; read drive
-
-	case $drive in
-	'')	drive=0
-	    ;;
-	[01])
-	    ;;
-	*)	echo "It must be 0 or 1, not \"$drive\"."
-	    drive=
-	esac
-    done
-    fdroot=/dev/fd$drive
-fi
-
-echo "
-Copying $fdroot to /dev/$root
-"
-
-mkfs /dev/$root || exit
-mount /dev/$root /mnt || exit
-if [ -d /boot ]
-then
-    # Running from the floppy itself (or installation CD).
-    cpdir -vx / /mnt || exit
-    chmod 555 /mnt/usr
-else
-    # Running from the RAM disk, root image is on a floppy.
-    mount $fdroot /root || exit
-    cpdir -v /root /mnt || exit
-    umount $fdroot || exit
-    cpdir -f /dev /mnt/dev		# Copy any extra MAKEDEV'd devices
-fi
-
-# CD remnants that aren't for the installed system
-rm /mnt/etc/issue /mnt/CD 2>/dev/null
-					# Change /etc/fstab.
-echo >/mnt/etc/fstab "\
-# Poor man's File System Table.
-
-root=/dev/$root
-${swap:+swap=/dev/$swap}
-usr=/dev/$usr"
-
-					# National keyboard map.
-test -n "$keymap" && cp -p "/usr/lib/keymaps/$keymap.map" /mnt/etc/keymap
-
-# Set inet.conf to correct driver
-if [ -n "$driver" ]
-then	echo "eth0 $driver 0 { default; };" >/mnt/etc/inet.conf
-fi
-
-umount /dev/$root || exit		# Unmount the new root.
-
-# Compute size of the second level file block cache.
-case `arch` in
-i86)
-    cache=`expr "0$memsize" - 1024`
-    test $cache -lt 32 && cache=0
-    test $cache -gt 512 && cache=512
-    ;;
-*)
-    cache=`expr "0$memsize" - 2560`
-    test $cache -lt 64 && cache=0
-    test $cache -gt 1024 && cache=1024
-esac
-echo "Second level file system block cache set to $cache kb."
-if [ $cache -eq 0 ]; then cache=; else cache="ramsize=$cache"; fi
-
-					# Make bootable.
-installboot -d /dev/$root /usr/mdec/bootblock /boot/boot >/dev/null || exit
-edparams /dev/$root "rootdev=$root; ramimagedev=$root; $cache; $inetparams; save" || exit
-pfile="/usr/src/tools/fdbootparams"
-echo "Remembering boot parameters in ${pfile}."
-echo "rootdev=$root; ramimagedev=$root; $cache; save" >$pfile || exit
-sync
-
-echo "
-Please type 'halt' to exit Minix.
-You can type 'boot $primary' to try the newly installed Minix system.  See
-\"TESTING\" in the usage manual."
-
Index: trunk/minix/commands/scripts/getpack.sh
===================================================================
--- trunk/minix/commands/scripts/getpack.sh	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#!/bin/sh
-
-if [ $# -ne 1 ]
-then	echo "Usage: $0 <url>"
-	exit 1
-fi
-
-if [ -z "$HOME" ]
-then	echo "Where is your \$HOME? "
-	exit 1
-fi
-
-if [ ! -d "$HOME" ]
-then	echo "Where is your \$HOME ($HOME) ? "
-	exit 1
-fi
-
-tmpdir=$HOME/getpack$$
-tmpfile=package
-tmpfiletar=$tmpfile.tar
-tmpfiletargz=$tmpfile.tar.gz
-
-mkdir -m 700 $tmpdir || exit 1
-cd $tmpdir || exit 1
-
-urlget "$1" >$tmpfiletargz
-
-gzip -d $tmpfiletargz || exit 1
-tar xf $tmpfiletar || exit 1
-make && make install && echo "Ok."
Index: trunk/minix/commands/scripts/makewhatis.sh
===================================================================
--- trunk/minix/commands/scripts/makewhatis.sh	(revision 9)
+++ 	(revision )
@@ -1,85 +1,0 @@
-#!/bin/sh
-#
-# makewhatis 2.0 - make whatis(5) database.	Author: Kees J. Bot.
-#
-# Make the whatis database of a man directory from the manual pages.
-
-case $1 in
--*)	set -$- x x
-esac
-
-case $# in
-1)	;;
-*)	echo "Usage: $0 <mandir>" >&2
-	exit 1
-esac
-
-cd $1 || exit
-
-{
-	# First pass, gathering the .SH NAME lines in various forms.
-
-	# First the man[1-8] directories, the titles are under the .SH NAME
-	# section header.
-	for chap in 1 2 3 4 5 6 7 8
-	do
-		for page in man$chap/*.$chap
-		do
-		   if	test -f "$page"; then	# (Old sh barfs on 'continue')
-
-			sed -e 's/	/ /g
-				s/"NAME"/NAME/g
-				/^\.SH NAME/,/^\.SH /!d
-				/^\.SH /d
-				s/\\f.//g	# should not be needed
-				s/\\s[+-].//g
-				s/\\s.//g
-				s/\\//
-				'"s/ - / ($chap) - /" < "$page"
-		   fi
-		done
-	done
-
-	# The Minix "Book style" documents, look for .CD
-	for page in man9/*.9
-	do
-	   if	test -f "$page"; then
-
-		sed -e 's/	/ /g
-			/^\.CD /!d
-			s/^[^"]*"//
-			s/"[^"]*$//
-			s/\\(en/-/g
-			s/\\f.//g
-			s/\\s[+-].//g
-			s/\\s.//g
-			s/\\\*(M2/MINIX/g
-			s/\\//
-			'"s/ - / (9) - /" < "$page"
-	   fi
-	done
-
-	# Some people throw extra flat text files into the cat[1-9]
-	# directories.  It would be nice if man(1) can find them.
-	trap 'rm -f /tmp/mkw[cmn]$$; exit 1' 1 2 15
-	for chap in 1 2 3 4 5 6 7 8 9
-	do
-		ls cat$chap 2>/dev/null >/tmp/mkwc$$
-		ls man$chap 2>/dev/null >/tmp/mkwm$$
-		comm -23 /tmp/mkwc$$ /tmp/mkwm$$ >/tmp/mkwn$$
-		sed -e "/.*\\.$chap\$/!d
-			s/\\.$chap\$/ ($chap) - ???/" < /tmp/mkwn$$
-	done
-	rm -f /tmp/mkw[cmn]$$
-} | {
-	# Second pass, remove empty lines, leading and trailing spaces,
-	# multiple spaces to one space, remove lines without a dash.
-	sed -e 's/  */ /g
-		s/^ //
-		s/ $//
-		/^$/d
-		/-/!d'
-} | {
-	# Third pass, sort by section.
-	sort -t'(' +1 -o whatis
-}
Index: trunk/minix/commands/scripts/mkdep.sh
===================================================================
--- trunk/minix/commands/scripts/mkdep.sh	(revision 9)
+++ 	(revision )
@@ -1,55 +1,0 @@
-#!/bin/sh
-#
-#	mkdep 1.1 - Generate Makefile dependencies.	Author: Kees J. Bot
-#
-# Does what 'cc -M' should do, but no compiler gets it right, they all
-# strip the leading path of the '.o' file.)
-#
-# Added option to generate .depend files in subdirectories of given dir.
-# 							Jorrit N. Herder
-
-case $# in
-
-# Display help ...
-0)	
-	echo "Usage: mkdep 'cpp command' file ..." >&2
-	echo "       mkdep directory" >&2
-;;
-
-# Create .depend files ...
-1)
-	echo "Creating .depend files in $1"
-	for dir in `find $1 -type d ! -name CVS`
-	do
-		touch $dir/.depend
-	done
-
-;;
-
-
-# Get dependencies ... 
-*)
-	cpp="$1"; shift
-
-	for f
-	do
-		: < "$f" || exit
-
-		o=`expr "$f" : '\(.*\)\..*'`.o
-
-		echo
-
-		$cpp "$f" | \
-			sed -e '/^#/!d
-				s/.*"\(.*\)".*/\1/
-				s:^\./::' \
-			    -e "s:^:$o\:	:" | \
-			sort -u
-	done
-esac
-
-exit 0
-
-#
-# $PchId: mkdep.sh,v 1.3 1998/07/23 21:24:38 philip Exp $
-#
Index: trunk/minix/commands/scripts/mkdist.sh
===================================================================
--- trunk/minix/commands/scripts/mkdist.sh	(revision 9)
+++ 	(revision )
@@ -1,301 +1,0 @@
-#!/bin/sh
-#
-#	mkdist 3.6 - Make a Minix distribution		Author: Kees J. Bot
-#								20 Dec 1994
-
-system=`uname`
-
-usage()
-{
-    case $system in
-    Minix)	echo "Usage: $0" >&2
-	;;
-    Minix-vmd)	echo "Usage: $0 base-path root-device usr-device" >&2
-    esac
-    exit 1
-}
-
-# No options.
-while getopts '' opt; do usage; done
-shift `expr $OPTIND - 1`
-
-case $system:$# in
-Minix:0)
-    # Interactive.
-    case "$0" in
-    /tmp/*)
-	rm -f "$0"
-	;;
-    *)  # Move out of /usr.
-	cp -p "$0" /tmp/mkdist
-	exec /tmp/mkdist
-    esac
-    std=t
-    base=/
-    export PATH=/bin:/usr/bin
-    ;;
-Minix-vmd:3)
-    # Called by an external script from Minix-vmd to help make a distribution.
-    std=
-    base="$1" rootdev="$2" usrdev="$3"
-esac
-
-usrlist="
-bin
-bin/MAKEDEV
-bin/arch
-bin/badblocks
-bin/chmod
-bin/clone
-bin/compress
-bin/cp
-bin/cpdir
-bin/df
-`test -f $base/usr/bin/mtools || echo bin/dosdir bin/dosread bin/doswrite`
-`test -f $base/usr/bin/mtools && echo bin/mtools`
-bin/edparams
-bin/getty
-bin/grep
-bin/installboot
-bin/isodir
-bin/isoinfo
-bin/isoread
-bin/kill
-bin/ln
-bin/login
-bin/ls
-bin/mined
-bin/mkdir
-bin/mkfs
-bin/mknod
-bin/mkswap
-bin/mv
-bin/od
-bin/part
-bin/partition
-bin/readall
-bin/repartition
-bin/rm
-bin/rmdir
-bin/sed
-bin/setup
-bin/shutdown
-bin/sleep
-bin/sort
-bin/stty
-bin/sysenv
-bin/tar
-bin/uname
-bin/uncompress
-bin/update
-bin/vol
-bin/zcat
-etc
-etc/rc
-lib
-lib/keymaps
-`cd $base/usr && echo lib/keymaps/*`
-lib/pwdauth
-mdec
-mdec/boot
-mdec/bootblock
-mdec/jumpboot
-mdec/masterboot
-tmp
-"
-
-if [ "$std" ]
-then
-    # Find the root device, and the real root device.
-    . /etc/fstab
-    realroot=`printroot -r`
-    if [ $realroot = $root ]
-    then
-	rootdir=/
-    else
-	umount $root >/dev/null 2>&1
-	mount $root /root || exit
-	rootdir=/root
-    fi
-
-    echo -n "
-The installation root and /usr can be put on either one diskette of at least
-1.2 Mb, or on two diskettes of at least 720 kb.
-
-Do you want to use a single diskette of at least 1.2 Mb? [y] "; read single
-
-    case $single in
-    ''|[yY]*|sure)
-	single=t
-	;;
-    *)  single=
-    esac
-
-    echo -n "Which drive to use? [0] "; read drive
-
-    case $drive in
-    '') drive=0
-	;;
-    [01])	;;
-    *)  echo "Please type '0' or '1'" >&2; exit 1
-    esac
-
-    if [ "$single" ]
-    then
-	echo -n "Insert the root+usr diskette in drive $drive and hit RETURN"
-    else
-	echo -n "Insert the root diskette in drive $drive and hit RETURN"
-    fi
-    read ret
-
-    rootdev=/dev/fd$drive
-    v1=-1
-else
-    rootdir=$base
-    v1='-t 1'
-fi
-
-umount $rootdev 2>/dev/null
-if [ "$std" ]
-then
-    umount ${rootdev}p1 2>/dev/null
-    umount ${rootdev}p2 2>/dev/null
-else
-    umount $rootdir/minix 2>/dev/null
-    umount $rootdir/etc 2>/dev/null
-fi
-mkfs $v1 -i 272 $rootdev 480 || exit
-mount $rootdev /mnt || exit
-if [ "$std" ]
-then
-    partition -mf $rootdev 0 81:960 81:240 81:240 >/dev/null || exit
-    repartition $rootdev >/dev/null || exit
-    mkfs $v1 ${rootdev}p1 || exit
-    mkfs $v1 ${rootdev}p2 || exit
-    mount ${rootdev}p1 $rootdir/minix || exit	# Hide /minix and /etc
-    mount ${rootdev}p2 $rootdir/etc 2>/dev/null # (complains about /etc/mtab)
-else
-    install -d /tmp/.minix || exit
-    install -d /tmp/.etc || exit		# Hide /minix and /etc
-    mount -t lo /tmp/.minix $rootdir/minix || exit
-    mount -t lo /tmp/.etc $rootdir/etc || exit
-fi
-cpdir -vx $rootdir /mnt || exit
-install -d -o 0 -g 0 -m 755 /mnt || exit
-install -d -o 0 -g 0 -m 555 /mnt/root || exit
-install -d -o 0 -g 0 -m 555 /mnt/mnt || exit
-install -d -o 0 -g 0 -m 555 /mnt/usr || exit
-if [ "$std" ]
-then
-    umount ${rootdev}p2 2>/dev/null	# Unhide /etc
-    umount ${rootdev}p1 || exit		# Unhide /minix
-else
-    umount $rootdir/etc || exit		# Unhide /etc
-    umount $rootdir/minix || exit	# Unhide /minix
-fi
-install -d -o 2 -g 0 -m 755 /mnt/minix || exit
-install -d -o 2 -g 0 -m 755 /mnt/etc || exit
-set `ls -t $rootdir/minix`	# Install the latest kernel
-install -c $rootdir/minix/$1 /mnt/minix/`echo $1 | sed 's/r[0-9]*$//` || exit
-cpdir -v $base/usr/src/etc /mnt/etc || exit	# Install a fresh /etc
-chown -R 0:0 /mnt/etc				# Patch up owner and mode
-chmod 600 /mnt/etc/shadow
-
-# Change /etc/fstab.
-echo >/mnt/etc/fstab "\
-# Poor man's File System Table.
-
-root=unknown
-usr=unknown"
-
-# How to install?
-echo >/mnt/etc/issue "\
-
-Login as root and run 'setup' to install Minix."
-
-umount $rootdev || exit
-test "$std" && umount $root 2>/dev/null
-installboot -d $rootdev $base/usr/mdec/bootblock boot >/dev/null
-
-# Partition the root floppy whether necessary or not.  (Two images can be
-# concatenated, or a combined image can be split later.)
-partition -mf $rootdev 0 81:960 0:0 81:1440 81:480 >/dev/null || exit
-
-if [ "$std" ]
-then
-    if [ "$single" ]
-    then
-	repartition $rootdev >/dev/null
-	usrdev=${rootdev}p2
-    else
-	echo -n "Insert the usr diskette in drive $drive and hit RETURN"
-	read ret
-	usrdev=$rootdev
-    fi
-fi
-
-mkfs $v1 -i 96 $usrdev 720 || exit
-mount $usrdev /mnt || exit
-install -d -o 0 -g 0 -m 755 /mnt || exit
-(cd $base/usr && exec tar cfD - $usrlist) | (cd /mnt && exec tar xvfp -) || exit
-umount $usrdev || exit
-
-# Put a "boot the other drive" bootblock on the /usr floppy.
-installboot -m $usrdev /usr/mdec/masterboot >/dev/null
-
-# We're done for Minix-vmd here, it has its own ideas on how to package /usr.
-test "$std" || exit 0
-
-# Guess the size of /usr in compressed form.  Assume compression down to 60%
-# of the original size.  Use "disk megabytes" of 1000*1024 for a safe guess.
-set -$- `df | grep "^$usr"`
-size=`expr \\( $4 \\* 6 / 10 + 999 \\) / 1000`
-
-echo -n "
-You now need enough diskettes to hold /usr in compressed form, close to
-$size Mb total.  "
-
-size=
-while [ -z "$size" ]
-do
-    if [ "$single" ]; then defsize=1440; else defsize=720; fi
-
-    echo -n "What is the size of the diskettes? [$defsize] "; read size
-
-    case $size in
-    '')	size=$defsize
-	;;
-    360|720|1200|1440)
-	;;
-    *)	echo "Sorry, I don't believe \"$size\", try again." >&2
-	size=
-    esac
-done
-
-drive=
-while [ -z "$drive" ]
-do
-    echo -n "What floppy drive to use? [0] "; read drive
-
-    case $drive in
-    '')	drive=0
-	;;
-    [01])
-	;;
-    *)	echo "It must be 0 or 1, not \"$drive\"."
-	drive=
-    esac
-done
-
-echo "
-Enter the floppies in drive $drive when asked to.  Mark them with the volume
-numbers!
-"
-sleep 2
-
-if [ `arch` = i86 ]; then bits=13; else bits=16; fi
-
->/tmp/DONE
-cd /usr && tar cvf - . /tmp/DONE \
-    | compress -b$bits | vol -w $size /dev/fd$drive &&
-echo Done.
Index: trunk/minix/commands/scripts/packit.sh
===================================================================
--- trunk/minix/commands/scripts/packit.sh	(revision 9)
+++ 	(revision )
@@ -1,52 +1,0 @@
-#!/bin/sh
-
-PI=.postinstall
-TMP=/usr/tmp
-PATH=/bin:/usr/bin:/usr/local/bin
-
-if [ "$#" -ne 1  ]
-then
-	echo "Usage: $0 <package file>"
-	exit 1
-fi
-
-dir=`pwd`
-if [ "$1" = "-" ]
-then f=""
-else	case "$1" in
-	/*) f="$1" ;;
-	*) f="$dir/$1" ;;
-	esac
-fi
-
-cd $TMP
-rm -f $PI
-
-if [ -f $PI ]
-then	echo "$PI is in $TMP, please remove it first."
-	exit 1
-fi
-
-if [ ! -f $f ]
-then	echo "Couldn't find package $f."
-	exit 1
-fi
-
-# can we execute bunzip2?
-if bunzip2 --help 2>&1 | grep usage >/dev/null
-then	BUNZIP2=bunzip2
-else	BUNZIP2=smallbunzip2
-fi
-
-cat $f | $BUNZIP2 | pax -r -p e
-if [ -f $PI ]
-then
-	sh -e $PI
-	rm -f $PI
-fi
-
-for d in /usr/man /usr/local/man /usr/gnu/man /usr/X11R6/man
-do	if [ -d "$d" ]
-	then makewhatis $d
-	fi
-done
Index: trunk/minix/commands/scripts/packman.sh
===================================================================
--- trunk/minix/commands/scripts/packman.sh	(revision 9)
+++ 	(revision )
@@ -1,241 +1,0 @@
-#!/bin/sh
-
-RC=/usr/etc/rc.package
-CDDIR=PACKAGES
-CDMP=/mnt
-CDPACK=${CDMP}/install/packages
-CDSRC=${CDMP}/install/package-sources
-SRC=/usr/src/commands
-LISTFILE=/etc/packages
-LISTURL=http://www.minix3.org/packages/List
-TMPDIR=/usr/tmp/packages
-mkdir -p $TMPDIR
-URL1=http://www.minix3.org/packages
-URL2=http://www.minix3.org/beta_packages
-SRCURL1=http://www.minix3.org/software
-SRCURL2=http://www.minix3.org/beta_software
-
-# can we execute bunzip2?
-if bunzip2 --help 2>&1 | grep usage >/dev/null
-then    BUNZIP2=bunzip2 
-else    BUNZIP2=smallbunzip2
-fi
-
-if id | fgrep "uid=0(" >/dev/null
-then	:
-else	echo "Please run $0 as root."
-	exit 1
-fi
-
-chmod 700 $TMPDIR
-
-if [ -f "$RC" ]
-then	. "$RC"
-fi
-
-cd /
-
-cdpackages=""
-if [ -n "$cddrive" ]
-then	pack=${cddrive}p2
-	umount $pack >/dev/null 2>&1 || true
-	if mount -r $pack $CDMP
-	then	fn="$CDPACK/List"
-		cdpackages=$fn
-		if [ ! -f $cdpackages ]
-		then	cdpackages=""
-			echo "No package list found on CD in $fn."
-		fi
-	else	echo "CD mount failed."
-	fi
-else	echo "Don't know where the install CD is. You can set it in $RC."
-fi
-
-# For local testing
-#cdpackages=/usr/bigports/Packages/List
-#CDPACK=/usr/bigports/Packages
-#CDSRC=/usr/bigports/Sources
-
-if [ "$cdpackages" = "" ]
-then	echo "Skipping CD packages."
-else	cont=y
-	while [ $cont = y ]
-	do	n="`wc -l $cdpackages | awk '{ print $1 }'`"
-		sourcef=$CDSRC/SizeMB
-		binf=$CDPACK/SizeMB
-		if [ -f $binf -a -f $sourcef ]
-		then	sourcemb="`cat $sourcef`"
-			binmb="`cat $binf`"
-			sourcesize=" (`expr $binmb + $sourcemb` MB uncompressed)"
-		else	sourcesize=""
-		fi
-		if [ -f $binf ]
-		then	binmb="`cat $binf`"
-			binsize=" ($binmb MB uncompressed)"
-		else	binsize=""
-		fi
-
-		echo "There are $n CD packages."
-		echo "Please choose:"
-		echo " 1  Install all $n binary packages$binsize from CD"
-		echo " 2  Install all $n binary packages + sources from CD$sourcesize"
-		echo " 3  Display the list of packages on CD"
-		echo " 4  Let me select individual packages to install from CD or network."
-		echo " 5  Exit."
-		echo -n "Choice: [4] "
-		read in
-		case "$in" in
-		1|2)
-			cd $CDPACK || exit
-			echo " * Installing binaries .."
-			for f in *.tar.bz2
-			do	echo "Installing $f binaries .."
-				packit $f && echo Installed $f
-			done
-			if [ "$in" = 2 ]
-			then
-				cd $SRC || exit
-				echo " * Installing sources in $SRC .."
-				for f in $CDSRC/*.tar.bz2
-				do	echo "$f .."
-					$BUNZIP2 -dc $f | tar xf - 
-				done
-			fi
-			;;
-		3)
-			( echo "Displaying list; press q to leave it, space for more."
-			  cat "$CDPACK/List" | awk -F'|' '{ printf "%-20s %s\n", $1, $2 }'
-			) | more
-			;;
-		""|4)
-			echo "Ok, showing packages to install." ; echo
-			cont=n
-			;;
-		5)
-			exit 0
-			;;
-		esac
-	done
-	echo -n "Press RETURN to continue .. "
-	read xyzzy
-fi
-
-TMPF=$TMPDIR/.list.$$
-rm -f $TMPF
-rm -f $TMPDIR/.*	# Remove any remaining .postinstall script or .list*
-
-netpackages=""
-if ( : </dev/tcp ) 2>/dev/null
-then	if [ -f $LISTFILE ]
-	then	echo -n "Update package list from network? (y/N) "
-		read y
-	else	echo "No package list found - retrieving initial version."
-		y=y
-	fi
-	if [ "$y" = y -o "$y" = Y ]
-	then	echo "Fetching package list."
-		urlget $LISTURL >$TMPF && mv $TMPF $LISTFILE || echo "Update not successful."
-	fi
-	netpackages=$LISTFILE
-	if [ ! -f "$netpackages" -o ! `cat "$netpackages" 2>/dev/null | wc -l | awk '{ print $1 }'` -gt 1 ]
-	then	netpackages=""
-	fi
-else	echo "No working network detected."
-fi
-
-if [ "$netpackages" = "" ]
-then	echo "Skipping network packages."
-	if [ "$cdpackages" = "" ]
-	then	echo "No packages found."
-		exit 1
-	fi
-fi
-
-cont=y
-while [ "$cont" = y ]
-do	cd $TMPDIR
-	echo ""
-	echo "Showing you a list of packages using more. Press q when"
-	echo "you want to leave the list."
-	echo -n "Press RETURN to continue.."
-	read xyzzy
-	echo "Package list:"
-	(	echo "No.|Source|Package|Description"
-		(
-		if [ -f "$netpackages" ]
-		then	sed <$netpackages 's/^/net\|/'
-		fi
-		if [ -f "$cdpackages" ]
-		then	sed <$cdpackages 's/^/cdrom\|/'
-		fi
-		) | sort -t'|' +1 | awk '{ n++; printf "%d|%s\n", n, $0 }' 
-	) >$TMPF
-	awk -F'|' <$TMPF '{ printf "%3s %-6s %-15s %s\n", $1, $2, $3, $4 }' | more
-	echo -n "Package to install? [RETURN for none] "
-	read packno
-	ok=y
-	pat="^$packno|"
-	if [ "`grep $pat $TMPF | wc -l | awk '{ print $1 }'`" -ne 1 ]
-	then	if [ "$packno" ]
-		then	echo "Wrong package number."
-		fi
-		ok=n
-	fi
-	if [ $ok = y ]
-	then	source="`grep $pat $TMPF | awk -F'|' '{ print $2 }'`"
-		packagename="`grep $pat $TMPF | awk -F'|' '{ print $3 }'`"
-		file=$packagename.tar.bz2
-		case $source in
-		net*)	echo -n "Get source of $packagename? (y/N) "
-			read src
-			echo "Retrieving binary from primary location into $TMPDIR .."
-			srcurl=""
-			if urlget $URL1/$file >$file
-			then	echo "Retrieved ok. Installing .."
-				packit $file && echo Installed ok.
-				srcurl=$SRCURL1/$file
-			else	echo "Retrying from Beta binary location.."
-				if urlget $URL2/$file >$file
-				then	echo "Retrieved ok. Installing .."
-					packit $file  && echo Installed ok.
-					srcurl=$SRCURL2/$file
-				else echo "Retrieval failed."
-				fi
-			fi
-			if [ "$src" = y -o "$src" = Y ]
-			then	(	cd $SRC || exit
-					srcfile=${packagename}-src.tar.bz2
-					echo "Retrieving source from $srcurl .."
-					urlget $srcurl >$srcfile || exit
-					echo "Source retrieved in $SRC/$srcfile."
-					$BUNZIP2 -dc $srcfile | tar xf - >/dev/null || exit
-					echo "Source unpacked in $SRC."
-				)
-			fi
-			;;
-		cdrom*)
-			if [ -f $CDPACK/$file ]
-			then	echo "Installing from $CDPACK/$file .."
-				packit $CDPACK/$file
-			else	echo "$CDPACK/$file not found."
-			fi
-			srcfile=$CDSRC/${packagename}-src.tar.bz2
-			if [ -f $srcfile ]
-			then
-				echo -n "Get source of $packagename? (y/N) "
-				read src
-				if [ "$src" = y -o "$src" = Y ]
-				then	(	cd $SRC || exit
-						$BUNZIP2 -dc $srcfile | tar xf - || exit
-						echo "Source $srcfile unpacked in $SRC."
-					)
-				fi
-			else	echo "No source on CD for $packagename."
-			fi
-			;;
-		esac
-	else	cont=n
-	fi
-done
-
-rm -f $TMPDIR/.*	# Remove any remaining .postinstall script or .list*
Index: trunk/minix/commands/scripts/postinstall.sh
===================================================================
--- trunk/minix/commands/scripts/postinstall.sh	(revision 9)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#!/bin/sh
-echo -n "Would you like to install binary packages from the CD? (y/N) "
-read y
-if [ "$y" = y -o "$y" = Y ]
-then	echo "Ok, showing you a list of packages, please type y"
-	echo "for every package you want installed."
-	/usr/bin/packme
-else	echo "Ok, not installing binary packages."
-fi
-echo "Use the 'packme' command after rebooting MINIX to get another chance"
-echo "to install binary packages."
Index: trunk/minix/commands/scripts/rotate.sh
===================================================================
--- trunk/minix/commands/scripts/rotate.sh	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#!/bin/sh
-BZIP=/usr/local/bin/bzip2
-RM="rm -f"
-MV="mv -f"
-
-if [ $# -ne 2 ]
-then	echo "Usage: $0 <log> <keep>"
-	exit 1
-fi
-
-if [ ! -f "$1" ]
-then	 exit 1
-fi
-
-if [ ! -x "$BZIP" ]
-then	exit 1
-fi
-
-if [ "$2" -le 0 ]
-then	echo "Keep at least 1 copy please."
-	exit 1
-fi
-
-k="$2"
-$RM "$1.$k" 2>/dev/null || exit 1
-while [ "$k" -ge 2 ]
-do	prev="`expr $k - 1`"
-	$MV $1.$prev.bz2 $1.$k.bz2 2>/dev/null 
-	k=$prev
-done
-$BZIP -c $1 >$1.1.bz2 && : >$1
Index: trunk/minix/commands/scripts/setup.sh
===================================================================
--- trunk/minix/commands/scripts/setup.sh	(revision 9)
+++ 	(revision )
@@ -1,647 +1,0 @@
-#!/bin/sh
-#
-#	setup 4.1 - install a MINIX distribution	
-#
-# Changes:
-#    Aug     2005   robustness checks and beautifications  (Jorrit N. Herder)
-#    Jul     2005   extended with autopart and networking  (Ben Gras)
-#    Dec 20, 1994   created  (Kees J. Bot)
-#						
-
-LOCALRC=/usr/etc/rc.local
-MYLOCALRC=/mnt/etc/rc.local
-ROOTMB=16
-ROOTSECTS="`expr $ROOTMB '*' 1024 '*' 2`"
-USRKBFILE=/.usrkb
-if [ ! -f "$USRKBFILE" ]
-then	echo "Are you really running from CD?"
-	echo "No $USRKBFILE file."
-	exit 1
-fi
-USRKB="`cat /.usrkb`"
-TOTALMB="`expr 3 + $USRKB / 1024 + $ROOTMB`"
-ROOTFILES="`cat /.rootfiles`"
-USRFILES="`cat /.usrfiles`"
-EXTRASRCFILES="`cat /.extrasrcfiles`"
-EXTRASRCKB="`cat /.extrasrckb`"
-
-# Install size without extra sources (rounded up)
-NOSRCMB="`expr $TOTALMB - $EXTRASRCKB / 1024`"
-NOSRCUSRFILES="`expr $USRFILES - $EXTRASRCFILES`"
-
-if [ "$EXTRASRCKB" -lt 1 ]
-then	 
-	echo "Are you really running from CD?"
-	echo "Something wrong with the extra-source-kb on CD."
-	exit 1
-fi
-
-if [ "$EXTRASRCFILES" -lt 1 ]
-then	 
-	echo "Are you really running from CD?"
-	echo "Something wrong with the extra-source-files estimate on CD."
-	exit 1
-fi
-
-if [ "$TOTALMB" -lt 1 ]
-then	 
-	echo "Are you really running from CD?"
-	echo "Something wrong with size estimate on CD."
-	exit 1
-fi
-
-if [ "$ROOTFILES" -lt 1 ]
-then	 
-	echo "Are you really running from CD?"
-	echo "Something wrong with root files count on CD."
-	exit 1
-fi
-
-if [ "$USRFILES" -lt 1 ]
-then	 
-	echo "Are you really running from CD?"
-	echo "Something wrong with usr files count on CD."
-	exit 1
-fi
-
-PATH=/bin:/usr/bin
-export PATH
-
-
-usage()
-{
-    cat >&2 <<'EOF'
-Usage:	setup		# Install a skeleton system on the hard disk.
-	setup /usr	# Install the rest of the system (binaries or sources).
-
-	# To install from other things then floppies:
-
-	urlget http://... | setup /usr		# Read from a web site.
-	urlget ftp://... | setup /usr		# Read from an FTP site.
-	mtools copy c0d0p0:... - | setup /usr	# Read from the C: drive.
-	dosread c0d0p0 ... | setup /usr		# Likewise if no mtools.
-EOF
-    exit 1
-}
-
-warn() 
-{
-  echo -e "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b ! $1"
-}
-
-# No options.
-while getopts '' opt; do usage; done
-shift `expr $OPTIND - 1`
-
-if [ "$USER" != root ]
-then	echo "Please run setup as root."
-	exit 1
-fi
-
-# Find out what we are running from.
-exec 9<&0 </etc/mtab			# Mounted file table.
-read thisroot rest			# Current root (/dev/ram or /dev/fd?)
-read fdusr rest				# USR (/dev/fd? or /dev/fd?p2)
-exec 0<&9 9<&-
-
-# What do we know about ROOT?
-case $thisroot:$fdusr in
-/dev/ram:/dev/fd0p2)	fdroot=/dev/fd0		# Combined ROOT+USR in drive 0
-			;;
-/dev/ram:/dev/fd1p2)	fdroot=/dev/fd1		# Combined ROOT+USR in drive 1
-			;;
-/dev/ram:/dev/fd*)	fdroot=unknown		# ROOT is some other floppy
-			;;
-/dev/fd*:/dev/fd*)	fdroot=$thisroot	# ROOT is mounted directly
-			;;
-*)			fdroot=$thisroot	# ?
-esac
-
-echo -n "
-Welcome to the MINIX 3 setup script.  This script will guide you in setting up
-MINIX on your machine.  Please consult the manual for detailed instructions.
-
-Note 1: If the screen blanks, hit CTRL+F3 to select \"software scrolling\".
-Note 2: If things go wrong then hit CTRL+C to abort and start over.
-Note 3: Default answers, like [y], can simply be chosen by hitting ENTER.
-Note 4: If you see a colon (:) then you should hit ENTER to continue.
-:"
-read ret
-
-# begin Step 1
-echo ""
-echo " --- Step 1: Select keyboard type --------------------------------------"
-echo ""
-
-    echo "What type of keyboard do you have?  You can choose one of:"
-    echo ""
-    ls -C /usr/lib/keymaps | sed -e 's/\.map//g' -e 's/^/    /'
-    echo ""
-step1=""
-while [ "$step1" != ok ]
-do
-    echo -n "Keyboard type? [us-std] "; read keymap
-    test -n "$keymap" || keymap=us-std
-    if loadkeys "/usr/lib/keymaps/$keymap.map" 2>/dev/null 
-    then step1=ok 
-    else warn "invalid keyboard"
-    fi
-done
-# end Step 1
-
-# begin Step 2
-echo ""
-echo " --- Step 2: Select your Ethernet chip ---------------------------------"
-echo ""
-
-# Ask user about networking
-echo "MINIX 3 currently supports the following Ethernet cards. Please choose: "
-    echo ""
-    echo "0. No Ethernet card (no networking)"
-    echo "1. Intel Pro/100"
-    echo "2. 3Com 501 or 3Com 509 based card"
-    echo "3. Realtek 8139 based card"
-    echo "4. Realtek 8029 based card (also emulated by Qemu)"
-    echo "   Note: If you want to use this in Qemu, set 'qemu_pci=1' in the boot monitor."
-    echo "5. NE2000, 3com 503 or WD based card (also emulated by Bochs)"
-    echo "6. AMD LANCE (also emulated by VMWare)"
-    echo "7. Different Ethernet card (no networking)"
-    echo ""
-    echo "You can always change your mind after the setup."
-    echo ""
-step2=""
-while [ "$step2" != ok ]
-do
-    eth=""
-    echo -n "Ethernet card? [0] "; read eth
-    test -z $eth && eth=0
-    driver=""
-    driverargs=""
-    case "$eth" in
-        0) step2="ok"; ;;    
-	1) step2="ok";	driver=fxp;      ;;
-	2) step2="ok";	driver=dpeth;    driverargs="#dpeth_arg='DPETH0=port:irq:memory'";
-	   echo ""
-           echo "Note: After installing, edit $LOCALRC to the right configuration."
-		;;
-	3) step2="ok";	driver=rtl8139;  ;;
-	4) step2="ok";	driver=dp8390;   driverargs="dp8390_arg='DPETH0=pci'";	;;
-	5) step2="ok";	driver=dp8390;   driverargs="dp8390_arg='DPETH0=240:9'"; 
-	   echo ""
-           echo "Note: After installing, edit $LOCALRC to the right configuration."
-           echo " chose option 4, the defaults for emulation by Bochs have been set."
-		;;
-        6) driver="lance"; driverargs="lance_arg='LANCE0=on'"; step2="ok"; ;;    
-        7) step2="ok"; ;;    
-        *) warn "choose a number"
-    esac
-done
-# end Step 2
-
-# begin Step 3
-step3=""
-while [ "$step3" != ok ]
-do
-	echo ""
-	echo " --- Step 3: Select minimal or full distribution -----------------------"
-	echo ""
-	echo "You can install MINIX as (M)inimal or (F)ull. (M)inimal"
-	echo "includes only the binary system and basic system sources."
-	echo "(F)ull also includes commands sources."
-	echo ""
-	echo "Please select:"
-	echo "  (M)inimal install (only basic sources) ($NOSRCMB MB required)"
-	echo "  (F)ull install (full install) ($TOTALMB MB required)"
-	echo " "
-	echo -n "Basic (M)inimal or (F)ull install? [F] "
-	read conf
-	case "$conf" in
-	"") 	step3="ok"; nobigsource="" ;;
-	[Ff]*)	step3="ok"; nobigsource="" ;;
-	[Mm]*)	step3="ok"; nobigsource="1"; TOTALMB=$NOSRCMB; USRFILES=$NOSRCUSRFILES ;;
-	esac
-done
-# end Step 3
-
-# begin Step 4
-step4=""
-while [ "$step4" != ok ]
-do
-	echo ""
-	echo " --- Step 4: Create or select a partition for MINIX 3 -------------------"
-	echo ""
-
-    echo "Now you need to create a MINIX 3 partition on your hard disk."
-    echo "It has to have $TOTALMB MB at the very least."
-    echo "You can also select one that's already there."
-    echo " "
-    echo "If you have an existing installation, reinstalling will let you"
-    echo "keep your current partitioning and subpartitioning, and overwrite"
-    echo "everything except your s1 subpartition (/home). If you want to"
-    echo "reinstall, select your existing minix partition."
-    echo " "
-    echo "Unless you are an expert, you are advised to use the automated"
-    echo "step-by-step help in setting up."
-    echo ""
-    ok=""
-    while [ "$ok" = "" ]
-    do
-	    echo -n "Press ENTER for automatic mode, or type 'expert': "
-	    read mode
-	    if [ -z "$mode" ]; then auto="1"; ok="yes"; fi 
-	    if [ "$mode" = expert ]; then auto=""; ok="yes"; fi
-	    if [ "$ok" != yes ]; then warn "try again"; fi 
-    done
-
-	primary=
-
-	if [ -z "$auto" ]
-	then
-		# Expert mode
-		echo -n "
-MINIX needs one primary partition of $TOTALMB MB for a full install,
-plus what you want for /home.
-The maximum file system currently supported is 4 GB.
-
-If there is no free space on your disk then you have to choose an option:
-   (1) Delete one or more partitions
-   (2) Allocate an existing partition to MINIX 3
-   (3) Exit setup and shrink a partition using a different OS
-
-To make this partition you will be put in the editor \"part\".  Follow the
-advice under the '!' key to make a new partition of type MINIX.  Do not
-touch an existing partition unless you know precisely what you are doing!
-Please note the name of the partition (e.g. c0d0p1, c0d1p3, c1d1p0) you
-make.  (See the devices section in usage(8) on MINIX device names.)
-:"
-		read ret
-
-		while [ -z "$primary" ]
-		do
-		    part || exit
-
-		    echo -n "
-Please finish the name of the primary partition you have created:
-(Just type ENTER if you want to rerun \"part\")                   /dev/"
-		    read primary
-		done
-		echo ""
-		echo "This is the point of no return.  You have selected to install MINIX"
-		echo "on partition /dev/$primary.  Please confirm that you want to use this"
-		echo "selection to install MINIX."
-		echo ""
-		confirmation=""
-		while [ -z "$confirmation" -o "$confirmation" != yes -a "$confirmation" != no ]
-		do
-			echo -n "Are you sure you want to continue? Please enter 'yes' or 'no': "
-			read confirmation
-			if [ "$confirmation" = yes ]; then step4=ok; fi
-		done
-		biosdrivename="Actual BIOS device name unknown, due to expert mode."
-	else
-		if [ "$auto" = "1" ]
-		then
-			# Automatic mode
-			PF="/tmp/pf"
-			if autopart -m$TOTALMB -f$PF
-			then	if [ -s "$PF" ]
-				then
-					set `cat $PF`
-					bd="$1"
-					bdn="$2"
-					biosdrivename="Probably, the right command is \"boot $bdn\"."
-					if [ -b "/dev/$bd" ]
-					then	primary="$bd"
-					else	echo "Funny device $bd from autopart."
-					fi
-				else
-					echo "Didn't find output from autopart."
-				fi 
-			else	echo "Autopart tool failed. Trying again."
-			fi
-
-			# Reset at retries and timeouts in case autopart left
-			# them messy.
-			atnormalize
-
-			if [ -n "$primary" ]; then step4=ok; fi
-		fi
-	fi
-
-	if [ ! -b "/dev/$primary" ]
-	then	echo "/dev/$primary is not a block device."
-		step4=""
-	else
-		devsize="`devsize /dev/$primary`"
-
-		if [ "$devsize" -lt 1 ]
-		then	echo "/dev/$primary is a 0-sized device."
-			step4=""
-		fi
-	fi
-done	# while step4 != ok
-# end Step 4
-
-root=${primary}s0
-home=${primary}s1
-usr=${primary}s2
-umount /dev/$root 2>/dev/null && echo "Unmounted $root for you."
-umount /dev/$home 2>/dev/null && echo "Unmounted $home for you."
-umount /dev/$usr 2>/dev/null && echo "Unmounted $usr for you."
-
-devsizemb="`expr $devsize / 1024 / 2`"
-maxhome="`expr $devsizemb - $TOTALMB - 1`"
-
-if [ "$devsizemb" -lt "$TOTALMB" ]
-then	echo "The selected partition ($devsizemb MB) is too small."
-	echo "You'll need $TOTALMB MB at least."
-	exit 1
-fi
-
-if [ "$maxhome" -lt 1 ]
-then	echo "Note: you can't have /home with that size partition."
-	maxhome=0
-fi
-
-TMPMP=/m
-mkdir $TMPMP >/dev/null 2>&1
-
-confirm=""
-
-while [ "$confirm" = "" ]
-do
-	auto=""
-	echo ""
-echo " --- Step 5: Reinstall choice ------------------------------------------"
-	if mount -r /dev/$home $TMPMP >/dev/null 2>&1
-	then	umount /dev/$home >/dev/null 2>&1
-		echo ""
-		echo "You have selected an existing MINIX 3 partition."
-		echo "Type F for full installation (to overwrite entire partition)"
-		echo "Type R for a reinstallation (existing /home will not be affected)"
-		echo ""
-		echo -n "(F)ull or (R)einstall? [R] "
-		read conf
-		case "$conf" in
-		"") 	confirm="ok"; auto="r"; ;;
-		[Rr]*)	confirm="ok"; auto="r"; ;;
-		[Ff]*)	confirm="ok"; auto="" ;;
-		esac
-
-	else	echo ""
-		echo "No old /home found. Doing full install."
-		echo ""
-		confirm="ok";
-	fi
-
-done
-
-rmdir $TMPMP
-
-nohome="0"
-
-homesize=""
-if [ ! "$auto" = r ]
-then	
-echo ""
-echo " --- Step 6: Select the size of /home ----------------------------------"
-	while [ -z "$homesize" ]
-	do
-
-		# 20% of what is left over after / and /usr
-		# are taken.
-		defmb="`expr $maxhome / 5`"
-		if [ "$defmb" -gt "$maxhome" ]
-		then
-			defmb=$maxhome
-		fi
-
-		echo ""
-		echo "MINIX will take up $TOTALMB MB, without /home."
-		echo -n "How big do you want your /home to be in MB (0-$maxhome) ? [$defmb] "
-		read homesize
-		if [ "$homesize" = "" ] ; then homesize=$defmb; fi
-		if [ "$homesize" -lt 1 ]
-		then	nohome=1
-			echo "Ok, not making a /home."
-			homesize=0
-		else
-			if [ "$homesize" -gt "$maxhome" ]
-			then	echo "That won't fit!"
-				homesize=""
-			else
-				echo ""
-				echo -n "$homesize MB Ok? [Y] "
-				read ok
-				[ "$ok" = Y -o "$ok" = y -o "$ok" = "" ] || homesize=""
-			fi
-		fi
-		echo ""
-	done
-	# Homesize in sectors
-	homemb="$homesize MB"
-	homesize="`expr $homesize '*' 1024 '*' 2`"
-else
-	homepart="`devsize /dev/$home`"
-	homesize="`expr $homepart / 2 / 1024`"
-	if [ "$homesize" -gt "$maxhome" ]
-	then
-		echo "Sorry, but your /home is too big ($homesize MB) to leave enough"
-		echo "space on the rest of the partition ($devsizemb MB) for your"
-		echo "selected installation size ($TOTALMB MB)."
-		exit 1
-	fi
-	# Homesize unchanged (reinstall)
-	homesize=exist
-	homemb="current size"
-fi
-
-blockdefault=4
-
-if [ ! "$auto" = "r" ]
-then
-	echo ""
-echo " --- Step 7: Select a block size ---------------------------------------"
-	echo ""
-	
-	echo "The maximum (and default) file system block size is $blockdefault KB."
-	echo "For a small disk or small RAM you may want 1 or 2 KB blocks."
-	echo ""
-	
-	while [ -z "$blocksize" ]
-	do	
-		echo -n "Block size in kilobytes? [$blockdefault] "; read blocksize
-		test -z "$blocksize" && blocksize=$blockdefault
-		if [ "$blocksize" -ne 1 -a "$blocksize" -ne 2 -a "$blocksize" -ne $blockdefault ]
-		then	
-			warn "1, 2 or 4 please"
-			blocksize=""
-		fi
-	done
-else
-	blocksize=$blockdefault
-fi
-
-blocksizebytes="`expr $blocksize '*' 1024`"
-
-echo "
-You have selected to (re)install MINIX 3 in the partition /dev/$primary.
-The following subpartitions are now being created on /dev/$primary:
-
-    Root subpartition:	/dev/$root	$ROOTMB MB
-    /home subpartition:	/dev/$home	$homemb
-    /usr subpartition:	/dev/$usr	rest of $primary
-"
-					# Secondary master bootstrap.
-installboot -m /dev/$primary /usr/mdec/masterboot >/dev/null || exit
-					# Partition the primary.
-partition /dev/$primary 1 81:${ROOTSECTS}* 81:$homesize 81:0+ > /dev/null || exit
-
-echo "Creating /dev/$root for / .."
-mkfs -B $blocksizebytes /dev/$root || exit
-
-if [ "$nohome" = 0 ]
-then
-	if [ ! "$auto" = r ]
-	then	echo "Creating /dev/$home for /home .."
-		mkfs -B $blocksizebytes /dev/$home || exit
-	fi
-else	echo "Skipping /home"
-fi
-
-echo "Creating /dev/$usr for /usr .."
-mkfs -B $blocksizebytes /dev/$usr || exit
-
-echo ""
-echo " --- Step 8: Wait for bad block detection ------------------------------"
-echo ""
-echo "Scanning disk for bad blocks.  Hit CTRL+C to stop the scan if you are"
-echo "sure that there can not be any bad blocks.  Otherwise just wait."
-
-trap ': nothing;echo' 2
-
-echo ""
-echo "Scanning /dev/$root for bad blocks:"
-readall -b /dev/$root | sh
-
-if [ "$nohome" = 0 ]
-then
-	echo ""
-	echo "Scanning /dev/$home for bad blocks:"
-	readall -b /dev/$home | sh
-	fshome="home=/dev/$home"
-else	fshome=""
-fi
-
-echo ""
-echo "Scanning /dev/$usr for bad blocks:"
-readall -b /dev/$usr | sh
-
-trap 2
-
-echo ""
-echo " --- Step 9: Wait for files to be copied -------------------------------"
-echo ""
-echo "This is the final step of the MINIX 3 setup.  All files will now be"
-echo "copied to your hard disk.  This may take a while."
-echo ""
-
-mount /dev/$usr /mnt >/dev/null || exit		# Mount the intended /usr.
-
-(cd /usr || exit 1
- if [ "$nobigsource" = 1 ]
- then	list="`ls | fgrep -v src. | fgrep -v install`"
- else	list="`ls | fgrep -v install`"
- fi
- for d in $list
- do	
- 	cpdir -v $d /mnt/$d
- done
-) | progressbar "$USRFILES" || exit	# Copy the usr floppy.
-
-if [ -d /mnt/src.commands ]
-then	mv /mnt/src.commands /mnt/src/commands
-fi
-
-if [ -d /mnt/src.contrib ]
-then	mv /mnt/src.contrib /mnt/src/contrib
-fi
-					# Set inet.conf to correct driver
-if [ -n "$driver" ]
-then	echo "$driverargs" >$MYLOCALRC
-fi
-
-umount /dev/$usr >/dev/null || exit		# Unmount the intended /usr.
-mount /dev/$root /mnt >/dev/null || exit
-
-# Running from the installation CD.
-cpdir -vx / /mnt | progressbar "$ROOTFILES" || exit	
-cp /mnt/etc/motd.install /mnt/etc/motd
-
-# Fix /var/log
-rm /mnt/var/log
-ln -s /usr/log /mnt/var/log
-
-if [ -n "$driver" ]
-then	echo "eth0 $driver 0 { default; };" >/mnt/etc/inet.conf
-fi
-
-# CD remnants that aren't for the installed system
-rm /mnt/etc/issue /mnt/CD /mnt/.* 2>/dev/null
-					# Change /etc/fstab. (No swap.)
-					# ${swap:+swap=/dev/$swap}
-echo >/mnt/etc/fstab "\
-# Poor man's File System Table.
-
-root=/dev/$root
-usr=/dev/$usr
-$fshome"
-
-					# National keyboard map.
-test -n "$keymap" && cp -p "/usr/lib/keymaps/$keymap.map" /mnt/etc/keymap
-
-umount /dev/$root >/dev/null || exit	# Unmount the new root.
-mount /dev/$usr /mnt >/dev/null || exit
-
-# Make bootable.
-installboot -d /dev/$root /usr/mdec/bootblock /boot/boot >/dev/null || exit
-
-edparams /dev/$root "rootdev=$root; ramimagedev=$root; minix(1,Start MINIX 3 (requires at least 16 MB RAM)) { image=/boot/image_big; boot; }; smallminix(2,Start Small MINIX 3 (intended for 8 MB RAM systems)) { image=/boot/image_small; boot; }; newminix(3,Start Custom MINIX 3) { unset image; boot }; main() { echo By default, MINIX 3 will automatically load in 3 seconds.; echo Press ESC to enter the monitor for special configuration.; trap 3000 boot; menu; }; save" || exit
-pfile="/mnt/src/tools/fdbootparams"
-echo "rootdev=$root; ramimagedev=$root; save" >$pfile
-# Save name of CD drive
-cddrive="`mount | grep usr | awk '{ print $1 }' | sed 's/p.*//'`" 
-echo "cddrive=$cddrive" >>/mnt/etc/rc.package
-
-bios="`echo $primary | sed -e 's/d./dX/g' -e 's/c.//g'`"
-
-if [ ! "$auto" = "r" ]
-then	if mount /dev/$home /home 2>/dev/null
-	then	for u in bin ast
-		do	if mkdir ~$u
-			then	echo " * Creating home directory for $u in ~$u"
-				cpdir /usr/ast ~$u
-				chown -R $u:operator ~$u
-			else	echo " * Couldn't create ~$u"
-			fi
-		done
-		umount /dev/$home
-	fi
-fi
-
-echo "Saving random data.."
-dd if=/dev/random of=/mnt/adm/random.dat bs=1024 count=1
-
-echo "
-Please type 'shutdown' to exit MINIX 3 and enter the boot monitor. At
-the boot monitor prompt, type 'boot $bios', where X is the bios drive
-number of the drive you installed on, to try your new MINIX system.
-$biosdrivename
-
-This ends the MINIX 3 setup script.  After booting your newly set up system,
-you can run the test suites as indicated in the setup manual.  You also 
-may want to take care of local configuration, such as securing your system
-with a password.  Please consult the usage manual for more information. 
-
-"
-
Index: trunk/minix/commands/scripts/spell.sh
===================================================================
--- trunk/minix/commands/scripts/spell.sh	(revision 9)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#!/bin/sh
-#
-#	spell 1.1 - show unknown words			Author: Kees J. Bot
-#								28 Apr 1995
-
-dict=words
-
-while getopts 'd:' opt
-do
-	case $opt in
-	d)	dict="$OPTARG"
-		;;
-	?)	echo "Usage: spell [-d dict] [file ...]" >&2; exit 1
-	esac
-done
-shift `expr $OPTIND - 1`
-
-case "$dict" in
-*/*)	;;
-*)	dict="/usr/lib/dict/$dict"
-esac
-
-{
-	if [ $# = 0 ]
-	then
-		prep
-	else
-		for file
-		do
-			prep "$file"
-		done
-	fi
-} | {
-	sort -u | comm -23 - "$dict"
-}
Index: trunk/minix/commands/scripts/srccrc.sh
===================================================================
--- trunk/minix/commands/scripts/srccrc.sh	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-#!/bin/sh
-#
-#	srccrc 1.0 - compute CRC checksums of the entire source tree
-#							Author: Kees J. Bot
-cd /usr || exit
-
-{
-	# List the file names of all files in /usr/include and /usr/src.
-	find include src/* -type f
-} | {
-	# Sort the list to make them comparable.
-	sort
-} | {
-	# Remove files like *.o, *.bak, etc.
-	sed -e '/\.o$/d
-		/\.a$/d
-		/\.bak$/d
-		/\/a\.out$/d
-		/\/core$/d
-		/\/bin\/[^/]*$/d'
-} | {
-	# Compute checksums.
-	xargs crc
-}
Index: trunk/minix/commands/scripts/svclog.sh
===================================================================
--- trunk/minix/commands/scripts/svclog.sh	(revision 9)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#!/bin/sh
-#
-svc=`basename $1 ,S`,S
-if test \( ! -r $svc \) -a -d "SVC" ; then svc=SVC/$svc ; fi
-grep '^#\*\*\*SVC' $svc
-
Index: trunk/minix/commands/scripts/version.sh
===================================================================
--- trunk/minix/commands/scripts/version.sh	(revision 9)
+++ 	(revision )
@@ -1,2 +1,0 @@
-#!/bin/sh
-cat /etc/version
Index: trunk/minix/commands/scripts/whatis.sh
===================================================================
--- trunk/minix/commands/scripts/whatis.sh	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-#!/bin/sh
-#
-# whatis/apropos 1.3 - search whatis(5) database for commands
-#							Author: Kees J. Bot
-# BUGS
-#	whatis file must be as if created by makewhatis(8).
-#
-# This version includes a fix by Michael Haardt originally posted to 
-# comp.os.minix in July 1999.  Fixes for grep provided by Michael in May
-# 1999 caused whatis to break, this is now fixed.   (ASW 2004-12-12)
-
-all='exit 0'
-
-case "$1" in
--a)	all="found='exit 0'"
-	shift
-esac
-
-case $#:$0 in
-1:*whatis)
-	;;
-1:*apropos)
-	all="found='exit 0'"
-	;;
-*)	echo "Usage: `basename $0` [-a] <keyword>" >&2
-	exit 1
-esac
-
-IFS=":$IFS"
-MANPATH="${MANPATH-/usr/local/man:/usr/man}"
-
-found=
-
-for m in $MANPATH
-do
-	for w in $m/whatis
-	do
-		test -f $w || continue
-
-		case $0 in
-		*whatis)
-			grep '^\('$1'\|[^(]* '$1'\)[ ,][^(]*(' $w && eval $all
-			;;
-		*apropos)
-			grep -i "$1" $w && eval $all
-		esac
-	done
-done
-
-$found
-
-echo "`basename $0`: $1: not found" >&2
-exit 1
Index: trunk/minix/commands/scripts/whereis.sh
===================================================================
--- trunk/minix/commands/scripts/whereis.sh	(revision 9)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#!/bin/sh
-: List all system directories containing the argument
-: Author: Terrence W. Holm
-if test $# -ne 1; then
-  echo "Usage:  whereis  name"
-  exit 1
-fi
-
-path="/bin /lib /etc\
-      /usr/bin /usr/lib\
-      /usr/include /usr/include/sys"
-
-for dir in $path; do
-  for file in $dir/$1 $dir/$1.*; do
-    if test -f $file; then
-      echo $file 
-    elif test -d $file; then
-      echo $file/
-      fi
-    done
-  done
-
-exit 0
