--- openafs-1.0.4.orig/src/Makefile
+++ openafs-1.0.4/src/Makefile
@@ -9,15 +9,14 @@
 DESTDIR=dest/
 SRCDIR=${DESTDIR}
 INSTALL=${SRCDIR}bin/install
-WASHTOOL=${SRCDIR}bin/washtool
+WASHTOOL=true
 
 #WASHTOOLRCSUPDATE=${WASHTOOL} rcsupdate
 WASHTOOLCMD=$(MAKE)
 WASHTOOLFLAGS=-argument install
 
-COMPILE_PART1=${WASHTOOL} ${WASHTOOLCMD}
-COMPILE_PART2=${WASHTOOLFLAGS}
-
+COMPILE_PART1=cd obj; cd 
+COMPILE_PART2=; $(MAKE) install SYS_NAME=${SYS_NAME} DESTDIR=$(shell pwd)/${SYS_NAME}/dest/ SRCDIR=$(shell pwd)/${SYS_NAME}/dest/
 MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
 
 # Enable build+install of obsolete and insecure packages
@@ -272,7 +271,7 @@
   rxkad \
   util \
   libacl \
-  vlserver \
+	vlserver \
   sgiefs  \
   rxstat
 
@@ -292,7 +291,7 @@
   rxstat
 
 
-libafs: minproject libafs_setup ${KERNELDIR}
+libafs: minproject libafs_setup  ${KERNELDIR} 
 	${COMPILE_PART1} libafs ${COMPILE_PART2}
 
 libuafs: minproject libuafs_setup ${UKERNELDIR}
@@ -397,7 +396,6 @@
 	${COMPILE_PART1} libadmin/cfg ${COMPILE_PART2}
 	${COMPILE_PART1} libadmin/test ${COMPILE_PART2}
 	${COMPILE_PART1} libadmin/samples ${COMPILE_PART2}
-
 libadmin: libafsauthent bozo
 	case ${SYS_NAME} in \
 	alpha_dux*|sgi_*|sun4x_*|rs_aix*|*linux*|hp_ux110) \
@@ -410,8 +408,7 @@
 	*) \
 		echo Not building MT libadmin for ${SYS_NAME} ;; \
 	esac
-
-finale: project cmd comerr afsd allrcmds butc tbutc libafs libuafs audit kauth log package \
+finale: project cmd comerr afsd allrcmds butc tbutc  libuafs audit kauth log package \
 	ptserver scout bu_utils ubik uss bozo vfsck volser \
 	venus update xstat afsmonitor dauth tests libafsrpc \
 	libafsauthent libadmin
--- openafs-1.0.4.orig/src/afsd/Makefile
+++ openafs-1.0.4/src/afsd/Makefile
@@ -68,39 +68,39 @@
 	${INSTALL} afsd ${DESTDIR}root.client/usr/vice/etc
 	case ${SYS_NAME} in \
 		rs_aix*)  \
-			${INSTALL} -f rc.afs.rs_aix ${DESTDIR}root.client/usr/vice/etc/dkload/rc.afs ; \
-			${INSTALL} -f rc.dkload.client.rs_aix ${DESTDIR}root.client/usr/vice/etc/dkload/rc.dkload.client ; \
-			${INSTALL} -f rc.dkload.server.rs_aix ${DESTDIR}root.client/usr/vice/etc/dkload/rc.dkload.server ;; \
+			${INSTALL} rc.afs.rs_aix ${DESTDIR}root.client/usr/vice/etc/dkload/rc.afs ; \
+			${INSTALL} rc.dkload.client.rs_aix ${DESTDIR}root.client/usr/vice/etc/dkload/rc.dkload.client ; \
+			${INSTALL} rc.dkload.server.rs_aix ${DESTDIR}root.client/usr/vice/etc/dkload/rc.dkload.server ;; \
 		sgi_65 ) \
-			${INSTALL} -f afs.rc.sgi_ipnos ${DESTDIR}root.client/usr/vice/etc/sgiload/afs.rc ;\
-			${INSTALL} -f afs.rc.sgi_ipnos ${DESTDIR}root.server/etc/init.d/afs.rc ;;\
+			${INSTALL} afs.rc.sgi_ipnos ${DESTDIR}root.client/usr/vice/etc/sgiload/afs.rc ;\
+			${INSTALL} afs.rc.sgi_ipnos ${DESTDIR}root.server/etc/init.d/afs.rc ;;\
 		sgi_* ) \
-			${INSTALL} -f afs.rc.sgi ${DESTDIR}root.client/usr/vice/etc/sgiload/afs.rc ;\
-			${INSTALL} -f afs.rc.sgi ${DESTDIR}root.server/etc/init.d/afs.rc ;\
+			${INSTALL} afs.rc.sgi ${DESTDIR}root.client/usr/vice/etc/sgiload/afs.rc ;\
+			${INSTALL} afs.rc.sgi ${DESTDIR}root.server/etc/init.d/afs.rc ;\
 			case ${SYS_NAME} in \
 				sgi_53 | sgi_61 ) \
-				${INSTALL} -f afs_rtsymtab.pl.${SYS_NAME} ${DESTDIR}root.client/usr/vice/etc/sgiload/afs_rtsymtab.pl ;;\
+				${INSTALL} afs_rtsymtab.pl.${SYS_NAME} ${DESTDIR}root.client/usr/vice/etc/sgiload/afs_rtsymtab.pl ;;\
 			esac;; \
 		sun4_52 | sun4_53 | sun4c_52 | sun4c_53 | sun4m_52 | sun4m_53 | sun4m_54 | sun4_54 | sun4c_54 | sunx86_54) \
-			${INSTALL} -f afs.rc.solaris ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
+			${INSTALL} afs.rc.solaris ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
 		sun4x_57 ) \
-			${INSTALL} -f afs.rc.solaris.2.7 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
+			${INSTALL} afs.rc.solaris.2.7 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
 		sun4x_58 ) \
-			${INSTALL} -f afs.rc.solaris.2.8 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
+			${INSTALL} afs.rc.solaris.2.8 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
                 sun4x_5? ) \
-                        ${INSTALL} -f afs.rc.solaris.2_5 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
+                        ${INSTALL} afs.rc.solaris.2_5 ${DESTDIR}root.client/usr/vice/etc/modload/afs.rc ;;\
 		alpha_osf* ) \
-			${INSTALL} -f afs.rc.alpha ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;;\
+			${INSTALL} afs.rc.alpha ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;;\
 		hp_ux10? | hp_ux11? ) \
-			${INSTALL} -f afs.rc.hpux10 ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;\
-			${INSTALL} -f afs.hpux102.driver ${DESTDIR}root.client/usr/vice/etc/afs.driver ;;\
+			${INSTALL} afs.rc.hpux10 ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;\
+			${INSTALL} afs.hpux102.driver ${DESTDIR}root.client/usr/vice/etc/afs.driver ;;\
 		alpha_dux* ) \
-			${INSTALL} -f afs.rc.alpha_dux40 ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;;\
+			${INSTALL} afs.rc.alpha_dux40 ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;;\
                 hp?00_ux10? ) \
-			${INSTALL} -f afs.rc.hpux10 ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;;\
+			${INSTALL} afs.rc.hpux10 ${DESTDIR}root.client/usr/vice/etc/dkload/afs.rc ;;\
 		*linux* ) \
-			${INSTALLex} -f afs.rc.linux ${DESTDIR}root.client/usr/vice/etc/afs.rc; \
-			${INSTALL} -f afs.conf.linux ${DESTDIR}root.client/usr/vice/etc/afs.conf ;; \
+			${INSTALLex}  -f afs.rc.linux ${DESTDIR}root.client/usr/vice/etc/afs.rc; \
+			${INSTALL}  -f afs.conf.linux ${DESTDIR}root.client/usr/vice/etc/afs.conf ;; \
 		ppc_darwin*) \
 			mkdir -p ${DESTDIR}root.client/usr/vice/etc/afs.kext/Contents/MacOS ;\
 			${INSTALL} -f afs.ppc_darwin.plist ${DESTDIR}root.client/usr/vice/etc/afs.kext/Contents/Info.plist ; \
@@ -112,3 +112,6 @@
 		* )  \
 			echo No rc scripts installed for ${SYS_NAME} ;; \
 	esac
+
+
+
--- openafs-1.0.4.orig/src/afsd/afs.conf.linux
+++ openafs-1.0.4/src/afsd/afs.conf.linux
@@ -9,8 +9,10 @@
 # Configuration information for AFS client
 
 # AFS_CLIENT and AFS_SERVER determine if we should start the client and or
-# the bosserver. Possible values are on and off.
-AFS_CLIENT=on
+# the bosserver. Possible values are true and false.
+# These are loaded from files written by debconf
+test -f /etc/openafs/afs.conf.client && . /etc/openafs/afs.conf.client
+
 AFS_SERVER=off
 
 # AFS client configuration options:
--- openafs-1.0.4.orig/src/afsd/afs.rc.linux
+++ openafs-1.0.4/src/afsd/afs.rc.linux
@@ -1,4 +1,5 @@
 #! /bin/sh
+# Modified by Sam Hartman <hartmans@mit.edu> for Debian
 # Copyright 2000, International Business Machines Corporation and others.
 # All Rights Reserved.
 # 
@@ -18,15 +19,18 @@
 # Note that AFS does not use a pid file in /var/run. It is turned off by
 # unmounting /afs.
 
+exec 3>/dev/null
+exec </dev/null
+
 
 # Gather up options and post startup script name, if present
-if [ -f /etc/sysconfig/afs ]; then
-	. /etc/sysconfig/afs
+if [ -f /etc/openafs/afs.conf ]; then
+	. /etc/openafs/afs.conf
 fi
 
-# is_on returns 1 if value of arg is "on"
+# is_on returns 1 if value of arg is "true"
 is_on() {
-	if  test "$1" = "on" ; then return 0
+	if  test "$1" = "true" ; then return 0
 	else return 1
 	fi
 }
@@ -49,7 +53,7 @@
 	# For now, just use uname -r to get the module version. 
 	VERSION=`uname -r`
 
-	LIBAFS=libafs-$VERSION$MP.o
+	LIBAFS=openafs$MP.o
 }
 
 #
@@ -107,7 +111,7 @@
 }
 
 
-MODLOADDIR=/usr/vice/etc/modload
+MODLOADDIR=/lib/modules/`uname -r`/fs
 # load_client loads the AFS client module if it's not already loaded. 
 load_client() {
 	# If LIBAFS is set, use it.
@@ -118,14 +122,28 @@
     
 	if [ ! -f $MODLOADDIR/$LIBAFS ] ; then
 		echo AFS module $MODLOADDIR/$LIBAFS does not exist. Not starting AFS.
-		exit 1
+		echo Please consider building kernel modules using instructions in
+ echo /usr/share/doc/openafs-client/README.modules
+		exit 0
 	fi
 
 	# use the prefix command if required
 	set_prefix
-	/sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
+		LOADED=`/sbin/lsmod | fgrep openafs`
+	if [ -z "$LOADED" ] ; then
+	    /sbin/insmod ${PREFIX:+-P $PREFIX} -f  $MODLOADDIR/$LIBAFS 
+	fi
+}
+
+# start_client() -- run afsd
+start_client() {
+		start-stop-daemon --start --quiet --exec /usr/sbin/afsd \
+		    -- ${OPTIONS}
+		echo -n " afsd"
+
 }
 
+
 case "$1" in 
   start)
 	# Load kernel extensions
@@ -135,50 +153,59 @@
 		exit 1
 	fi
 
-	echo "Starting AFS services..... "
-	# Start bosserver, it if exists
-	if  is_on $AFS_SERVER && test -x /usr/afs/bin/bosserver  ; then
-		/usr/afs/bin/bosserver 
-	fi
-
 	# Start AFS client
-	if  is_on $AFS_CLIENT && test -x /usr/vice/etc/afsd  ; then
-		/usr/vice/etc/afsd ${OPTIONS}
-
-		# Start AFS version of inetd.conf if present.
-		if  test -f /usr/afsws/etc/inetd.conf -a -x /usr/afsws/etc/inetd.afs ; then
-			/usr/afsws/etc/inetd.afs /usr/afsws/etc/inetd.conf
-		fi
+	if  is_on $AFS_CLIENT && test -x /usr/sbin/afsd  ; then
+	    echo -n "Starting AFS services: "
+	start_client
+		echo "."
 		$AFS_POST_INIT
 	fi
 
 	;;
 
-  stop)
+force-start)
+	# Load kernel extensions
+	if  load_client  ; then :
+	else
+		echo Failed to load AFS client, not starting AFS services.
+		exit 1
+	fi
+
+	# Start AFS client
+	if test -x /usr/sbin/afsd  ; then
+	    echo -n "Starting AFS services: "
+	start_client
+		echo "."
+		$AFS_POST_INIT
+	fi
+    	;;
+  stop|force-stop)
 	# Stop AFS
-	echo "Stopping AFS services..... "
+	echo -n "Stopping AFS services: "
 
-	if  is_on $AFS_CLIENT  ; then
-		killall inetd.afs
+	if  mount |grep -q \^AFS  ; then
 		umount /afs
+		echo -n " afsd"
 	fi
 
-	if  is_on $AFS_SERVER && test -x /usr/afs/bin/bos ; then
-		echo "Stopping AFS bosserver"
-		/usr/afs/bin/bos shutdown localhost -localauth -wait
-		killall -HUP bosserver
-	fi
 
-	LIBAFS=`/sbin/lsmod | fgrep libafs`
+	LIBAFS=`/sbin/lsmod | fgrep openafs`
 	if [ -n "$LIBAFS" ] ; then
 		LIBAFS=`echo $LIBAFS | awk 'BEGIN { FS = " " } { print $1 }'`
 		/sbin/rmmod $LIBAFS
+		echo -n " libafs"
 	fi
+	echo "."
+
+	;;
 
+  restart|force-reload)
+	"$0" stop
+	"$0" start
 	;;
 
   *)
-	echo Usage: 'afs <start|stop>'
+	echo Usage: 'openafs-client <start|stop>'
 
 esac
 
--- openafs-1.0.4.orig/src/config/Makefile.i386_linux22
+++ openafs-1.0.4/src/config/Makefile.i386_linux22
@@ -12,10 +12,10 @@
 
 # Base directory for linux kernel source. Actually a prefix which is complete
 # when LINUX_VERS is appended to it.
-LINUX_SRCDIR = /usr/src/linux-
+LINUX_SRCDIR = $(KSRC)
 # Default list of Linux kernels to build. Build will run only if all
 # can be built. To build a different set, specify LINUX_VERS to make.
-LINUX_VERS = 2.2.5-15 2.2.10 2.2.12 2.2.12-20 2.2.13 2.2.14
+LINUX_VERS = $(KVERS)
 
 #
 # compilation and link editor flags
--- openafs-1.0.4.orig/src/config/Makefile.i386_linux24
+++ openafs-1.0.4/src/config/Makefile.i386_linux24
@@ -3,10 +3,10 @@
 
 # Base directory for linux kernel source. Actually a prefix which is complete
 # when LINUX_VERS is appended to it.
-LINUX_SRCDIR = /usr/src/linux-
+LINUX_SRCDIR = $(KSRC)
 # Default list of Linux kernels to build. Build will run only if all
 # can be built. To build a different set, specify LINUX_VERS to make.
-LINUX_VERS = 2.3.99-pre3
+LINUX_VERS = $(KVERS)
 
 #
 # compilation and link editor flags
--- openafs-1.0.4.orig/src/config/Makefile.ppc_linux24
+++ openafs-1.0.4/src/config/Makefile.ppc_linux24
@@ -3,10 +3,10 @@
 
 # Base directory for linux kernel source. Actually a prefix which is complete
 # when LINUX_VERS is appended to it.
-LINUX_SRCDIR = /usr/src/linux-
+LINUX_SRCDIR = $(KSRC)
 # Default list of Linux kernels to build. Build will run only if all
 # can be built. To build a different set, specify LINUX_VERS to make.
-LINUX_VERS = 2.4.0-test9
+LINUX_VERS = $(KVERS)
 
 #
 # compilation and link editor flags
--- openafs-1.0.4.orig/src/config/Makefile.sparc_linux22
+++ openafs-1.0.4/src/config/Makefile.sparc_linux22
@@ -7,10 +7,10 @@
 
 # Base directory for linux kernel source. Actually a prefix which is complete
 # when LINUX_VERS is appended to it.
-LINUX_SRCDIR = /usr/src/linux-
+LINUX_SRCDIR = $(KSRC)
 # Default list of Linux kernels to build. Build will run only if all
 # can be built. To build a different set, specify LINUX_VERS to make.
-LINUX_VERS = 2.2.14
+LINUX_VERS = $(KVERS)
 
 #
 # compilation and link editor flags
--- openafs-1.0.4.orig/src/config/linux-version
+++ openafs-1.0.4/src/config/linux-version
@@ -38,13 +38,13 @@
 CAN_BUILD=""
 
 for VERS in $LINUX_VERS ; do
-	dir=$LINUX_SRCDIR$VERS
+	dir=$LINUX_SRCDIR
 	if [ ! -d $dir ] ; then
 		echo "ERROR: Cannot build for Linux kernel $VERS: $dir does not exist."
 		errors=true
 		continue
 	fi
-	header=$LINUX_SRCDIR$VERS/include/linux/version.h
+	header=$LINUX_SRCDIR/include/linux/version.h
 	if [ ! -f $header ] ; then
 	    echo "ERROR: Cannot build for Linux kernel $VERS: $header does not exist."
 	    errors=true
--- openafs-1.0.4.orig/src/config/Makefile.ppc_linux22
+++ openafs-1.0.4/src/config/Makefile.ppc_linux22
@@ -0,0 +1,46 @@
+# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
+AFS_OSTYPE = LINUX
+
+# Base directory for linux kernel source. Actually a prefix which is complete
+# when LINUX_VERS is appended to it.
+LINUX_SRCDIR = $(KSRC)
+# Default list of Linux kernels to build. Build will run only if all
+# can be built. To build a different set, specify LINUX_VERS to make.
+LINUX_VERS = $(KVERS)
+
+#
+# compilation and link editor flags
+DBG=-g
+OPTMZ=-O2
+PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
+# Put -O2 here to _ensure_ all Makefiles pick it up.
+XCFLAGS= -O2
+MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}
+XLDFLAGS=
+SHARE_LDFLAGS = -shared -Xlinker -x
+SHLIB_SUFFIX=so
+SHLIB_CFLAGS=
+#
+# libraries
+MTLIBS=-lpthread
+TXLIBS= /usr/lib/libncurses.so
+XLIBS=
+#
+# programs
+AR=ar
+AS=as
+CP=cp
+INSTALL=${DESTDIR}bin/install
+LD=ld
+MT_CC=cc
+MV=mv
+RANLIB=ranlib
+RM=rm
+WASHTOOL=${SRCDIR}bin/washtool
+#
+# Other OS specific requirements
+#
+YACC = bison -y
+LEX = flex -l
+# Used in des library.
+CRYPT_OBJ = crypt.o
--- openafs-1.0.4.orig/src/config/param.ppc_linux22.h
+++ openafs-1.0.4/src/config/param.ppc_linux22.h
@@ -0,0 +1,61 @@
+#ifndef _PARAM_PPC_LINUX22_H_
+#define _PARAM_PPC_LINUX22_H_
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously ppc specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV        1
+#define AFS_LINUX22_ENV        1
+#define AFS_PPC_LINUX20_ENV    1
+#define AFS_PPC_LINUX22_ENV    1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME       "ppc_linux22"
+#define SYS_NAME_ID    SYS_NAME_ID_ppc_linux22
+#define AFSBIG_ENDIAN    1
+#define AFS_HAVE_FFS        1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#undef CONFIG_SMP
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#define CONFIG_SMP
+#define __SMP__
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#endif /* __KERNEL__  && !DUMP_KERNEL*/
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+#endif /* _PARAM_PPC_LINUX22_H_ */
--- openafs-1.0.4.orig/src/config/param.ppc_linux22_usr.h
+++ openafs-1.0.4/src/config/param.ppc_linux22_usr.h
@@ -0,0 +1,53 @@
+#ifndef _PARAM_USR_PPC_LINUX22_H_
+#define _PARAM_USR_PPC_LINUX22_H_
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously ppc specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL                        1       /* user space kernel */
+#define AFS_ENV                        1
+#define AFS_USR_LINUX20_ENV    1
+#define AFS_USR_LINUX22_ENV    1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 137
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1   /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME       "ppc_linux22"
+#define SYS_NAME_ID    SYS_NAME_ID_ppc_linux22
+#define AFSBIG_ENDIAN       1
+#define AFS_HAVE_FFS        1       /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#define        afsio_iov       uio_iov
+#define        afsio_iovcnt    uio_iovcnt
+#define        afsio_offset    uio_offset
+#define        afsio_seg       uio_segflg
+#define        afsio_fmode     uio_fmode
+#define        afsio_resid     uio_resid
+#define        AFS_UIOSYS      1
+#define        AFS_UIOUSER     UIO_USERSPACE
+#define        AFS_CLBYTES     MCLBYTES
+#define        AFS_MINCHANGE   2
+#define        VATTR_NULL      usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#endif /* _PARAM_USR_PPC_LINUX22_H_ */
--- openafs-1.0.4.orig/src/des/conf-ppc-linux.h
+++ openafs-1.0.4/src/des/conf-ppc-linux.h
@@ -1,4 +1,15 @@
+/*
+ * Copyright 1988 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <mit-copyright.h>.
+ *
+ * Machine-type definitions: Linux on PPC
+ */
+
+#include <mit-cpyright.h>
+
 #define BITS32
 #define BIG
 #define MSBFIRST
-#define MUSTALIGN
+#define MUSTALLIGN
--- openafs-1.0.4.orig/src/libafs/MakefileProto.LINUX
+++ openafs-1.0.4/src/libafs/MakefileProto.LINUX
@@ -48,6 +48,7 @@
 CCFLAGS =   -O -fomit-frame-pointer -fno-strength-reduce \
 	-fno-strict-aliasing -fsigned-char 
 DEFINES = -D__KERNEL__  -D__s390__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
+
 <sparc_linux22 sparc_linux24>
 LD = ld -m elf32_sparc
 CCFLAGS =   -O2 -fomit-frame-pointer \
@@ -85,14 +86,14 @@
 setup:
 	-rm -f h net netinet sys rpc
 	-ln -s rx rpc
-	for v in ${LINUX_VERS} ; do \
+	for v in notused; do \
 		for m in ${MPS} ; do \
-			KDIR=$(KOBJ)-$$v-$$m; \
+			KDIR=$(KOBJ)-$$m; \
 			mkdir -p $${KDIR}; \
 			ln -fs ../Makefile $${KDIR}/Makefile ; \
 			ln -fs ../Makefile.common $${KDIR}/Makefile.common; \
 <i386_linux22 i386_linux24>
-			sh ./redhat.sh ${LINUX_SRCDIR}$$v $${KDIR}/Makefile.extradefs; \
+			sh ./redhat.sh ${LINUX_SRCDIR} $${KDIR}/Makefile.extradefs; \
 <all>
 		done \
 	done
@@ -102,36 +103,36 @@
 LINUX_INCDIR=include/linux
 
 ${COMPDIRS}:
-	for v in ${LINUX_VERS} ; do \
-		IDIR=${LINUX_SRCDIR}$$v/${LINUX_INCDIR}; \
+	for v in notused ; do \
+		IDIR=${LINUX_SRCDIR}/${LINUX_INCDIR}; \
 		rm -f h; \
 		ln -s $${IDIR} h; \
 		rm -f linux; \
 		ln -s $${IDIR} linux; \
+		rm -f asm-generic; \
+		ln -s ${LINUX_SRCDIR}/include/asm-generic asm-generic; \
 		rm -f net; \
 		ln -s $${IDIR} net; \
 		rm -f netinet; \
 		ln -s $${IDIR} netinet; \
 		rm -f sys; \
 		ln -s $${IDIR} sys; \
-		rm -f asm-generic; \
-		ln -s ${LINUX_SRCDIR}$$v/include/asm-generic asm-generic; \
 		rm -f asm; \
 <alpha_linux_22 alpha_linux_24>
-		ln -s ${LINUX_SRCDIR}$$v/include/asm-alpha asm ; \
+		ln -s ${LINUX_SRCDIR}/include/asm-alpha asm ; \
 <i386_linux22 i386_linux24>
-		ln -s ${LINUX_SRCDIR}$$v/include/asm-i386 asm ; \
+		ln -s ${LINUX_SRCDIR}/include/asm-i386 asm ; \
 <s390_linux22 s390_linux24>
-		ln -s ${LINUX_SRCDIR}$$v/include/asm-s390 asm ; \
+		ln -s ${LINUX_SRCDIR}/include/asm-s390 asm ; \
 <ppc_linux22 ppc_linux24>
-		ln -s ${LINUX_SRCDIR}$$v/include/asm-ppc asm ; \
+		ln -s ${LINUX_SRCDIR}/include/asm-ppc asm ; \
 <sparc_linux22 sparc_linux24>
-		ln -s ${LINUX_SRCDIR}$$v/include/asm-sparc asm ; \
+		ln -s ${LINUX_SRCDIR}/include/asm-sparc asm ; \
 <sparc64_linux22 sparc64_linux24>
-		ln -s ${LINUX_SRCDIR}$$v/include/asm-sparc64 asm ; \
+		ln -s ${LINUX_SRCDIR}/include/asm-sparc64 asm ; \
 <all>
 		for m in ${MPS} ; do \
-			KDIR=${KOBJ}-$$v-$$m ; \
+			KDIR=${KOBJ}-$$m ; \
 			echo Building in directory: $${KDIR} ; \
 			if [ "$$m" = "MP" ] ; then \
 				SMP_DEF="-DAFS_SMP -D__BOOT_KERNEL_SMP=1 -D__BOOT_KERNEL_UP=0 -D__SMP__" ; \
@@ -141,7 +142,7 @@
 				TARG=libafs ; \
 			fi ; \
 			cd $${KDIR} ; \
-			$(MAKE) DESTDIR=${DESTDIR} SMP_DEF="$${SMP_DEF}" $${TARG} CLIENT=$$v || exit $$?; \
+			$(MAKE) DESTDIR=${DESTDIR} SMP_DEF="$${SMP_DEF}" $${TARG} CLIENT= || exit $$?; \
 			cd ../ ; \
 		done \
 	done
@@ -149,8 +150,8 @@
 
 # Below this line are targets when in the COMMON directory:
 # For Linux there is no kernel NFS server.
-LIBAFS = libafs-${CLIENT}.o
-LIBAFS_MP = libafs-${CLIENT}.mp.o
+LIBAFS = openafs${CLIENT}.o
+LIBAFS_MP = openafs${CLIENT}.mp.o
 
 DEST_LIBAFS = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS}
 DEST_LIBAFS_MP = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS_MP}
@@ -163,10 +164,10 @@
 	echo MP Build Complete
 
 $(DEST_LIBAFS): $(LIBAFS)
-	${INSTALL} -f $? $@
+	${INSTALL} $? $@
 
 $(DEST_LIBAFS_MP): $(LIBAFS_MP)
-	${INSTALL} -f $? $@
+	${INSTALL} $? $@
 
 ${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
 	$(RM) -f $@
--- openafs-1.0.4.orig/src/ptserver/pt_util.c
+++ openafs-1.0.4/src/ptserver/pt_util.c
@@ -1,4 +1,4 @@
-/* $Id: pt_util.c,v 1.1.1.1 2001/01/19 20:55:42 hartmans Exp $ */
+/* $Id: pt_util.c,v 1.2 2001/01/20 20:01:36 hartmans Exp $ */
 
 /*
  *
@@ -99,7 +99,7 @@
     struct prentry uentry, gentry;
     struct ubik_hdr *uh;
     char *dfile = 0;
-    char *pfile = "/usr/afs/db/prdb.DB0";
+    char *pfile = "/var/lib/openafs/db/prdb.DB0";
     
     while ((cc = getopt(argc, argv, "wugmxsnp:d:")) != EOF) {
 	switch (cc) {
--- openafs-1.0.4.orig/src/util/dirpath.c
+++ openafs-1.0.4/src/util/dirpath.c
@@ -1,3 +1,6 @@
+/* Changed for Debian by Sam Hartman <hartmans@mit.edu>
+ * conform to FHS
+ */
 /*
  * Copyright 2000, International Business Machines Corporation and others.
  * All Rights Reserved.
@@ -60,7 +63,7 @@
             strcompose(buf, AFSDIR_PATH_MAX, dirPathArray[AFSDIR_SERVER_AFS_DIRPATH_ID], "/", dir, NULL)
 
 #define AFSDIR_SERVER_FILEPATH(buf, dir, file)  \
-            strcompose(buf, AFSDIR_PATH_MAX, dirPathArray[AFSDIR_SERVER_AFS_DIRPATH_ID], "/", dir, "/", file,  NULL)
+            strcompose(buf, AFSDIR_PATH_MAX, dir, "/", file,  NULL)
 
 #define AFSDIR_CLIENT_DIRPATH(buf, dir)  \
             strcompose(buf, AFSDIR_PATH_MAX, dirPathArray[AFSDIR_CLIENT_VICE_DIRPATH_ID], "/", dir, NULL)
@@ -176,19 +179,20 @@
   strcpy(dirPathArray[AFSDIR_SERVER_AFS_DIRPATH_ID], afsSrvDirPath);
 
   pathp = dirPathArray[AFSDIR_SERVER_ETC_DIRPATH_ID];
-  AFSDIR_SERVER_DIRPATH(pathp, AFSDIR_ETC_DIR);
+  strcompose(pathp, AFSDIR_PATH_MAX, "/etc/openafs/server", NULL);
 
   pathp = dirPathArray[AFSDIR_SERVER_BIN_DIRPATH_ID];
-  AFSDIR_SERVER_DIRPATH(pathp, AFSDIR_BIN_DIR);
+  strcompose(pathp, AFSDIR_PATH_MAX, "/usr/lib/openafs", NULL);
 
   pathp = dirPathArray[AFSDIR_SERVER_CORES_DIRPATH_ID];
-  AFSDIR_SERVER_DIRPATH(pathp, AFSDIR_CORES_DIR);
+  strcompose(pathp, AFSDIR_PATH_MAX, "/var/lib/openafs/cores", NULL);
+
 
   pathp = dirPathArray[AFSDIR_SERVER_DB_DIRPATH_ID];
-  AFSDIR_SERVER_DIRPATH(pathp, AFSDIR_DB_DIR);
+  strcompose(pathp, AFSDIR_PATH_MAX, "/var/lib/openafs/db", NULL);
 
   pathp = dirPathArray[AFSDIR_SERVER_LOGS_DIRPATH_ID];
-  AFSDIR_SERVER_DIRPATH(pathp, AFSDIR_LOGS_DIR);
+  strcompose(pathp, AFSDIR_PATH_MAX, "/var/log/openafs", NULL);
 
   pathp = dirPathArray[AFSDIR_SERVER_LOCAL_DIRPATH_ID];
   AFSDIR_SERVER_DIRPATH(pathp, AFSDIR_LOCAL_DIR);
@@ -218,122 +222,125 @@
   /* server file paths */
 
   pathp = dirPathArray[AFSDIR_SERVER_THISCELL_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_ETC_DIR, AFSDIR_THISCELL_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_ETC_DIRPATH, AFSDIR_THISCELL_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_CELLSERVDB_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_ETC_DIR, AFSDIR_CELLSERVDB_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_ETC_DIRPATH, AFSDIR_CELLSERVDB_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_NOAUTH_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_NOAUTH_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_NOAUTH_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_BUDBLOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_BUDBLOG_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_BUDBLOG_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_TAPECONFIG_FILEPATH_ID];
   AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_BACKUP_DIR, AFSDIR_TAPECONFIG_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_KALOGDB_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_KALOGDB_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_KALOGDB_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_KALOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_KALOG_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_KALOG_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_KADB_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_DB_DIR, AFSDIR_KADB_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, "/var/lib/openafs/db", AFSDIR_KADB_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_NTPD_FILEPATH_ID];
   AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_BIN_DIR, AFSDIR_NTPD_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_PRDB_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_DB_DIR, AFSDIR_PRDB_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, "/var/lib/openafs/db", AFSDIR_PRDB_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_PTLOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_PTLOG_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_PTLOG_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_KCONF_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_ETC_DIR, AFSDIR_KCONF_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_ETC_DIRPATH, AFSDIR_KCONF_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_VLDB_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_DB_DIR, AFSDIR_VLDB_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, "/var/lib/openafs/db", AFSDIR_VLDB_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_VLOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_VLOG_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_VLOG_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_CORELOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_CORE_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_CORE_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_SLVGLOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_SLVGLOG_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_SLVGLOG_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_SALVAGER_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_BIN_DIR, AFSDIR_SALVAGER_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_BIN_DIRPATH, AFSDIR_SALVAGER_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_SLVGLOCK_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_SLVGLOCK_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_SLVGLOCK_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_KEY_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_ETC_DIR, AFSDIR_KEY_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_ETC_DIRPATH, AFSDIR_KEY_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_ULIST_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_ETC_DIR, AFSDIR_ULIST_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_ETC_DIRPATH, AFSDIR_ULIST_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_BOZCONF_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_BOZCONF_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_BOZCONF_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_BOZCONFNEW_FILEPATH_ID];
   AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_BOZCONFNEW_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_BOZLOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_BOZLOG_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_BOZLOG_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_BOZINIT_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_BOZINIT_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_BOZINIT_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_BOSVR_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_BIN_DIR, AFSDIR_BOSVR_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, "/usr/sbin", AFSDIR_BOSVR_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_VOLSERLOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_VOLSERLOG_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_VOLSERLOG_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_ROOTVOL_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_ETC_DIR, AFSDIR_ROOTVOL_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_ETC_DIRPATH, AFSDIR_ROOTVOL_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_HOSTDUMP_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_HOSTDUMP_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_HOSTDUMP_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_CLNTDUMP_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_CLNTDUMP_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_CLNTDUMP_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_CBKDUMP_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_CBKDUMP_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_CBKDUMP_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_OLDSYSID_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_OLDSYSID_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_OLDSYSID_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_SYSID_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_SYSID_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_SYSID_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_FILELOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOGS_DIR, AFSDIR_FILELOG_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH, AFSDIR_FILELOG_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_AUDIT_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_AUDIT_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_AUDIT_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_NETINFO_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_NETINFO_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, 
+			 AFSDIR_NETINFO_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_NETRESTRICT_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_LOCAL_DIR, AFSDIR_NETRESTRICT_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH, AFSDIR_NETRESTRICT_FILE);
+
 
   pathp = dirPathArray[AFSDIR_SERVER_WEIGHTING_CONSTANTS_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_MIGR_DIR, AFSDIR_WEIGHTINGCONST_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_AFS_DIRPATH"/"AFSDIR_MIGR_DIR, AFSDIR_WEIGHTINGCONST_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_THRESHOLD_CONSTANTS_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_MIGR_DIR, AFSDIR_THRESHOLDCONST_FILE);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_CANONICAL_SERVER_AFS_DIRPATH"/"AFSDIR_MIGR_DIR, AFSDIR_THRESHOLDCONST_FILE);
 
   pathp = dirPathArray[AFSDIR_SERVER_MIGRATELOG_FILEPATH_ID];
-  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_MIGR_DIR, AFSDIR_MIGRATE_LOGNAME);
+  AFSDIR_SERVER_FILEPATH(pathp, AFSDIR_MIGR_DIR, AFSDIR_CANONICAL_SERVER_AFS_DIRPATH"/"AFSDIR_MIGRATE_LOGNAME);
  
+
 
   /* client file paths */
 
--- openafs-1.0.4.orig/src/util/dirpath.h
+++ openafs-1.0.4/src/util/dirpath.h
@@ -1,3 +1,6 @@
+/* Changed for Debian by Sam Hartman <hartmans@mit.edu>
+ * conform to FHS
+ */
 /*
  * Copyright 2000, International Business Machines Corporation and others.
  * All Rights Reserved.
@@ -5,6 +8,10 @@
  * This software has been released under the terms of the IBM Public
  * License.  For details, see the LICENSE file in the top-level source
  * directory or online at http://www.openafs.org/dl/license10.html
+
+ */
+
+/* Copyright (C) 1998 Transarc Corporation - All rights reserved.
  */
 
 #ifndef _DIRPATH_H
@@ -94,15 +101,15 @@
 /* -----------------  Directory/file name macros ------------------ */
 
 /* afs installation dir names */
-#define AFSDIR_ETC_DIR   "etc"
-#define AFSDIR_BIN_DIR   "bin"
+#define AFSDIR_ETC_DIR   ""
+#define AFSDIR_BIN_DIR   ""
 #define AFSDIR_CORES_DIR "cores"
 #define AFSDIR_DB_DIR    "db"
 #define AFSDIR_LOGS_DIR  "logs"
-#define AFSDIR_LOCAL_DIR "local"
+#define AFSDIR_LOCAL_DIR "server-local"
 #define AFSDIR_BACKUP_DIR "backup"
-#define AFSDIR_MIGR_DIR  "local/migrate"
-#define AFSDIR_BIN_FILE_DIR  "local/migrate/bin_files"
+#define AFSDIR_MIGR_DIR  "server-local/migrate"
+#define AFSDIR_BIN_FILE_DIR  "server-local/migrate/bin_files"
 
 /* file names */ 
 #define AFSDIR_THISCELL_FILE    "ThisCell"
@@ -158,24 +165,23 @@
  */
 
 #define AFSDIR_CANONICAL_USR_DIRPATH            "/usr"
-#define AFSDIR_CANONICAL_SERVER_AFS_DIRPATH     "/usr/afs"
-#define AFSDIR_CANONICAL_CLIENT_VICE_DIRPATH    "/usr/vice"
+#define AFSDIR_CANONICAL_SERVER_AFS_DIRPATH     "/etc/openafs"
+#define AFSDIR_CANONICAL_CLIENT_VICE_DIRPATH    "/etc/openafs"
 #ifdef AFS_DARWIN_ENV
 #define AFSDIR_ALTERNATE_CLIENT_VICE_DIRPATH    "/var/db/openafs"
 #endif
 
+
 #define AFSDIR_CANONICAL_SERVER_BIN_DIRPATH \
-AFSDIR_CANONICAL_SERVER_AFS_DIRPATH "/" AFSDIR_BIN_DIR
+ "/usr/lib/openafs/" AFSDIR_BIN_DIR
 
 #define AFSDIR_CANONICAL_SERVER_ETC_DIRPATH \
-AFSDIR_CANONICAL_SERVER_AFS_DIRPATH "/" AFSDIR_ETC_DIR
+AFSDIR_CANONICAL_SERVER_AFS_DIRPATH "/server"
 
 #define AFSDIR_CANONICAL_SERVER_LOGS_DIRPATH \
-AFSDIR_CANONICAL_SERVER_AFS_DIRPATH "/" AFSDIR_LOGS_DIR
-
+"/var/log/openafs/" 
 #define AFSDIR_CANONICAL_SERVER_LOCAL_DIRPATH \
-AFSDIR_CANONICAL_SERVER_AFS_DIRPATH "/" AFSDIR_LOCAL_DIR
-
+   "/etc/openafs/server-local"
 
 #define AFSDIR_CANONICAL_SERVER_SALVAGER_FILEPATH \
 AFSDIR_CANONICAL_SERVER_BIN_DIRPATH "/" AFSDIR_SALVAGER_FILE
--- openafs-1.0.4.orig/src/venus/Makefile
+++ openafs-1.0.4/src/venus/Makefile
@@ -59,7 +59,7 @@
 
 cacheout.o: cacheout.c
 
-all: fs up cmdebug fstrace kdump gcpags kdump64
+all: fs up cmdebug fstrace  gcpags 
 
 ${DESTDIR}bin/fs ${DESTDIR}root.server/usr/afs/bin/fs: fs
 	${INSTALL} -s $? $@
@@ -72,12 +72,36 @@
 
 ${DESTDIR}bin/cmdebug: cmdebug
 	${INSTALL} -s $? $@
+# ${DESTDIR}etc/kdump: kdump
+# 	set -x; \
+# 	case ${SYS_NAME} in \
+# 	sgi_6? ) \
+# 		${INSTALLex} kdump.sh.sgi_ipnos $@; \
+# 		ln -fs kdump ${DESTDIR}etc/kdump32; \
+# 		ln -fs kdump.IP20 ${DESTDIR}etc/kdump.IP22; \
+# 		ln -fs kdump.IP20 ${DESTDIR}etc/kdump.IP32; \
+# 		for f in kdump.IP??; \
+# 		do ${INSTALL} -s $$f ${DESTDIR}etc/$$f || exit $$? ; \
+# 		done ;; \
+# 	sun4x_57 ) \
+# 		${INSTALLex} kdump.sh.solaris7 $@; \
+# 		${INSTALL} -s -f $? ${DESTDIR}etc/kdump32;; \
+# 	*linux* ) \
+# 		for lv in ${LINUX_VERS}; do \
+# 			${INSTALL} -s kdump-$$lv ${DESTDIR}etc/kdump-$$lv ; \
+# 		done ;; \
+# 	hp_ux11* ) \
+# 		${INSTALLex} kdump.sh.hp_ux11 $@; \
+# 		${INSTALL} -s -f $? ${DESTDIR}etc/kdump32;; \
+# 	*) \
+# 		${INSTALL} -s $? $@ ;; \
+# 	esac
 
 ${DESTDIR}etc/kdump: kdump
 	-set -x; \
 	case ${SYS_NAME} in \
 	sgi_6? ) \
-		${INSTALLex} -f kdump.sh.sgi_ipnos $@; \
+		${INSTALLex}  kdump.sh.sgi_ipnos $@; \
 		ln -fs kdump ${DESTDIR}etc/kdump32; \
 		ln -fs kdump.IP20 ${DESTDIR}etc/kdump.IP22; \
 		ln -fs kdump.IP20 ${DESTDIR}etc/kdump.IP32; \
@@ -85,14 +109,14 @@
 		do ${INSTALL} -s $$f ${DESTDIR}etc/$$f || exit $$? ; \
 		done ;; \
 	sun4x_57 ) \
-		${INSTALLex} -f kdump.sh.solaris7 $@; \
+		${INSTALLex} kdump.sh.solaris7 $@; \
 		${INSTALL} -s -f $? ${DESTDIR}etc/kdump32;; \
 	*linux* ) \
 		for lv in ${LINUX_VERS}; do \
 			${INSTALL} -s kdump-$$lv ${DESTDIR}etc/kdump-$$lv ; \
 		done ;; \
 	hp_ux11* ) \
-		${INSTALLex} -f kdump.sh.hp_ux11 $@; \
+		${INSTALLex} kdump.sh.hp_ux11 $@; \
 		${INSTALL} -s -f $? ${DESTDIR}etc/kdump32;; \
 	*) \
 		${INSTALL} -s $? $@ ;; \
@@ -107,10 +131,9 @@
 		echo skipping kdump64 for ${SYS_NAME} ;; \
 	esac
 
-
 install: all ${DESTDIR}bin/fs ${DESTDIR}root.server/usr/afs/bin/fs \
 	${DESTDIR}bin/up ${DESTDIR}etc/fstrace ${DESTDIR}bin/cmdebug \
-	${DESTDIR}etc/kdump ${DESTDIR}etc/kdump64
+	 
 
 system: install
 
--- openafs-1.0.4.orig/ChangeLog
+++ openafs-1.0.4/ChangeLog
@@ -0,0 +1,476 @@
+2001-03-07 12:58  shadow
+
+	* src/config/Makefile.version-NOCML: DELTA
+	fix-typo-in-stable-20010307 AUTHOR shadow@dementia.org
+
+2001-03-06 17:34  shadow
+
+	* src/config/Makefile.version-NOCML: DELTA
+	create-openafs-stable-103-20010306 AUTHOR shadow@dementia.org
+
+2001-03-06 17:30  shadow
+
+	* src/comerr/et_lex.lex.l: DELTA
+	make-comerr-tolerate-different-eol-convention-20010306 AUTHOR
+	elorenzo@arsdigita.com
+
+2001-03-06 17:30  shadow
+
+	* src/afsd/afsd.c: DELTA make-afsd-be-less-annoying-20010306 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 17:29  shadow
+
+	* src/libuafs/MakefileProto.AIX: DELTA
+	xlc-r-on-path-not-usr-bin-20010306 AUTHOR shadow@dementia.org
+
+2001-03-06 17:28  shadow
+
+	* src/export/Makefile: DELTA
+	use-dollar-cc-not-cc-for-aix-exporter-20010305 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 17:27  shadow
+
+	* src/util/snprintf.c: DELTA
+	make-snprintf-compile-on-aix-433-20010305 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 17:27  shadow
+
+	* src/bozo/bosserver.c: DELTA
+	make-bosserver-be-less-annoying-20010305 AUTHOR shadow@dementia.org
+
+2001-03-06 17:26  shadow
+
+	* src/Makefile: DELTA restore-rxdebug-to-the-living-20010305 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 17:25  shadow
+
+	* src/kauth/krb_udp.c: DELTA
+	return-truncated-reason-from-krb-udp-interface-20010305 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 17:24  shadow
+
+	* src/pam/: afs_message.c, afs_message.h, afs_password.c: DELTA
+	pam-afs-password-changing-support-20010305 AUTHOR
+	zrsha01@zdv.uni-tuebingen.de
+
+2001-03-06 17:23  shadow
+
+	* src/: lwp/Makefile, lwp/lwp.c, lwp/preempt.c, lwp/process.c,
+	lwp/process.s, config/Makefile.s390_linux22,
+	libafs/MakefileProto.LINUX: DELTA afs-linux-s390-updates-20010305
+	AUTHOR adam@sinenomine.net
+
+2001-03-06 17:22  shadow
+
+	* src/: sys/afssyscalls.h, vol/partition.c,
+	config/param.sun4x_58.h, afs/SOLARIS/osi_vnodeops.c: DELTA
+	support-namei-fileserver-on-solaris8-20010305 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 17:21  shadow
+
+	* src/Makefile: DELTA allow-shadowed-src-trees-20010305 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 17:21  shadow
+
+	* src/ntp/: ntp_proto.c, ntpsubs.c: DELTA
+	ntp-for-solaris-58-20010305 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 17:20  shadow
+
+	* src/: afs/DUX/osi_vfsops.c, util/snprintf.c: DELTA
+	support-dux-51-20010305 AUTHOR joda@pdc.kth.se
+
+2001-03-06 17:19  shadow
+
+	* src/config/: param.i386_linux22.h, param.i386_linux24.h: DELTA
+	linux-libafs-with-modversions-20010228 AUTHOR md5i@cs.cmu.edu
+
+2001-03-06 17:18  shadow
+
+	* src/afs/VNOPS/afs_vnop_lookup.c: DELTA
+	afs-lookup-check-evalmountpoint-return-20010221 AUTHOR
+	kolya@mit.edu
+
+2001-03-06 17:17  shadow
+
+	* src/bucoord/vol_sets.c: DELTA backup-addvolentry-fix-20010221
+	AUTHOR mattiasa@e.kth.se
+
+2001-03-06 17:17  shadow
+
+	* src/bozo/fsbnodeops.c: DELTA bos-mrafs-support-20010221 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 17:16  shadow
+
+	* src/README: DELTA update-README-20010213 AUTHOR nneul@umr.edu
+
+2001-03-06 17:15  shadow
+
+	* src/util/snprintf.c: DELTA snprintf-for-aix-not-irix-20010212
+	AUTHOR shadow@dementia.org
+
+2001-03-06 17:14  shadow
+
+	* src/util/: Makefile, snprintf.c: DELTA
+	provide-snprintf-for-irix-dux-20010212 AUTHOR shadow@dementia.org
+
+2001-03-06 17:14  shadow
+
+	* src/libafs/: MakefileProto.AIX, MakefileProto.LINUX: DELTA
+	revert-xdr-int64-in-favor-of-common-makefile-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 17:11  shadow
+
+	* src/auth/ktc.c: DELTA rework-ktc-to-allow-dummy-libkrb-20010212
+	AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 17:08  shadow
+
+	* src/util/serverLog.c: DELTA mrafs-server-log-handling-20010212
+	AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 17:07  shadow
+
+	* src/util/errors.h: DELTA mrafs-util-update-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 17:07  shadow
+
+	* src/util/: dirpath.c, dirpath.h: DELTA
+	dirpath-mrafs-additions-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 17:02  shadow
+
+	* src/tviced/: Makefile, NTMakefile: DELTA
+	export-threadnames-totviced-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 17:01  shadow
+
+	* src/rx/rx_rdwr.c: DELTA rx-writevinit-for-mrafs-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 17:00  shadow
+
+	* src/rx/rx_lwp.c: DELTA export-thread-id-info-in-rx-lwp-20010212
+	AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 17:00  shadow
+
+	* src/rx/rx_kernel.h: DELTA
+	nicer-dummy-rxi-startserverprocs-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:58  shadow
+
+	* src/rx/: rx.c, rx_clock.c, rx_clock_nt.c: DELTA
+	allow-rx-shutdown-for-userlevel-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:58  shadow
+
+	* src/rx/NTMakefile: DELTA rx-nt-xdr-int64-support-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 16:57  shadow
+
+	* src/lwp/: Makefile, NTMakefile, lock.h, lwp.c, lwp_nt.c,
+	threadname.c: DELTA thread-identification-routines-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 16:55  shadow
+
+	* src/libafsrpc/: NTMakefile, afsrpc.exp: DELTA
+	libafsrpc-xdr-int64-support-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:54  shadow
+
+	* src/libafs/Makefile.common: DELTA
+	include-xdr-int64-in-libafs-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:53  shadow
+
+	* src/kauth/user.c: DELTA
+	export-kauth-GetTickets-for-dummy-libkrb-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 16:53  shadow
+
+	* src/ftpd43+/getusershell.c: DELTA ftpd-placate-aix-20010212
+	AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:52  shadow
+
+	* src/config/stds.h: DELTA clean-up-64bit-mod-spacing-20010212
+	AUTHOR shadow@dementia.org
+
+2001-03-06 16:52  shadow
+
+	* src/config/param.rs_aix42.h: DELTA
+	update-rs-aix42-afs-syscall-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:51  shadow
+
+	* src/cmd/: cmd.c, cmd.p.h: DELTA
+	cmd-suite-option-for-hiding-admin-commands-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 16:50  shadow
+
+	* src/bozo/bosserver.c: DELTA
+	bosserver-rx-initialization-failed-warning-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 16:49  shadow
+
+	* src/: bozo/bos.c, kauth/kaserver.c, ptserver/ptserver.c,
+	vlserver/vlserver.c, auth/cellconfig.c, auth/writeconfig.c,
+	ubik/beacon.c, ubik/recovery.c, ubik/ubik.c, ubik/ubik.p.h,
+	ubik/ubik_int.xg, ubik/udebug.c, ubik/vote.c: DELTA
+	ubik-clone-support-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:47  shadow
+
+	* src/: bozo/bos.c, bozo/fsbnodeops.c, util/volparse.c: DELTA
+	bos-mrafs-support-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:47  shadow
+
+	* src/bozo/bnode.c: DELTA
+	bozo-save-old-cores-by-date-option-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 16:46  shadow
+
+	* src/auth/: cellconfig.c, cellconfig.p.h: DELTA
+	mrafs-port-definitions-20010212 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:44  shadow
+
+	* src/audit/audit.h: DELTA mrafs-audit-types-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 16:44  shadow
+
+	* src/WINNT/afssvrmgr/svc_create.cpp: DELTA
+	svc-create-servicetype-to-afsservicetype-20010212 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 16:43  shadow
+
+	* src/util/snprintf.c: DELTA include-snprintf-in-util-20010211
+	AUTHOR jhutz@cmu.edu
+
+2001-03-06 16:42  shadow
+
+	* src/kauth/krb_udp.c: DELTA
+	use-snprintf-for-krb-udp-error-packets-20010210 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 16:41  shadow
+
+	* src/afs/DUX/osi_inode.c: DELTA dux50-osi-inode-fix-20010210
+	AUTHOR joda@pdc.kth.se
+
+2001-03-06 16:40  shadow
+
+	* src/config/stds.h: DELTA fix-64bit-stds-h-patch-20010210 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 16:39  shadow
+
+	* src/README: DELTA update-systypes-in-README-20010210 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 16:38  shadow
+
+	* src/: afs/afs_pioctl.c, afs/afs_stats.h, afs/afs_trace.et,
+	config/param.i386_linux22.h, config/stds.h, config/venus.h,
+	fsint/afsint.xg, libafs/MakefileProto.AIX,
+	libafs/MakefileProto.LINUX, libafsrpc/Makefile,
+	libuafs/Makefile.common, rx/Makefile, rx/xdr.h, rx/xdr_int64.c,
+	rxgen/rpc_main.c, viced/afsfileprocs.c: DELTA
+	mrafs-client-extensions-including-afs-int64-20010210 AUTHOR
+	reuter@rzg.mpg.de
+
+2001-03-06 16:32  shadow
+
+	* src/pam/: afs_auth.c, afs_message.c, afs_message.h,
+	afs_setcred.c: DELTA pam-afs-trust-root-login-20010210 AUTHOR
+	jacobi@de.ibm.com
+
+2001-03-06 16:23  shadow
+
+	* src/: Makefile, config/Makefile.alpha_dux50,
+	config/afs_sysnames.h, config/param.alpha_dux50.h,
+	config/param.alpha_dux50_usr.h, afs/afs_osi.c, afs/DUX/osi_inode.c,
+	afs/DUX/osi_vfsops.c, afs/DUX/osi_vnodeops.c,
+	afs/VNOPS/afs_vnop_write.c, rx/Makefile, libafs/MakefileProto.DUX:
+	DELTA tru64-50-initial-support-20010210 AUTHOR joda@pdc.kth.se
+
+2001-03-06 16:21  shadow
+
+	* src/WINNT/afsd/smb3.c: DELTA
+	winnt-directory-scan-memory-leak-20010210 AUTHOR
+	jimpeter@us.ibm.com
+
+2001-03-06 16:20  shadow
+
+	* src/afs/IRIX/osi_inode.c: DELTA
+	make-icreate-exist-always-for-irix65-20010207 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 16:17  shadow
+
+	* src/tviced/Makefile: DELTA
+	remove-libefs-Makefile-reference-20010207 AUTHOR nneul@umr.edu
+
+2001-03-06 16:16  shadow
+
+	* src/README: DELTA minor-README-reorg-20010207 AUTHOR ssen@MIT.EDU
+
+2001-03-06 16:16  shadow
+
+	* src/libafs/sgi_master: DELTA add-ssi-master-file-20010207 AUTHOR
+	shadow@dementia.org
+
+2001-03-06 16:13  shadow
+
+	* src/afs/IRIX/: osi_inode.c, osi_vnodeops.c: DELTA
+	more-irix65-fixes-for-no-libefs-20010207 AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:13  shadow
+
+	* src/afs/LINUX/osi_vfs.h: DELTA
+	fix-missattributed-loff-t-ifdef-20010207 AUTHOR nneul@umr.edu
+
+2001-03-06 16:12  shadow
+
+	* src/afs/VNOPS/afs_vnop_readdir.c: DELTA
+	fix-solaris-afs-readdir-move-20010131 AUTHOR chas@cmf.nrl.navy.mil
+	VS:	   afs_vnop_readdir.c CS:
+	-------------------------------------------------------------------
+	---
+
+2001-03-06 16:10  shadow
+
+	* src/: vol/Makefile, vol/devname.c, vol/listinodes.c,
+	vol/volume.c, vol/xfs_size_check.c, volser/Makefile, rx/rx.c,
+	libafs/MakefileProto.IRIX, afs/sysincludes.h, afs/IRIX/osi_file.c,
+	afs/IRIX/osi_inode.c: DELTA sgi_65-compilation-patches-20010131
+	AUTHOR reuter@rzg.mpg.de
+
+2001-03-06 16:09  shadow
+
+	* src/afsd/afs.rc.solaris.2.7: DELTA
+	fix-solaris7-afsd-rc-copyright-message-20010131 AUTHOR
+	nneul@umr.edu
+
+2001-03-06 16:08  shadow
+
+	* src/afs/LINUX/: osi_file.c, osi_misc.c, osi_vfsops.c,
+	osi_vnodeops.c: DELTA linux-iput-and-glock-changes-20010130 AUTHOR
+	chas@cmf.nrl.navy.mil
+
+2001-03-06 16:06  shadow
+
+	* src/afs/LINUX/: osi_vfs.h, osi_vnodeops.c: DELTA
+	support-reiserfs-20010129 AUTHOR cg2v@andrew.cmu.edu
+
+2001-03-06 16:05  shadow
+
+	* src/: bozo/bosserver.c, util/dirpath.c, util/dirpath.h: DELTA
+	allow-new-bosconfig-file-and-rename-into-place-20010129 AUTHOR
+	cg2v@andrew.cmu.edu
+
+2001-03-06 16:03  shadow
+
+	* src/bozo/: bos.c, bosint.xg, bosoprocs.c, bosserver.c: DELTA
+	implement-bos-restricted-mode-20010129 AUTHOR cg2v@andrew.cmu.edu
+
+2001-03-06 16:02  shadow
+
+	* src/WINNT/client_config/drivemap.cpp: DELTA
+	drive-letter-tabs-for-submounts-containing-string-afs-20010119
+	AUTHOR dkoziol@dragonflymobile.com "The following patch is to
+	addresses problems with the Drive Letters tabs in the AFS Client
+	and AFS Control Panel when using submounts which start with the
+	letters afs.  We had a test cell up and running with a name that
+	started with afs01 and this caused the afs client to misbehave."
+
+2001-03-05 17:47  shadow
+
+	* src/util/snprintf.c: DELTA
+	make-snprintf-compile-on-aix-433-20010305 AUTHOR
+	shadow@dementia.org AF_INET is in sys/socket.h on AIX 4.3.3
+
+2001-03-05 10:12  shadow
+
+	* src/util/snprintf.c: DELTA support-dux-51-20010305 AUTHOR
+	joda@pdc.kth.se Changes needed for OpenAFS Tru64 5.1 support
+
+2001-02-12 22:54  shadow
+
+	* src/util/snprintf.c: DELTA snprintf-for-aix-not-irix-20010212
+	AUTHOR shadow@dementia.org Irix 6.5 has snprintf
+
+2001-02-12 22:46  shadow
+
+	* src/util/snprintf.c: DELTA provide-snprintf-for-irix-dux-20010212
+	AUTHOR shadow@dementia.org So we can use snprintf, provide it for
+	platforms that don't have it
+
+2001-02-12 12:35  shadow
+
+	* src/lwp/threadname.c: DELTA
+	thread-identification-routines-20010212 AUTHOR reuter@rzg.mpg.de
+	Needed to identify thread in serverlog for mrafs
+
+2001-02-11 10:05  shadow
+
+	* src/util/snprintf.c: DELTA include-snprintf-in-util-20010211
+	AUTHOR jhutz@cmu.edu For platforms which need snprintf, this should
+	be suitable for AC_REPLACE_FUNCS when we get that far
+
+2001-02-10 16:26  shadow
+
+	* src/rx/xdr_int64.c: DELTA
+	mrafs-client-extensions-including-afs-int64-20010210 AUTHOR
+	reuter@rzg.mpg.de "	  Extensions used by MR-AFS in the client.
+	I have added only two	      pioctl-calls which are used by the
+	"fs"-command for a large number 	of MR-AFS specific
+	subcommands. With this modification also the	     data type
+	afs_int64 is introduced because MR-AFS supports large files.	   
+	  afs_int64 is either "long long" or a structure consisting of two 
+		32-bit numbers. We are already running on rs_aix42 a fully
+	large-file	    capable AFS-client, but these changes are still
+	in a beta test and	    not yet added here."
+
+2001-02-10 15:57  shadow
+
+	* src/config/: Makefile.alpha_dux50, param.alpha_dux50.h,
+	param.alpha_dux50_usr.h: DELTA tru64-50-initial-support-20010210
+	AUTHOR joda@pdc.kth.se makes client work under 5.0A, untested with
+	5.0 or 5.1
+
+2001-02-07 10:21  shadow
+
+	* src/libafs/sgi_master: DELTA add-ssi-master-file-20010207 AUTHOR
+	shadow@dementia.org First guess at this file based on master(4); I
+	haven't tried this yet but since it seems to be for the build-into-
+	kernel module I assume we don't need: d   dynamically loadable
+	kernel module R   auto-registrable dynamically loadable kernel
+	module N   don't allow auto-unload of dynamically loadable kernel
+	module
+	
+	and I don't know if we'd need or be able to use R, either.
+	
+	Afs_ to match what previous systems seem to be doing; For symmetry
+	it looks like it should be e.g. afs_
+
--- openafs-1.0.4.orig/LICENSE
+++ openafs-1.0.4/LICENSE
@@ -0,0 +1,233 @@
+   IBM Public License Version 1.0
+   
+   THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM
+   PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+   THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+   
+   1. DEFINITIONS
+   
+   "Contribution" means:
+   a) in the case of International Business Machines Corporation ("IBM"),
+       the Original Program, and
+       
+   b) in the case of each Contributor,
+       
+   i) changes to the Program, and
+       
+   ii) additions to the Program;
+       
+   where such changes and/or additions to the Program originate from and
+       are distributed by that particular Contributor. A Contribution
+       'originates' from a Contributor if it was added to the Program by
+       such Contributor itself or anyone acting on such Contributor's
+       behalf. Contributions do not include additions to the Program
+       which: (i) are separate modules of software distributed in
+       conjunction with the Program under their own license agreement,
+       and (ii) are not derivative works of the Program.
+       
+   "Contributor" means IBM and any other entity that distributes the
+   Program.
+   
+   "Licensed Patents " mean patent claims licensable by a Contributor
+   which are necessarily infringed by the use or sale of its Contribution
+   alone or when combined with the Program.
+   
+   "Original Program" means the original version of the software
+   accompanying this Agreement as released by IBM, including source code,
+   object code and documentation, if any.
+   
+   "Program" means the Original Program and Contributions.
+   
+   "Recipient" means anyone who receives the Program under this
+   Agreement, including all Contributors.
+   
+   2. GRANT OF RIGHTS
+   a) Subject to the terms of this Agreement, each Contributor hereby
+       grants Recipient a non-exclusive, worldwide, royalty-free
+       copyright license to reproduce, prepare derivative works of,
+       publicly display, publicly perform, distribute and sublicense the
+       Contribution of such Contributor, if any, and such derivative
+       works, in source code and object code form.
+       
+   b) Subject to the terms of this Agreement, each Contributor hereby
+       grants Recipient a non-exclusive, worldwide, royalty-free patent
+       license under Licensed Patents to make, use, sell, offer to sell,
+       import and otherwise transfer the Contribution of such
+       Contributor, if any, in source code and object code form. This
+       patent license shall apply to the combination of the Contribution
+       and the Program if, at the time the Contribution is added by the
+       Contributor, such addition of the Contribution causes such
+       combination to be covered by the Licensed Patents. The patent
+       license shall not apply to any other combinations which include
+       the Contribution. No hardware per se is licensed hereunder.
+       
+   c) Recipient understands that although each Contributor grants the
+       licenses to its Contributions set forth herein, no assurances are
+       provided by any Contributor that the Program does not infringe the
+       patent or other intellectual property rights of any other entity.
+       Each Contributor disclaims any liability to Recipient for claims
+       brought by any other entity based on infringement of intellectual
+       property rights or otherwise. As a condition to exercising the
+       rights and licenses granted hereunder, each Recipient hereby
+       assumes sole responsibility to secure any other intellectual
+       property rights needed, if any. For example, if a third party
+       patent license is required to allow Recipient to distribute the
+       Program, it is Recipient's responsibility to acquire that license
+       before distributing the Program.
+       
+   d) Each Contributor represents that to its knowledge it has sufficient
+       copyright rights in its Contribution, if any, to grant the
+       copyright license set forth in this Agreement.
+       
+   3. REQUIREMENTS
+   
+   A Contributor may choose to distribute the Program in object code form
+   under its own license agreement, provided that:
+   a) it complies with the terms and conditions of this Agreement; and
+       
+   b) its license agreement:
+       
+   i) effectively disclaims on behalf of all Contributors all warranties
+       and conditions, express and implied, including warranties or
+       conditions of title and non-infringement, and implied warranties
+       or conditions of merchantability and fitness for a particular
+       purpose;
+       
+   ii) effectively excludes on behalf of all Contributors all liability
+       for damages, including direct, indirect, special, incidental and
+       consequential damages, such as lost profits;
+       
+   iii) states that any provisions which differ from this Agreement are
+       offered by that Contributor alone and not by any other party; and
+       
+   iv) states that source code for the Program is available from such
+       Contributor, and informs licensees how to obtain it in a
+       reasonable manner on or through a medium customarily used for
+       software exchange.
+       
+   When the Program is made available in source code form:
+   a) it must be made available under this Agreement; and
+       
+   b) a copy of this Agreement must be included with each copy of the
+       Program.
+       
+   Each Contributor must include the following in a conspicuous location
+   in the Program:
+   
+   Copyright © {date here}, International Business Machines Corporation
+       and others. All Rights Reserved.
+       
+   In addition, each Contributor must identify itself as the originator
+   of its Contribution, if any, in a manner that reasonably allows
+   subsequent Recipients to identify the originator of the Contribution.
+   
+   4. COMMERCIAL DISTRIBUTION
+   
+   Commercial distributors of software may accept certain
+   responsibilities with respect to end users, business partners and the
+   like. While this license is intended to facilitate the commercial use
+   of the Program, the Contributor who includes the Program in a
+   commercial product offering should do so in a manner which does not
+   create potential liability for other Contributors. Therefore, if a
+   Contributor includes the Program in a commercial product offering,
+   such Contributor ("Commercial Contributor") hereby agrees to defend
+   and indemnify every other Contributor ("Indemnified Contributor")
+   against any losses, damages and costs (collectively "Losses") arising
+   from claims, lawsuits and other legal actions brought by a third party
+   against the Indemnified Contributor to the extent caused by the acts
+   or omissions of such Commercial Contributor in connection with its
+   distribution of the Program in a commercial product offering. The
+   obligations in this section do not apply to any claims or Losses
+   relating to any actual or alleged intellectual property infringement.
+   In order to qualify, an Indemnified Contributor must: a) promptly
+   notify the Commercial Contributor in writing of such claim, and b)
+   allow the Commercial Contributor to control, and cooperate with the
+   Commercial Contributor in, the defense and any related settlement
+   negotiations. The Indemnified Contributor may participate in any such
+   claim at its own expense.
+   
+   For example, a Contributor might include the Program in a commercial
+   product offering, Product X. That Contributor is then a Commercial
+   Contributor. If that Commercial Contributor then makes performance
+   claims, or offers warranties related to Product X, those performance
+   claims and warranties are such Commercial Contributor's responsibility
+   alone. Under this section, the Commercial Contributor would have to
+   defend claims against the other Contributors related to those
+   performance claims and warranties, and if a court requires any other
+   Contributor to pay any damages as a result, the Commercial Contributor
+   must pay those damages.
+   
+   5. NO WARRANTY
+   
+   EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+   PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
+   WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+   OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+   responsible for determining the appropriateness of using and
+   distributing the Program and assumes all risks associated with its
+   exercise of rights under this Agreement, including but not limited to
+   the risks and costs of program errors, compliance with applicable
+   laws, damage to or loss of data, programs or equipment, and
+   unavailability or interruption of operations.
+   
+   6. DISCLAIMER OF LIABILITY
+   
+   EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
+   ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+   WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+   DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+   HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+   
+   7. GENERAL
+   
+   If any provision of this Agreement is invalid or unenforceable under
+   applicable law, it shall not affect the validity or enforceability of
+   the remainder of the terms of this Agreement, and without further
+   action by the parties hereto, such provision shall be reformed to the
+   minimum extent necessary to make such provision valid and enforceable.
+   
+   If Recipient institutes patent litigation against a Contributor with
+   respect to a patent applicable to software (including a cross-claim or
+   counterclaim in a lawsuit), then any patent licenses granted by that
+   Contributor to such Recipient under this Agreement shall terminate as
+   of the date such litigation is filed. In addition, If Recipient
+   institutes patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Program
+   itself (excluding combinations of the Program with other software or
+   hardware) infringes such Recipient's patent(s), then such Recipient's
+   rights granted under Section 2(b) shall terminate as of the date such
+   litigation is filed.
+   
+   All Recipient's rights under this Agreement shall terminate if it
+   fails to comply with any of the material terms or conditions of this
+   Agreement and does not cure such failure in a reasonable period of
+   time after becoming aware of such noncompliance. If all Recipient's
+   rights under this Agreement terminate, Recipient agrees to cease use
+   and distribution of the Program as soon as reasonably practicable.
+   However, Recipient's obligations under this Agreement and any licenses
+   granted by Recipient relating to the Program shall continue and
+   survive.
+   
+   IBM may publish new versions (including revisions) of this Agreement
+   from time to time. Each new version of the Agreement will be given a
+   distinguishing version number. The Program (including Contributions)
+   may always be distributed subject to the version of the Agreement
+   under which it was received. In addition, after a new version of the
+   Agreement is published, Contributor may elect to distribute the
+   Program (including its Contributions) under the new version. No one
+   other than IBM has the right to modify this Agreement. Except as
+   expressly stated in Sections 2(a) and 2(b) above, Recipient receives
+   no rights or licenses to the intellectual property of any Contributor
+   under this Agreement, whether expressly, by implication, estoppel or
+   otherwise. All rights in the Program not expressly granted under this
+   Agreement are reserved.
+   
+   This Agreement is governed by the laws of the State of New York and
+   the intellectual property laws of the United States of America. No
+   party to this Agreement will bring a legal action under this Agreement
+   more than one year after the cause of action arose. Each party waives
+   its rights to a jury trial in any resulting litigation.
--- openafs-1.0.4.orig/debian/CellServDB
+++ openafs-1.0.4/debian/CellServDB
@@ -0,0 +1,39 @@
+>andrew.cmu.edu		#Carnegie Mellon University - Computing Services
+128.2.10.11			#vice11.fs.andrew.cmu.edu
+128.2.10.12			#vice12.fs.andrew.cmu.edu
+128.2.10.2			#vice2.fs.andrew.cmu.edu
+128.2.10.28			#vice28.fs.andrew.cmu.edu
+128.2.10.7			#vice7.fs.andrew.cmu.edu
+>cs.cmu.edu		#Carnegie Mellon University - School of Comp. Sci.
+128.2.206.130			#cucumber.srv.cs.cmu.edu
+128.2.222.199			#papaya.srv.cs.cmu.edu
+128.2.242.86			#lemon.srv.cs.cmu.edu
+>ece.cmu.edu		#Carnegie Mellon University - Elec. Comp. Eng. Dept.
+128.2.129.7			#porok.ece.cmu.edu
+128.2.129.8			#vicio.ece.cmu.edu
+128.2.129.9			#e-xing.ece.cmu.edu
+>athena.mit.edu		#MIT/Athena cell
+18.70.0.6			#prill.mit.edu.
+18.145.0.25			#agamemnon.mit.edu.
+18.159.0.34			#chimera.mit.edu.
+>dev.mit.edu		#MIT/IS Development cell
+18.86.0.28			#wham.mit.edu.
+18.86.0.50			#hum.mit.edu.
+18.86.0.51			#rattle.mit.edu.
+>net.mit.edu		#MIT/Network Group cell
+18.72.1.38			#gracie.mit.edu.
+18.72.0.26			#cetus.mit.edu.
+>sipb.mit.edu		#MIT/SIPB cell
+18.181.0.19			#reynelda.mit.edu.
+18.181.0.23			#ronald-ann.mit.edu.
+18.181.0.22			#rosebud.mit.edu.
+>ir.stanford.edu	#Stanford University
+171.64.7.222			#afsdb1.stanford.edu
+171.64.7.234			#afsdb2.stanford.edu
+171.64.7.246			#afsdb3.stanford.edu
+>umr.edu		#University of Missouri - Rolla
+131.151.1.59			#afs1.umr.edu
+131.151.1.70			#afs6.umr.edu
+131.151.1.146			#afs5.umr.edu
+>dementia.org		#Dementia Unlimited
+128.2.35.149			#alycia.dementia.org
--- openafs-1.0.4.orig/debian/rules
+++ openafs-1.0.4/debian/rules
@@ -0,0 +1,269 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper. 
+# GNU copyright 1997 by Joey Hess.
+#
+# This version is for a hypothetical package that builds an
+# architecture-dependant package, as well as an architecture-independent
+# package.
+
+# Uncomment this to turn on verbose mode. 
+#export DH_VERBOSE=1
+
+# This is the debhelper compatability version to use.
+export DH_COMPAT=2
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+# The AFS sysname is determined by a script
+KVERS=`awk '{ if (NR==1) v=$$3; else if (NR==2) p=$$3; else if (NR==3) s=$$3; \
+       else if (NR==4) { e=$$3; exit; } } \
+       END { printf("%s.%s.%s%s\n",v,p,s,e); }' $(KSRC)/Makefile`
+SYS_NAME=$(shell KVERS=$(KVERS) sh debian/sysname)
+package=openafs
+srcpkg = openafs-modules-source
+modulepkg=$(shell echo openafs-modules-$(KVERS))
+ifndef KSRC
+KSRC=/usr/src/linux
+endif
+MODDIR=..
+
+export KSRC 
+export KVERS
+
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	-mkdir $(SYS_NAME)
+	-mkdir $(SYS_NAME)/obj
+	-mkdir $(SYS_NAME)/dest
+	-ln -s @sys/dest dest
+	-ln -s @sys/obj obj
+	-ln -s $(SYS_NAME) @sys
+	-ln -s src/Makefile Makefile
+
+
+		$(MAKE) links
+	install -d dest/root.client/usr/vice/etc
+	install -d dest/root.server/usr/afs/bin
+
+	touch configure-stamp
+
+build: configure-stamp build-stamp
+build-stamp:
+	dh_testdir
+
+	$(MAKE) SYS_NAME=$(SYS_NAME)
+	mkdir -p debian/openafs-dbserver/usr/share/man/man8
+		/usr/bin/docbook-to-man debian/pt_util.sgml  \
+		>debian/openafs-dbserver/usr/share/man/man8/pt_util.8
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	-rm -rf obj dest $(SYS_NAME) @sys Makefile debian/openafs-client.init
+	# Add here commands to clean up after the build process.
+
+
+	dh_clean
+
+install: DH_OPTIONS=
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp.
+	cat debian/filelist |sh debian/movefiles
+	cp debian/CellServDB debian/openafs-client/usr/share/openafs
+	cp dest/root.client/usr/vice/etc/afs.rc debian/openafs-client.init
+	cp dest/root.client/usr/vice/etc/afs.conf debian/openafs-client/etc/openafs/afs.conf
+	install -m 755 -o root -g root debian/afs-rootvol debian/openafs-dbserver/usr/sbin
+	install -g root -o root -m 755 debian/afs-newcell \
+		debian/openafs-dbserver/usr/sbin
+	install -D -m 644 debian/ConfigUtils.pm \
+		debian/openafs-dbserver/usr/lib/perl5/Debian/OpenAFS/ConfigUtils.pm
+	(cd debian&&pod2man --section 8 --center "Debian GNU/Linux"  \
+		afs-rootvol ) >debian/openafs-dbserver/usr/share/man/man8/afs-rootvol.8
+	(cd debian&&pod2man --section 8 --center "Debian GNU/Linux"  \
+		afs-newcell ) >debian/openafs-dbserver/usr/share/man/man8/afs-newcell.8
+	# No, includes should not have the x bit set
+	find debian/libopenafs-dev/usr/include -type f -print | \
+		xargs chmod a-x
+	# And drop the pam modules
+	rm debian/libopenafs-dev/usr/lib/*pam*
+
+# Build architecture-independent files here.
+# Pass -i to all debhelper commands in this target to reduce clutter.
+binary-indep: DH_OPTIONS=-i
+binary-indep: build install binary-source
+	# Need this version of debhelper for DH_OPTIONS to work.
+	dh_testversion 1.1.17
+	dh_testdir
+	dh_testroot
+#	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installinit
+	dh_installcron
+#	dh_installmanpages
+	dh_installinfo
+	dh_undocumented
+	dh_installchangelogs  ChangeLog
+	dh_link
+	dh_compress
+	dh_fixperms
+	# You may want to make some executables suid here.
+	dh_suidregister
+	dh_installdeb
+#	dh_perl
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture-dependent files here.
+# Pass -a to all debhelper commands in this target to reduce clutter.
+binary-arch: DH_OPTIONS=-a
+binary-arch: build install
+	# Need this version of debhelper for DH_OPTIONS to work.
+	dh_testversion 1.1.17
+	dh_testdir
+	dh_testroot
+	dh_installdebconf
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+#	dh_installemacsen
+#	dh_installpam
+	DH_OPTIONS= dh_installinit -popenafs-client -r -- defaults 25 18
+	DH_OPTIONS= dh_installinit -popenafs-fileserver -r
+	dh_installcron
+#	dh_installmanpages
+	dh_installinfo
+	dh_undocumented
+	dh_installchangelogs  ChangeLog
+	dh_strip
+	dh_link
+	dh_compress
+	dh_fixperms
+	# You may want to make some executables suid here.
+	chmod 700 debian/openafs-client/var/cache/openafs
+	chmod 700 debian/openafs-fileserver/etc/openafs/server
+	chmod 700 debian/openafs-dbserver/var/lib/openafs/db
+	chmod 700 debian/openafs-fileserver/var/lib/openafs/cores
+	dh_suidregister
+	dh_installdeb
+#	dh_makeshlibs
+#	dh_perl
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary:  binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install configure
+
+############################Module package support
+kdist_image:  build-modules
+	$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. binary-modules
+	$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. clean
+
+kdist:  build-modules
+	$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. KERNEL_DEPENDS=y binary-modules
+	KSRC="$(KSRC)" KMAINT="$(KMAINT)" KEMAIL="$(KEMAIL)" \
+		sh -v debian/genchanges.sh
+	$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. clean
+
+
+
+kdist_config: configure
+
+kdist_clean: clean
+
+############################ source stuff #################################
+binary-source:
+# Perform some tests
+	test -f debian/rules
+	test `id -u` = "0"
+
+
+# Setup everything first
+	-rm -rf debian/$(srcpkg) debian/substvars
+	install -d debian/$(srcpkg)
+# Clean up the sources	
+	install -d debian/$(srcpkg)/usr/src/modules/$(package)
+	find . \( -name \*.o -o -path ./debian/$(srcpkg) -o -path \*/CVS -o -path ./src/WINNT  \
+		-o -path ./obj -o -path ./$(SYS_NAME)  \
+	-o \( -path ./debian/\* -type d \) \
+	-o -path ./debian/\*debhelper \) -prune -o -print | \
+		cpio -admp debian/$(srcpkg)/usr/src/modules/$(package)
+	( cd debian/$(srcpkg)/usr/src/modules/$(package)&& \
+		$(MAKE) -f debian/rules clean && \
+		mv debian/kern-sysname debian/sysname)
+	chown -R root.root debian/$(srcpkg)
+	find debian/$(srcpkg) -type d | xargs chmod 755
+	find debian/$(srcpkg) -type f -perm -100 | xargs chmod 755
+	find debian/$(srcpkg) -type f -not -perm -100 | xargs chmod 644
+	cd debian/$(srcpkg)/usr/src && \
+	  tar cf $(package).tar modules && \
+	  $(RM) -r modules/$(package)
+	gzip -9 debian/$(srcpkg)/usr/src/$(package).tar
+	chmod 644 debian/$(srcpkg)/usr/src/$(package).tar.gz
+############################ modules stuff #################################
+
+build-modules: build-modules-stamp
+
+build-modules-stamp: configure-stamp
+	$(MAKE) SYS_NAME=$(SYS_NAME) lwp 
+	$(MAKE) SYS_NAME=$(SYS_NAME) libafs
+	touch build-modules-stamp
+
+binary-modules: build-modules
+# Perform some tests
+	test -f debian/rules
+	test `id -u` = "0"
+
+# Setup everything first
+	-rm -rf debian/$(modulepkg) debian/substvars
+	install -d debian/$(modulepkg)
+
+# Install the software
+	install -d -g root -o root -m 755 debian/$(modulepkg)/lib/modules/$(KVERS)/fs
+	install -g root -o root -m 755  dest/root.client/usr/vice/etc/modload/*.o \
+		debian/$(modulepkg)/lib/modules/$(KVERS)/fs
+# Fix some stuff up
+	install -d -o root -g root -m 755 debian/$(modulepkg)/usr/share/doc
+	ln -s openafs-client debian/$(modulepkg)/usr/share/doc/$(modulepkg)
+	rm -rf debian/$(modulepkg)/usr/include
+ifeq ($(KERNEL_DEPENDS),y)
+	sh debian/prep-modules $(KSRC) debian/control.module > debian/control
+else
+	sh debian/prep-modules $(KSRC) debian/control.module-image > debian/control
+endif
+
+# Install control files
+	install -d -o root -g root -m 755 debian/$(modulepkg)/DEBIAN
+	install -p -o root -g root -m 755 debian/prerm.mod \
+		debian/$(modulepkg)/DEBIAN/prerm
+	install -p -o root -g root -m 755 debian/postinst.mod \
+		debian/$(modulepkg)/DEBIAN/postinst
+
+# And now.. for the final packaging!
+	find debian/$(modulepkg) -type f | grep -v "./DEBIAN" | xargs md5sum | \
+		sed -e 's#debian/$(modulepkg)/##' > debian/$(modulepkg)/DEBIAN/md5sums
+
+	dpkg-gencontrol -isp \
+		-p$(modulepkg) \
+		-v`cat debian/VERSION` \
+		-Pdebian/$(modulepkg)
+	chown -R root.root debian/$(modulepkg)
+	chmod -R go=rX debian/$(modulepkg)
+	dpkg --build debian/$(modulepkg) $(MODDIR)
--- openafs-1.0.4.orig/debian/ConfigUtils.pm
+++ openafs-1.0.4/debian/ConfigUtils.pm
@@ -0,0 +1,26 @@
+# This is -*- perl -*-
+
+package Debian::OpenAFS::ConfigUtils;
+
+use strict;
+use vars qw( @ISA @EXPORT @unwinds);
+@ISA = qw(Exporter);
+require Exporter;
+@EXPORT = qw(@unwinds run unwind);
+
+sub run ($) {
+  print join(' ', @_);
+  print "\n";
+  system (@_)  == 0
+    or die "Failed: $?\n";
+}
+
+# This subroutine takes a command to run in case of failure.  After
+# each succesful step, this routine should be run with a command to
+# undo the successful step.
+
+	 sub unwind($) {
+	   push @unwinds, $_[0];
+	 }
+
+1;
--- openafs-1.0.4.orig/debian/README.Debian
+++ openafs-1.0.4/debian/README.Debian
@@ -0,0 +1,17 @@
+openafs for Debian
+----------------------
+
+* No manual pages are included.  I need to find out if versions exist
+  that are OK for copyright reasons.
+
+*  AFS users may be confused by the directory layout.  The files that
+   normally go in /usr/vice/etc go in /etc/openafs.  The cache should
+   be mounted on /var/cache/openafs.
+
+* The libopenafs-dev package only includes static libraries because
+  AFS does not build shared libs.
+
+
+
+
+ -- Sam Hartman <hartmans@mit.edu>, Fri,  3 Nov 2000 23:41:41 -0500
--- openafs-1.0.4.orig/debian/changelog
+++ openafs-1.0.4/debian/changelog
@@ -0,0 +1,208 @@
+openafs (1.0.4-0.potato1) unstable; urgency=low
+
+  * New upstream version, closes: #92776
+  * Allow openafs-client to depend on openafs-modules-source not just
+    openafs-modules.  This allows us to be installable on testing even
+    without binary modules which may become a necessity given the current
+    kernel image mess.
+  *  implement target for modules_clean, closes: #95049
+
+ -- Sam Hartman <hartmans@debian.org>  Tue, 24 Apr 2001 14:56:57 -0400
+
+openafs (1.0.3-2) unstable; urgency=low
+
+  * Fix  direntry type to be DT_UNKNOWN not DT_DIR on Linux (contributed upstream)
+  * Return ENOTEMPTY not ENOTDIR for rmdir of non-empty directory, closes: #82589
+  * Include build instructions in modules, closes: #92032
+  * Don't grep a file for a potentially null string, closes: #89967
+
+ -- Sam Hartman <hartmans@debian.org>  Thu, 29 Mar 2001 22:09:29 -0500
+
+openafs (1.0.3-1) unstable; urgency=low
+
+  * New upstream version
+  * Allow host to be used instead of dnsutils, closes: #87915
+  * Document kernel module build.
+  * Include upstream changelog
+
+ -- Sam Hartman <hartmans@debian.org>  Thu,  8 Mar 2001 14:35:57 -0500
+
+openafs (1.0.2-3) unstable; urgency=low
+
+  * Apply patch from  Stefan Kluth  <skluth@mppmu.mpg.de> for ppc_linux22
+  * Back out architecture change from last version; no good way to
+    actually solve that problem apparently. 
+
+
+ -- Sam Hartman <hartmans@debian.org>  Sat, 17 Feb 2001 23:45:06 -0500
+
+openafs (1.0.2-2) unstable; urgency=low
+
+  * Provide openafs-ptutil in hope that apt will deal better with upgrade,
+    closes: #84303
+  * Make thiscell default to dnsdomainname so things don't break quite as
+    bad if you don't enter it, closes: #81149 
+  * Include source architecture line, Closes: #84530
+  * Rebuild with new debhelper to fix dh_installinit not shutting down on
+    removal (Thanks Joey) (now requires debhelper 2.2.20)
+  * Move CellServDB to /usr/share/openafs  so we comply with policy 3.5
+
+ -- Sam Hartman <hartmans@debian.org>  Mon,  5 Feb 2001 13:23:51 -0500
+
+openafs (1.0.2-1) unstable; urgency=low
+
+  * Add support for ppc and sparc, closes: #80835
+  * Update maintainer address for modules.
+  * Support for 2.4.0 final (and not just prereleases as before), closes: #82751
+  * New upstream version.
+  * Conflict with openafs-ptutil since it is now included
+  * Fix message in RC script, closes: #82489
+  * Attempt to avoid using pinstall  in kernel module build
+
+ -- Sam Hartman <hartmans@debian.org>  Fri, 19 Jan 2001 22:38:32 -0500
+
+openafs (1.0.1-3) unstable; urgency=low
+
+  * Add support for Linux Kernel 2.4.x.
+  * Note that administration scripts are released under the GPL.
+
+ -- Sam Hartman <hartmans@debian.org>  Mon,  18 Dec 2000 19:06:00 -0500
+
+
+openafs (1.0.1-2) unstable; urgency=medium
+
+  * New maintainer address.
+  * Depend on debhelper 2.1.16 for /usr/share/doc symlinks.
+  * Only run init script once; confusion with DH_OPTIONS
+  * Fix bosserver to look in /usr/openafs/lib so it restarts correctly every Sunday.
+  * Upload to Debian (Gloses: BUG#69336)
+ -- Sam Hartman <hartmans@debian.org>  Wed,  6 Dec 2000 11:21:53 -0500
+
+Do not generate .map file for module; depmod complains.  * 
+
+ --
+
+openafs (1.0.1-1) unstable; urgency=low
+
+  * New upstream version
+  * Fix typo in openafs-client templates.
+  * Clarify that afs-newcell sets up for afs-rootvol 
+
+ -- Sam Hartman <hartmans@mit.edu>  Sun,  3 Dec 2000 02:04:50 -0500
+
+openafs (1.0.snap20001106-10) unstable; urgency=low
+
+  * Release (Closes: BUG#69336)
+  * Fix typo and afs-rootvol and test from CLI
+
+ -- Sam Hartman <hartmans@mit.edu>  Sat,  2 Dec 2000 00:44:37 -0500
+
+openafs (1.0.snap20001106-9) unstable; urgency=medium
+
+  * Fix openafs-fileserver restart to do a bos restart
+  * Document that AFS key must be single-DES.
+  * afs-rootvol: use the -fast option so we do not hang forever on bad cells or firewalls.
+  * Fix priority on openafs-client rc script to run after server starts.
+
+ -- Sam Hartman <hartmans@mit.edu>  Wed, 29 Nov 2000 20:43:59 -0500
+
+openafs (1.0.snap20001106-8) unstable; urgency=low
+
+  * Modules no longer depend on the tlient; client depends on modules.
+    This works better for AFS, even though it is not the way packages like
+    alsa-base work.
+  * Fix several typos in configuration scripts.
+  * Clarify that it starts the client just after debconf.
+
+ -- Sam Hartman <hartmans@mit.edu>  Wed, 29 Nov 2000 13:10:43 -0500
+
+openafs (1.0.snap20001106-7) unstable; urgency=low
+
+  * Add command line options to afs-newcell
+  * Fix control.module for real this time.
+  * Add kpasswd and kas to the openafs-kpasswd package.
+  * Add manpage for afs-newcell and many undocumented links.
+  * Remove PAM module from libopenafs-dev.
+  * Instal udebug, pagsh, cmdebug.
+  * Remove execute bit from some includes in /usr/include.
+
+ --  Sam Hartman <hartmans@mit.edu>  Mon, 27 Nov 2000 03:02:57 -0500
+
+openafs (1.0.snap20001106-6) unstable; urgency=medium
+
+  * Add config option to disable  client on boot
+  * Create rc.d links
+  * Make CellServDB handled by postinst not a conffile.  Sadly AFSDB
+    records will be a while in the future.
+  * New script: afs-newcell to configure a dbserver
+  * Use the native Debian install instead of afs install while building;
+    works  under fakeroot.  Important for modules package.
+  * Fix purge to delete configuration files
+
+ --  <Sam Hartman <hartmans@mit.edu>  Sat, 25 Nov 2000 01:09:55 -0500
+
+openafs (1.0.snap20001106-5) unstable; urgency=low
+
+  * Make change so kdump builds on potato
+
+ --  Sam Hartman <hartmans@mit.edu>  Sun, 19 Nov 2000 19:27:01 -0500
+
+openafs (1.0.snap20001106-4) unstable; urgency=low
+
+  * Fix so dpkg-buildpackage works.  Oops.
+
+ --  Sam Hartman <hartmans@mit.edu>  Sun, 19 Nov 2000 02:18:05 -0500
+
+openafs (1.0.snap20001106-3) unstable; urgency=low
+
+  * Increase stacksize for server processes so they don't dump core.
+  * New script: afs-rootvol--creates the root.afs and root.cell.  Works
+    fairly well except that it is overly verbose and that it has my test
+    cell hardcoded.  This script will evolve into part of a new cell
+    config tool. 
+
+
+  --
+  * Support removing module for smP
+  * Prune build directories out of modules sources--oops
+  * Fix bogus depends for module sources--note that it really does want
+    bison and flex at least for now.
+
+ --  Sam Hartman <hartmans@mit.edu>  Thu, 16 Nov 2000 01:39:48 -0500
+
+openafs (1.0.snap20001106-2) unstable; urgency=low
+
+  * Fix directories for servers to be FHS-reasonable
+  * Fix init.d script to actually work for stop this time--tested and works
+  * Add server packages; fairly useless right now but at least we
+      ship the binaries
+  * Check to make sure home cell exists and warn user if not
+  * Fix purge for openafs-client
+
+ --  Sam Hartman <hartmans@mit.edu>  Fri, 10 Nov 2000 23:35:30 -0500
+
+openafs (1.0.snap20001106-1) unstable; urgency=low
+
+  * New Upstream version
+  * Fix init.d script to properly remove openafs.o
+
+ --  Sam Hartman <hartmans@mit.edu>  Tue,  7 Nov 2000 13:55:47 -0500
+
+openafs (1.0.snap20001104-1) unstable; urgency=low
+
+  * New upstream snapshot
+  * Fix path to afsd in /etc/init.d/openafs-client
+  * Build openafs module packages
+
+ --  Sam Hartman <hartmans@mit.edu>  Mon,  6 Nov 2000 09:39:11 -0500
+
+openafs (1.0.snap20001103-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- unknown <hartmans@snorklewacker.mit.edu>  Fri,  3 Nov 2000 23:41:41 -0500
+
+Local variables:
+mode: debian-changelog
+add-log-mailing-address "hartmans@snorklewacker.mit.edu"
+End:
--- openafs-1.0.4.orig/debian/README.modules
+++ openafs-1.0.4/debian/README.modules
@@ -0,0 +1,31 @@
+		       Building Kernel Modules
+----------------------------------------
+
+
+The easiest way to  get AFS modules is to install prebuilt modules.  Fore example if you are running kernel 2.2.18 you might try
+
+apt-get install openafs-modules-2.2.18
+
+If this doesn't work, then you will need to build your own modules.
+This means having kernel sources available.  You should install a
+kernel sources package and untar it in /usr/src.  Then, install
+openafs-modules-source.
+
+apt-get install openafs-modules-source
+
+Next, unpack openafs-modules-source
+
+cd /usr/src
+tar xzf openafs.tar.gz
+
+Now, change into your kernel source tree.
+You should then create a .config file; the easiest way to do this is
+to run make menuconfig or to copy in a kernel configuration from the
+same version of the kernel.  Finally build the modules
+
+make-kpkg configure
+make-kpkg modules
+
+Ignore any errors about genchanges.sh failing.  An openafs-modules deb
+should be created.  Use dpkg -i to install this version.
+
--- openafs-1.0.4.orig/debian/README.servers
+++ openafs-1.0.4/debian/README.servers
@@ -0,0 +1,47 @@
+		 Setting up a Debian OpennAFS Server
+
+These packages include binaries with FHS-compatible path names.  Here
+is a map from AFS paths to FHS paths:
+
+/usr/afs/etc		/etc/openafs/server
+/usr/afs/local		/etc/openafs/server-local
+/usr/afs/db		/var/lib/openafs/db
+/usr/afs/logs		/var/log/openafs
+/usr/afs/bin		/usr/lib/openafs
+
+
+Scripts are provided to configure a single database/file server.  The
+afs-newcell script sets up the initial databases and configures
+bosserver.  After running this script, get tokens in the cell and run
+the afs-rootvol script to populate the root volume and root.cell.  A
+sample transcript of configuring an AFS cell can be found in
+/usr/share/doc/openafs-dbserver/configuration-transcript.txt.gz.  This
+transcript assumes you are using MIT Kerberos and the openafs-krb5
+package.  Similar steps could be taken with Heimdal.
+
+Another issue is upgrades.  It is likely that future versions of this
+package will install for example /usr/lib/openafs/fileserver.package
+instead of /usr/lib/openafs/fileserver.  The postinst script will
+create links the actual binaries.  Upgrades will not replace the old
+binaries, but a script will be provided to roll the links forward to
+the new versions.  The intent is that people could install the new
+package on all their servers and then quickly move the links before
+restarting the bosserver.
+
+		      Adding Additional Servers
+
+If you decide one server is not enough, here is roughly what needs to
+happen:
+
+1) Copy securely (using scp , encrypted Kerberized rcp or some other
+   secure method) /etc/openafs/server to the new server.
+
+2) Start a bosserver.
+
+3) If the machine is to be a file server, create an fs instance using
+   bos create.  For file servers this is all you need to do.
+
+4) For database servers, you also need to do a bos addhost on all
+   servers (including the new server) to add the new server to
+   /etc/openafs/server/CellServDB.  Then create ptserver and vlserver
+   instances.
--- openafs-1.0.4.orig/debian/TODO
+++ openafs-1.0.4/debian/TODO
@@ -0,0 +1 @@
+* Get bos restrict working
--- openafs-1.0.4.orig/debian/afs-newcell
+++ openafs-1.0.4/debian/afs-newcell
@@ -0,0 +1,175 @@
+#!/usr/bin/perl -w
+# Copyright (C) 2000 by Sam Hartman
+# This file may be copied either under the terms of the GNU GPL or the IBM Public License
+# either version 2 or later of the GPL or version 1.0 or later of the IPL.
+
+use Term::ReadLine;
+use strict;
+use Debian::OpenAFS::ConfigUtils;
+use Getopt::Long;
+use vars qw($admin $server
+	   $requirements_met  $shutdown_needed);
+my $rl = new Term::ReadLine('afs-newcell');
+$shutdown_needed = 1;
+
+=head1  NAME
+
+   afs-newcell - Set up initial database server for AFS cell.
+
+=head1 SYNOPSIS
+
+B<afs-newcell> [B<--requirements-met>] [B<--admin> admin_user]
+
+=head1 DESCRIPTION
+
+
+This script sets up the initial AFS database and configures the first
+database/file server.
+
+The B<requirements-met> option specifies that the initial requirements
+have been met and that the script can proceed without displaying the
+initial banner or asking for confirmation.
+
+The B<admin> option specifies the name of the administrative user.
+This user will be given system:administrators and susers permission in
+the cell.
+
+=head1 AUTHOR
+
+Sam Hartman <hartmans@debian.org>
+
+=cut
+
+# main script
+
+GetOptions (
+	    "requirements-met" => \$requirements_met, 
+	    "admin=s" => \$admin);
+
+unless ($requirements_met) {
+  print <<eoreqs;
+			    Prerequisites
+
+In order to set up a new AFS cell, you must meet the following:
+
+1) You need a working Kerberos realm with Kerberos4 support.  You
+   should install Heimdal with Kth-kerberos compatibility or MIT
+   Kerberos5.
+
+2) You need to create the single-DES AFS key and load it into
+   /etc/openafs/server/KeyFile.  If your cell's name is the same as
+   your Kerberos realm then create a principal called afs.  Otherwise,
+   create a principal called afs/cellname in your realm.  The cell
+   name should be all lower case, unlike Kerberos realms which are all
+   upper case.  You can use asetkey from the openafs-krb5 package, or
+   if you used AFS3 salt to create the key, the bos addkey command.
+
+3) This machine should have a filesystem mounted on /vicepa.  If you
+   do not have a free partition, then create a large file by using dd
+   to extract bytes from /dev/zero.  Create a filesystem on this file
+   and mount it using -oloop.  
+
+4) You will need an administrative principal created in a Kerberos
+realm.  This principal will be added to susers and
+system:administrators and thus will be able to run administrative
+commands.  Generally the user is a root instance of some administravie
+user.  For example if jruser is an administrator then it would be
+reasonable to create jruser/root and specify jruser/root as the user
+to be added in this script.
+
+5) The AFS client must not be running on this workstation.  It will be
+at the end of this script.
+
+eoreqs
+
+  $_ = $rl->readline("Do you meet these requirements? [y/n] ");
+  unless (/^y/i ) {
+    print "Run this script again when you meet the requirements\n";
+    exit(1);
+  }
+}
+open(MOUNT, "mount |") or die "Failed to run mount: $!\n";
+while(<MOUNT>) {
+if(m:^AFS:) {
+print "The AFS client is currently running on this workstation.\n";
+print "Please restart this script after running /etc/init.d/openafs-client stop\n";
+exit(1);
+}
+}
+close MOUNT;
+
+unless ( -f "/etc/openafs/server/KeyFile") {
+  print "You do not have an AFS keyfile.  Please create this using asetkey from openafs-krb5 or 
+the bos addkey command";
+  exit(1);
+}
+
+print "If the fileserver is not running, this may hang for 30 seconds.\n";
+run("/etc/init.d/openafs-fileserver stop");
+$server = `hostname`;
+chomp $server;
+$admin = $rl->readline("What administrative principal should be used? ") unless $admin;
+ die "Please specify an administrative user\n" unless $admin;
+$admin =~ s:/:.:g;
+if($admin =~ /@/) {
+die "The administrative user must be in the same realm as the cell and no realm may be specified.\n";
+}
+open(CELL, "/etc/openafs/server/ThisCell") 
+  or die "Cannot open /etc/openafs/server/ThisCell: $!\n";
+my $cell = <CELL>;
+chomp $cell;
+
+run( "echo \\>$cell >/etc/openafs/server/CellServDB");
+run("/etc/init.d/openafs-fileserver start");
+run ("bos addhost $server $server -localauth ||true");
+run("bos adduser $server $admin -localauth");
+unwind("bos removeuser $server $admin -localauth");
+if ( -f "/var/lib/openafs/db/prdb.DB0" ) {
+  die "Protection database already exists; cell already partially created\n";
+ }
+open(PRDB, "|pt_util -p /var/lib/openafs/db/prdb.DB0 -w ")
+or die "Unable to start pt_util: $!\n";
+print PRDB "$admin 128/20 1 -204 -204\n";
+print PRDB "system:administrators 130/20 -204 -204 -204\n";
+print PRDB" $admin 1\n";
+close PRDB;
+unwind( "rm /var/lib/openafs/db/prdb* ");
+# Start up ptserver and vlserver
+run("bos create $server ptserver simple /usr/lib/openafs/ptserver -localauth");
+unwind("bos delete $server ptserver -localauth");
+
+run("bos create $server vlserver simple /usr/lib/openafs/vlserver -localauth");
+unwind("bos delete $server vlserver -localauth");
+
+run( "bos create $server fs fs ".
+     "-cmd /usr/lib/openafs/fileserver ".
+     "-cmd /usr/lib/openafs/volserver ".
+     "-cmd /usr/lib/openafs/salvager -localauth");
+unwind( "bos delete $server fs -localauth ");
+
+print "Waiting for database elections: ";
+sleep(30);
+print "done.\n";
+# Past this point we want to control when bos shutdown happens
+$shutdown_needed = 0;
+unwind( "bos shutdown $server -localauth ");
+run("vos create $server a root.afs -localauth");
+# bring up client
+run("echo $cell >/etc/openafs/ThisCell");
+run("/etc/init.d/openafs-client force-start");
+
+print <<eomsg; 
+Now, get tokens as $admin in the $cell cell.  Then, run
+afs-rootvol.
+eomsg
+
+
+
+
+@unwinds = ();
+END {
+# If we fail before all the instances are created, we need to perform 
+# our own bos shutdown
+    system("bos shutdown $server -localauth") if $shutdown_needed;
+  run(pop @unwinds) while @unwinds;
+  }
--- openafs-1.0.4.orig/debian/afs-rootvol
+++ openafs-1.0.4/debian/afs-rootvol
@@ -0,0 +1,153 @@
+#!/usr/bin/perl -w
+# Copyright (C) 2000 by Sam Hartman
+# This file may be copied either under the terms of the GNU GPL or the IBM Public License
+# either version 2 or later of the GPL or version 1.0 or later of the IPL.
+
+use strict;
+use Term::ReadLine;
+use Getopt::Long;
+
+=head1  NAME
+
+   afs-rootvol - Generate and populate root volumes for new AFS cells.
+
+=head1 SYNOPSIS
+
+B<afs-rootvol> [B<--requirements-met>] [B<--server> server-name] [B<--partition> partition-letter]
+
+=head1 DESCRIPTION
+
+This script sets up an AFS cell's root volumes.  It assumes that you
+already have a fileserver and database servers.  The fileserver should
+have an empty root.afs.
+  This script creates root.cell, user, service and populates root.afs.  
+
+=head1 AUTHOR
+
+Sam Hartman <hartmans@debian.org>
+
+=cut
+
+use vars qw($rl $server  $part $requirements_met);
+use vars qw( @unwinds);
+use Debian::OpenAFS::ConfigUtils;
+
+
+# This subroutine creates a volume, mounts it and then sets the access
+# to allow read by anyuser.  The volume is scheduled for deletion in
+# case of error.
+# mkvol(volume, mount)
+		    sub mkvol($$) {
+		      my ($vol, $mnt) = @_;
+		      run("vos create $server $part $vol -localauth");
+		      unwind("vos remove $server $part $vol -localauth");
+		      run("fs mkm $mnt $vol ");
+		      run("fs sa $mnt system:anyuser rl");
+		    }
+
+# main script
+$rl = new Term::ReadLine('AFS');
+
+
+GetOptions (
+	    "requirements-met" => \$requirements_met, 
+	    "server=s" => \$server,
+	    "partition=s" => \$part
+	    );
+unless ($requirements_met) {
+      print <<eotext;
+			    Prerequisites
+
+In order to set up the root.afs volume, you must meet the following pre-conditions:
+
+1) The cell must be configured, running a database server with a
+   volume location and protection server.  The afs-newcell script will
+   set up these services.
+
+2)  You must be logged into the cell with  tokens in
+   system:administrators and with a principal that is in the susers
+   file of the servers in the cell.
+
+3) You need a fileserver in the cell with partitions mounted and a
+   root.afs volume created.   Presumably, it has no volumes on it,
+   although the script will work so long as nothing besides root.afs
+   exists.  The afs-newcell script will set up the file server.
+
+4) The AFS client must be running pointed at the new cell.
+eotext
+    $_ = $rl->readline("Do you meet these conditions? (y/n) ");
+    unless (/^y/i ) {
+	print "Please restart the script when you meet these conditions.\n";
+	exit(1);
+    }
+
+}
+# Get configuration information we need
+open(CELL, "/etc/openafs/server/ThisCell")
+or die "Unable to find out what cell this machine serves: $!\n";
+my $cell = <CELL>;
+close CELL;
+chomp $cell;
+
+unless ($server) {
+  print <<eotext; 
+You will need to select a server (hostname) and AFS
+partition on which to create the root volumes.
+eotext
+
+  $server = $rl->readline("What AFS Server should volumes be placed on? ");
+  die "Please select a server.\n" unless $server;
+}
+unless ($part) {
+  $part = $rl    ->readline("What partition? [a] ");
+$part = "a" unless $part;
+}
+
+
+run("fs sa /afs system:anyuser rl");
+
+run("vos create $server $part root.cell -localauth");
+unwind("vos remove $server $part root.cell -localauth");
+# We make root.cell s:anyuser readable after we mount in the next
+# loop.
+
+
+open(CELLSERVDB, "/etc/openafs/CellServDB")
+    or die "Unable to open /etc/openafs/CellServDB: $!\n";
+while(<CELLSERVDB>) {
+    chomp;
+    if (/^>\s*([a-z0-9_\-.]+)/ ) {
+	run("fs mkm /afs/$1 root.cell -cell $1  -fast");
+	unwind ("fs rmm /afs/$1");
+    }
+}
+
+run("fs sa /afs/$cell system:anyuser rl");
+run ("fs mkm /afs/.$cell root.cell -cell $cell -rw");
+unwind ("fs rmm /afs/.$cell");
+run("fs mkm /afs/.root.afs root.afs -rw");
+unwind ("fs rmm /afs/.root.afs");
+
+mkvol( "user", "/afs/$cell/user" );
+mkvol( "service", "/afs/$cell/service" );
+
+$cell =~ /^([^.]*)/;
+my $cellpart = $1;
+run("ln -s /afs/$cell /afs/$cellpart");
+unwind ("rm /afs/$cellpart");
+run( "ln -s /afs/.$cell /afs/.$cellpart" );
+unwind ("rm /afs/.$cellpart");
+
+run( "vos addsite $server $part root.afs -localauth" );
+run( "vos addsite $server $part root.cell -localauth" );
+run( "vos release root.afs -localauth" );
+run( "vos release root.cell -localauth" );
+unwind( "vos remove $server $part root.cell.readonly -localauth ");
+unwind( "vos remove $server $part root.afs.readonly -localauth ");
+
+@unwinds = ();
+
+END {
+  run(pop @unwinds) while @unwinds;
+  }
+
--- openafs-1.0.4.orig/debian/configuration-transcript.txt
+++ openafs-1.0.4/debian/configuration-transcript.txt
@@ -0,0 +1,418 @@
+[This transcript includes creation of a loopback mount on /vicepa
+using file full of zeros.  This is useful to know how to do because it
+allows you to test an AFS server without repartitioning.  However, for
+production cells, you should repartition and create a /vicepa
+partition.]
+
+snorklewacker:/# apt-get -q install openafs-dbserver openafs-krb5 krb5-admin-server
+Reading Package Lists...
+Building Dependency Tree...
+The following extra packages will be installed:
+  krb5-kdc krb5-user libkrb53 openafs-client openafs-fileserver openafs-ptutil 
+The following NEW packages will be installed:
+  krb5-admin-server krb5-kdc krb5-user libkrb53 openafs-client openafs-dbserver
+  openafs-fileserver openafs-krb5 openafs-ptutil 
+0 packages upgraded, 9 newly installed, 0 to remove and 22 not upgraded.
+Need to get 2264kB of archives. After unpacking 5939kB will be used.
+Do you want to continue? [Y/n] y
+Get:1 http://www.mit.edu packages/ krb5-admin-server 1.2.1-5 [174kB]
+Get:2 http://www.mit.edu packages/ krb5-kdc 1.2.1-5 [173kB]
+Get:3 http://www.mit.edu packages/ krb5-user 1.2.1-5 [154kB]
+Get:4 http://www.mit.edu packages/ libkrb53 1.2.1-5 [337kB]
+Get:5 http://www.mit.edu packages/ openafs-client 1.0.snap20001106-6 [662kB]
+Get:6 http://www.mit.edu packages/ openafs-dbserver 1.0.snap20001106-6 [211kB]
+Get:7 http://www.mit.edu packages/ openafs-fileserver 1.0.snap20001106-6 [427kB]
+Get:8 http://www.mit.edu packages/ openafs-krb5 1.3-3 [96.5kB]
+Get:9 http://www.mit.edu packages/ openafs-ptutil 0.0.snap20001123-1 [30.3kB]
+Fetched 2264kB in 8s (253kB/s)
+Preconfiguring packages ..
+Configuring Libkrb53
+--------------------
+
+
+  When users attempt to use Kerberos and specify a principal or user
+  name without specifying what administrative Kerberos realm that
+  principal belongs to, the system appends the default realm.
+  Normally default realm is the upper case version of the local DNS
+  domain.
+
+What is the default Kerberos realm? [ATHENA.MIT.EDU] SNORKLEWACKER.MIT.EDU
+
+Configuring Krb5-kdc
+--------------------
+
+By default, Kerberos4 requests are allowed from principals that do not require
+preauthentication.  This allows Kerberos4 services to exist while requiring
+most users to use Kerberos5 clients to get their initial tickets.  These
+tickets can then be converted to Kerberos4 tickets.  Alternatively, the mode
+can be set to full, allowing Kerberos4 to get initial tickets even when
+preauthentication would normally be required, or to disable, which will
+disable all Kerberos4 support. 
+
+  d. disable  f. full  n. nopreauth
+
+What Kerberos4 compatibility mode should be used? [n] 
+
+Configuring Krb5-admin-server
+-----------------------------
+
+Setting up a Kerberos Realm
+
+ This package contains the administrative tools necessary to run on
+ the Kerberos master server.  However, installing this package does
+ not automatically set up a Kerberos realm.  Doing so requires
+ entering passwords and as such is not well-suited for package
+ installation.	To create the realm, run the krb5_newrealm command.
+ You may also wish to read /usr/share/doc/krb5-kdc/README.KDC and the
+ administration guide found in the krb5-doc package.
+ .
+ Don't forget to set up DNS information so your clients can find your
+ KDC and admin servers.  Doing so is documented in the administration
+ guide.
+
+Configuring Openafs-client
+--------------------------
+
+
+  AFS filespace is organized into cells or administrative domains.
+[More] 
+  Each workstation belongs to one cell.  Usually the cell is the DNS
+  domain name of the workstation.
+
+What AFS cell does this workstation belong to? snorklewacker.mit.edu
+
+
+  AFS uses a  area of the disk to cache remote files for faster
+  access.  This cache will be mounted on /var/cache/openafs.  It is
+  important that the cache not overfill the partition it is located
+  on.  Often, people find it useful to dedicate a partition to their
+  AFS cache.
+
+How large is your AFS cache (kb)? [50000] 95000
+
+Configuring Openafs-fileserver
+------------------------------
+
+Selecting previously deselected package libkrb53.
+(Reading database ... 28342 files and directories currently installed.)
+Unpacking libkrb53 (from .../libkrb53_1.2.1-5_i386.deb) ...
+Selecting previously deselected package krb5-user.
+Unpacking krb5-user (from .../krb5-user_1.2.1-5_i386.deb) ...
+Selecting previously deselected package krb5-kdc.
+Unpacking krb5-kdc (from .../krb5-kdc_1.2.1-5_i386.deb) ...
+Selecting previously deselected package krb5-admin-server.
+Unpacking krb5-admin-server (from .../krb5-admin-server_1.2.1-5_i386.deb) ...
+Selecting previously deselected package openafs-client.
+Unpacking openafs-client (from .../openafs-client_1.0.snap20001106-6_i386.deb) ...
+Selecting previously deselected package openafs-fileserver.
+Unpacking openafs-fileserver (from .../openafs-fileserver_1.0.snap20001106-6_i386.deb) ...
+Selecting previously deselected package openafs-ptutil.
+Unpacking openafs-ptutil (from .../openafs-ptutil_0.0.snap20001123-1_i386.deb) ...
+Selecting previously deselected package openafs-dbserver.
+Unpacking openafs-dbserver (from .../openafs-dbserver_1.0.snap20001106-6_i386.deb) ...
+Selecting previously deselected package openafs-krb5.
+Unpacking openafs-krb5 (from .../openafs-krb5_1.3-3_i386.deb) ...
+Setting up openafs-client (1.0.snap20001106-6) ...
+Configuring Openafs-client
+--------------------------
+
+AFS uses the file /etc/openafs/CellServDB to hold the list of servers that
+should be contacted to find parts of a cell.  The cell you claim this
+workstation belongs to is not in that file.  Enter the host names of the
+database servers separated by spaces. IMPORTANT: If you are creating a new
+cell and this machine is to be a database server in that cell, only enter this
+machine's name; add the other servers later after they are functioning. Also,
+do not enable the AFS client to start at boot on this server until the cell is
+configured.  When you are ready you can edit /etc/openafs/afs.conf.client to
+enable the client. 
+
+What hosts are DB servers for your home cell?snorklewacker.mit.edu
+
+Should the Openafs filesystem be started and mounted at boot? Normally, most
+users who install the openafs-client package expect to run it at boot. 
+However, if you are planning on setting up a new cell or are on a laptop, you
+may not want it started at boot time. If you answer no to this question, run
+/etc/init.d/openafs-client force-start to run. 
+
+Run Openafs client at boot? [yes] n
+
+Starting AFS services: 
+Setting up openafs-fileserver (1.0.snap20001106-6) ...
+Starting AFS Server: ===================== U.S. Government Restricted Rights ======================
+If you are licensing the Software on behalf of the U.S. Government
+("Government"), the following provisions apply to you.  If the Software is
+supplied to the Department of Defense ("DoD"), it is classified as "Commercial
+Computer Software" under paragraph 252.227-7014 of the DoD Supplement to the
+Federal Acquisition Regulations ("DFARS") (or any successor regulations)
+and the Government is acquiring only the license rights granted herein (the
+license rights customarily provided to non-Government users).  If the Software
+is supplied to any unit or agency of the Government other than DoD, it is
+classified as "Restricted Computer Software" and the Government's rights in
+the Software are defined in paragraph 52.227-19 of the Federal Acquisition
+Regulations ("FAR") (or any successor regulations) or, in the case of NASA,
+in paragraph 18.52.227-86 of the NASA Supplement in the FAR (or any successor
+regulations).
+bosserver.
+
+Setting up openafs-ptutil (0.0.snap20001123-1) ...
+
+Setting up openafs-dbserver (1.0.snap20001106-6) ...
+
+Setting up libkrb53 (1.2.1-5) ...
+
+Setting up krb5-user (1.2.1-5) ...
+
+Setting up krb5-kdc (1.2.1-5) ...
+
+Setting up krb5-admin-server (1.2.1-5) ...
+
+Setting up openafs-krb5 (1.3-3) ...
+
+snorklewacker:/# krb5_newrealm
+This script should be run on the master KDC/admin server to initialize
+a Kerberos realm.  It will ask you to type in a master key password.
+This password will be used to generate a key that is stored in
+/etc/krb5kdc/stash.  You should try to remember this password, but it
+is much more important that it be a strong password than that it be
+remembered.  However, if you lose the password and /etc/krb5kdc/stash,
+you cannot decrypt your Kerberos database.
+Initializing database '/var/lib/krb5kdc/principal' for realm 'SNORKLEWACKER.MIT.EDU',
+master key name 'K/M@SNORKLEWACKER.MIT.EDU'
+You will be prompted for the database Master Password.
+It is important that you NOT FORGET this password.
+Enter KDC database master key:foo
+
+Re-enter KDC database master key to verify:foo
+
+Authenticating as principal hartmans/admin@ATHENA.MIT.EDU with password.
+Entry for principal kadmin/admin with kvno 3, encryption type Triple DES cbc mode with HMAC/sha1 added to keytab WRFILE:/etc/krb5kdc/kadm5.keytab.
+Entry for principal kadmin/admin with kvno 3, encryption type DES cbc mode with CRC-32 added to keytab WRFILE:/etc/krb5kdc/kadm5.keytab.
+Authenticating as principal hartmans/admin@ATHENA.MIT.EDU with password.
+Entry for principal kadmin/changepw with kvno 3, encryption type Triple DES cbc mode with HMAC/sha1 added to keytab WRFILE:/etc/krb5kdc/kadm5.keytab.
+Entry for principal kadmin/changepw with kvno 3, encryption type DES cbc mode with CRC-32 added to keytab WRFILE:/etc/krb5kdc/kadm5.keytab.
+Starting Kerberos KDC: krb5kdc krb524d.
+Starting Kerberos Administration Servers: kadmind.
+
+
+Now that your realm is set up you may wish to create an administrative
+principal using the addprinc subcommand of the kadmin.local program.
+Then, this principal can be added to /etc/krb5kdc/kadm5.acl so that
+you can use the kadmin program on other computers.  Kerberos admin
+principals usually belong to a single user and end in /admin.  For
+example, if jruser is a Kerberos administrator, then in addition to
+the normal jruser principal, a jruser/admin principal should be
+created.
+
+Don't forget to set up DNS information so your clients can find your
+KDC and admin servers.  Doing so is documented in the administration
+guide.
+snorklewacker:/# kadmin.local -e des-cbc-crc:v4
+Authenticating as principal hartmans/admin@ATHENA.MIT.EDU with password.
+kadmin.local:  addprinc -randkey afs
+addprinc -randkey afs
+WARNING: no policy specified for afs@SNORKLEWACKER.MIT.EDU; defaulting to no policy
+Principal "afs@SNORKLEWACKER.MIT.EDU" created.
+kadmin.local:  ktadd -k /tmp/snork.keytab afs
+ktadd -k /tmp/snork.keytab afs
+Entry for principal afs with kvno 3, encryption type DES cbc mode with CRC-32 added to keytab WRFILE:/tmp/snork.keytab.
+kadmin.local:  quit
+quit
+snorklewacker:/# kadmin.local
+kadmin.local
+Authenticating as principal hartmans/admin@ATHENA.MIT.EDU with password.
+kadmin.local:  addprinc hartmans
+addprinc hartmans
+WARNING: no policy specified for hartmans@SNORKLEWACKER.MIT.EDU; defaulting to no policy
+Enter password for principal "hartmans@SNORKLEWACKER.MIT.EDU": foo
+
+Re-enter password for principal "hartmans@SNORKLEWACKER.MIT.EDU": foo
+
+Principal "hartmans@SNORKLEWACKER.MIT.EDU" created.
+kadmin.local:  quit
+quit
+snorklewacker:/# asetkey add 3 /tmp/snork.keytab afs
+asetkey add 3 /tmp/snork.keytab afs
+snorklewacker:/# snorklewacker:/# dd if=/dev/zero of=/var/lib/openafs/vicepa bs=1024k count=32
+32+0 records in
+32+0 records out
+snorklewacker:/# mke2fs /var/lib/openafs/vicepa
+mke2fs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
+/var/lib/openafs/vicepa is not a block special device.
+Proceed anyway? (y,n) y
+Filesystem label=
+OS type: Linux
+Block size=1024 (log=0)
+Fragment size=1024 (log=0)
+8192 inodes, 32768 blocks
+1638 blocks (5.00%) reserved for the super user
+First data block=1
+4 block groups
+8192 blocks per group, 8192 fragments per group
+2048 inodes per group
+Superblock backups stored on blocks: 
+	8193, 24577
+
+Writing inode tables: 0/41/42/43/4done                            
+Writing superblocks and filesystem accounting information: done
+snorklewacker:/# mount -oloop /var/lib/openafs/vicepa /vicepa
+
+snorklewacker:/# afs-newcell
+			    Prerequisites
+
+In order to set up a new AFS cell, you must meet the following:
+
+1) You need a working Kerberos realm with Kerberos4 support.  You
+   should install Heimdal with Kth-kerberos compatibility or MIT
+   Kerberos5.
+
+2) You need to create the AFS key and load it into
+   /etc/openafs/server/KeyFile.  If your cell's name is the same as
+   your Kerberos realm then create a principal called afs.  Otherwise,
+   create a principal called afs/cellname in your realm.  The cell
+   name should be all lower case, unlike Kerberos realms which are all
+   upper case.  You can use asetkey from the openafs-krb5 package, or
+   if you used AFS3 salt to create the key, the bos addkey command.
+
+3) This machine should have a filesystem mounted on /vicepa.  If you
+   do not have a free partition, then create a large file by using dd
+   to extract bytes from /dev/zero.  Create a filesystem on this file
+   and mount it using -oloop.  
+
+4) You will need an administrative principal created in a Kerberos
+realm.  This principal will be added to susers and
+system:administrators and thus will be able to run administrative
+commands.  Generally the user is a root instance of some administravie
+user.  For example if jruser is an administrator then it would be
+reasonable to create jruser/root and specify jruser/root as the user
+to be added in this script.
+
+5) The AFS client must not be running on this workstation.  It will be
+at the end of this script.
+
+Do you meet these requirements? [y/n] y
+If the fileserver is not running, this may hang for 30 seconds.
+/etc/init.d/openafs-fileserver stop
+Stopping AFS Server: bosserver.
+What administrative principal should be used?hartmans
+echo \>snorklewacker.mit.edu >/etc/openafs/server/CellServDB
+/etc/init.d/openafs-fileserver start
+Starting AFS Server: ===================== U.S. Government Restricted Rights ======================
+If you are licensing the Software on behalf of the U.S. Government
+("Government"), the following provisions apply to you.  If the Software is
+supplied to the Department of Defense ("DoD"), it is classified as "Commercial
+Computer Software" under paragraph 252.227-7014 of the DoD Supplement to the
+Federal Acquisition Regulations ("DFARS") (or any successor regulations)
+and the Government is acquiring only the license rights granted herein (the
+license rights customarily provided to non-Government users).  If the Software
+is supplied to any unit or agency of the Government other than DoD, it is
+classified as "Restricted Computer Software" and the Government's rights in
+the Software are defined in paragraph 52.227-19 of the Federal Acquisition
+Regulations ("FAR") (or any successor regulations) or, in the case of NASA,
+in paragraph 18.52.227-86 of the NASA Supplement in the FAR (or any successor
+regulations).
+bosserver.
+bos addhost snorklewacker snorklewacker -localauth ||true
+bos adduser snorklewacker hartmans -localauth
+pt_util: /var/lib/openafs/db/prdb.DB0: Bad UBIK_MAGIC. Is 0 should be 354545
+Ubik Version is: 2.0
+Error while creating system:administrators: Entry for id already exists
+pt_util: Ubik Version number changed during execution.
+Old Version = 2.0, new version = 33554432.0
+bos create snorklewacker ptserver simple /usr/lib/openafs/ptserver -localauth
+bos create snorklewacker vlserver simple /usr/lib/openafs/vlserver -localauth
+bos create snorklewacker fs fs -cmd /usr/lib/openafs/fileserver -cmd /usr/lib/openafs/volserver -cmd /usr/lib/openafs/salvager -localauth
+Waiting for database elections: done.
+vos create snorklewacker a root.afs -localauth
+Volume 536870924 created on partition /vicepa of snorklewacker
+echo snorklewacker.mit.edu >/etc/openafs/ThisCell
+/etc/init.d/openafs-client force-start
+Starting AFS services: ===================== U.S. Government Restricted Rights ======================
+If you are licensing the Software on behalf of the U.S. Government
+("Government"), the following provisions apply to you.  If the Software is
+supplied to the Department of Defense ("DoD"), it is classified as "Commercial
+Computer Software" under paragraph 252.227-7014 of the DoD Supplement to the
+Federal Acquisition Regulations ("DFARS") (or any successor regulations)
+and the Government is acquiring only the license rights granted herein (the
+license rights customarily provided to non-Government users).  If the Software
+is supplied to any unit or agency of the Government other than DoD, it is
+classified as "Restricted Computer Software" and the Government's rights in
+the Software are defined in paragraph 52.227-19 of the Federal Acquisition
+Regulations ("FAR") (or any successor regulations) or, in the case of NASA,
+in paragraph 18.52.227-86 of the NASA Supplement in the FAR (or any successor
+regulations).
+afsd: All AFS daemons started.
+ afsd.
+Now, get tokens as hartmans in the snorklewacker.mit.edu cell.  Then, run
+afs-rootvol.
+snorklewacker:/# 
+snorklewacker:/# kinit hartmans
+Password for hartmans@SNORKLEWACKER.MIT.EDU: foo
+
+snorklewacker:/# aklog snorklewacker.mit.edu -k SNORKLEWACKER.MIT.EDU
+snorklewacker:/# afs-rootvol
+			    Prerequisites
+
+In order to set up the root.afs volume, you must meet the following pre-conditions:
+
+1) The cell must be configured, running a database server with a
+   volume location and protection server.
+
+2)  You must be logged into the cell with  tokens in
+    system:administrators and with a principal that is in the susers
+    file of the servers in the cell.
+
+3) You need a fileserver in the cell with partitions mounted and a root.afs volume created.
+   Presumably, it has no volumes on it, although the script will work
+   so long as nothing besides root.afs exists.
+
+4) The AFS client must be running pointed at the new cell.
+Do you meet these conditions? (Y/n) y
+You will need to select a server (hostname) and AFS
+partition on which to create the root volumes.
+What AFS Server should volumes be placed on? snorklewacker
+What partition? [a] 
+fs sa /afs system:anyuser rl
+vos create snorklewacker a root.cell -localauth
+Volume 536870927 created on partition /vicepa of snorklewacker
+fs mkm /afs/snorklewacker.mit.edu root.cell -cell snorklewacker.mit.edu 
+fs mkm /afs/andrew.cmu.edu root.cell -cell andrew.cmu.edu 
+fs mkm /afs/cs.cmu.edu root.cell -cell cs.cmu.edu 
+fs mkm /afs/ece.cmu.edu root.cell -cell ece.cmu.edu 
+fs mkm /afs/athena.mit.edu root.cell -cell athena.mit.edu 
+fs mkm /afs/dev.mit.edu root.cell -cell dev.mit.edu 
+fs mkm /afs/net.mit.edu root.cell -cell net.mit.edu 
+fs mkm /afs/sipb.mit.edu root.cell -cell sipb.mit.edu 
+fs mkm /afs/ir.stanford.edu root.cell -cell ir.stanford.edu 
+fs mkm /afs/umr.edu root.cell -cell umr.edu 
+fs mkm /afs/dementia.org root.cell -cell dementia.org 
+fs sa /afs/snorklewacker.mit.edu system:anyuser rl
+fs mkm /afs/.snorklewacker.mit.edu root.cell -cell snorklewacker.mit.edu -rw
+fs mkm /afs/.root.afs root.afs -rw
+vos create snorklewacker a user -localauth
+Volume 536870930 created on partition /vicepa of snorklewacker
+fs mkm /afs/snorklewacker.mit.edu/user user 
+fs sa /afs/snorklewacker.mit.edu/user system:anyuser rl
+vos create snorklewacker a service -localauth
+Volume 536870933 created on partition /vicepa of snorklewacker
+fs mkm /afs/snorklewacker.mit.edu/service service 
+fs sa /afs/snorklewacker.mit.edu/service system:anyuser rl
+ln -s /afs/snorklewacker.mit.edu /afs/snorklewacker
+ln -s /afs/.snorklewacker.mit.edu /afs/.snorklewacker
+vos addsite snorklewacker a root.afs -localauth
+Added replication site snorklewacker /vicepa for volume root.afs
+vos addsite snorklewacker a root.cell -localauth
+Added replication site snorklewacker /vicepa for volume root.cell
+vos release root.afs -localauth
+Released volume root.afs successfully
+vos release root.cell -localauth
+Released volume root.cell successfully
+snorklewacker:/# ls /afs
+andrew.cmu.edu	dementia.org  ir.stanford.edu  snorklewacker
+athena.mit.edu	dev.mit.edu   net.mit.edu      snorklewacker.mit.edu
+cs.cmu.edu	ece.cmu.edu   sipb.mit.edu     umr.edu
+snorklewacker:/# ls /afs/athena.mit.edu
+activity  contrib  dept  project    service   system
+astaff	  course   org	 reference  software  user
+snorklewacker:/# ls /afs/snorklewacker
+service  user
+snorklewacker:/# 
--- openafs-1.0.4.orig/debian/control
+++ openafs-1.0.4/debian/control
@@ -0,0 +1,82 @@
+Source: openafs
+Section: non-us/main
+Priority: optional
+Maintainer: Sam Hartman <hartmans@debian.org>
+Build-Depends: debhelper (>= 2.2.20), libncurses5-dev, libpam0g-dev, bison, docbook-to-man, flex
+Standards-Version: 3.5.0
+
+Package: openafs-client
+Architecture: i386 powerpc sparc
+Depends: ${shlibs:Depends}, debconf, host|dnsutils, openafs-modules-source|openafs-modules
+Conflicts: arla
+Description: The AFS distributed filesystem- client support
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers.  Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides basic client support to mount and manipulate
+ AFS.
+
+Package: openafs-kpasswd
+Priority: extra
+Architecture: i386 powerpc sparc
+Depends: ${shlibs:Depends}, openafs-client (= ${Source-Version})
+Conflicts: krb5-user, heimdal-clients
+Description: The AFS distributed filesystem- old password changing
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers.  Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides kpasswd and kas, utilities needed by the 
+ Transarc kaserver to create users and change passwords.  Only install
+ this package if you are already using kaserver; generally you should
+ not install this package for new cells or for cells using Kerberos5.
+
+Package: openafs-fileserver
+Architecture: i386 powerpc sparc
+Depends: ${shlibs:Depends}, debconf, openafs-client (= ${Source-Version})
+Recommends: ntp
+Description: The AFS distributed filesystem- file server
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers.  Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides the AFS fileserver binaries.  It should be
+ installed on any machine that will export files into AFS.
+
+Package: openafs-dbserver
+Architecture: i386 powerpc sparc
+Depends: ${shlibs:Depends}, debconf, openafs-fileserver (= ${Source-Version}), openafs-client (= ${Source-Version}), perl5
+Conflicts: openafs-ptutil
+Replaces: openafs-ptutil
+Provides: openafs-ptutil
+Description: The AFS distributed filesystem- database server
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers.  Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides AFS database server binaries.  It should be
+ installed on the servers that will act as volume location and
+ protection servers.
+
+Package: libopenafs-dev
+Architecture: i386 powerpc sparc
+Priority: extra
+Description: The AFS distributed filesystem- development libraries
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers.  Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides static development libraries and headers
+ needed to compile AFS applications.
+
+Package: openafs-modules-source
+Priority: extra
+Depends: bison, flex
+Architecture: all
+Description: The AFS distributed filesystem- Module Sources
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers.  Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides source to the AFS kernel modules.
--- openafs-1.0.4.orig/debian/control.module
+++ openafs-1.0.4/debian/control.module
@@ -0,0 +1,16 @@
+Source: openafs
+Section: non-us/main
+Priority: optional
+Maintainer: Sam Hartman <hartmans@debian.org>
+Standards-Version: 3.1.1
+
+Package: openafs-modules-=KVERS
+Conflicts: openafs-client (= 1.0.snap20001103-1)
+Provides: openafs-modules
+Architecture: any
+Description: The AFS distributed filesystem- Kernel Module
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers.  Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides the kernel module for the filesystem
--- openafs-1.0.4.orig/debian/control.module-image
+++ openafs-1.0.4/debian/control.module-image
@@ -0,0 +1,17 @@
+Source: openafs
+Section: non-us/main
+Priority: optional
+Maintainer: Sam Hartman <hartmans@debian.org>
+Standards-Version: 3.1.1
+
+Package: openafs-modules-=KVERS
+Conflicts: openafs-client (= 1.0.snap20001103-1)
+Provides: openafs-modules
+Architecture: any
+Recommends: kernel-image-=KVERS (= =KREVS)
+Description: The AFS distributed filesystem- Kernel Module
+ AFS is a distributed filesystem allowing cross-platform sharing of
+ files among multiple computers.  Facilities are provided for access
+ control, authentication, backup and administrative management.
+ .
+ This package provides the kernel module for the filesystem
--- openafs-1.0.4.orig/debian/copyright
+++ openafs-1.0.4/debian/copyright
@@ -0,0 +1,242 @@
+This package was debianized by Sam Hartman <hartmans@debian.org> on
+Fri,  3 Nov 2000 23:41:41 -0500.
+
+It was downloaded from the Openafs CVS repository.
+
+Upstream Maintainers(s):openafs-gatekeepers@openafs.org
+
+Copyright:
+
+   IBM Public License Version 1.0
+   
+   THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM
+   PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
+   THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+   
+   1. DEFINITIONS
+   
+   "Contribution" means:
+   a) in the case of International Business Machines Corporation ("IBM"),
+       the Original Program, and
+       
+   b) in the case of each Contributor,
+       
+   i) changes to the Program, and
+       
+   ii) additions to the Program;
+       
+   where such changes and/or additions to the Program originate from and
+       are distributed by that particular Contributor. A Contribution
+       'originates' from a Contributor if it was added to the Program by
+       such Contributor itself or anyone acting on such Contributor's
+       behalf. Contributions do not include additions to the Program
+       which: (i) are separate modules of software distributed in
+       conjunction with the Program under their own license agreement,
+       and (ii) are not derivative works of the Program.
+       
+   "Contributor" means IBM and any other entity that distributes the
+   Program.
+   
+   "Licensed Patents " mean patent claims licensable by a Contributor
+   which are necessarily infringed by the use or sale of its Contribution
+   alone or when combined with the Program.
+   
+   "Original Program" means the original version of the software
+   accompanying this Agreement as released by IBM, including source code,
+   object code and documentation, if any.
+   
+   "Program" means the Original Program and Contributions.
+   
+   "Recipient" means anyone who receives the Program under this
+   Agreement, including all Contributors.
+   
+   2. GRANT OF RIGHTS
+   a) Subject to the terms of this Agreement, each Contributor hereby
+       grants Recipient a non-exclusive, worldwide, royalty-free
+       copyright license to reproduce, prepare derivative works of,
+       publicly display, publicly perform, distribute and sublicense the
+       Contribution of such Contributor, if any, and such derivative
+       works, in source code and object code form.
+       
+   b) Subject to the terms of this Agreement, each Contributor hereby
+       grants Recipient a non-exclusive, worldwide, royalty-free patent
+       license under Licensed Patents to make, use, sell, offer to sell,
+       import and otherwise transfer the Contribution of such
+       Contributor, if any, in source code and object code form. This
+       patent license shall apply to the combination of the Contribution
+       and the Program if, at the time the Contribution is added by the
+       Contributor, such addition of the Contribution causes such
+       combination to be covered by the Licensed Patents. The patent
+       license shall not apply to any other combinations which include
+       the Contribution. No hardware per se is licensed hereunder.
+       
+   c) Recipient understands that although each Contributor grants the
+       licenses to its Contributions set forth herein, no assurances are
+       provided by any Contributor that the Program does not infringe the
+       patent or other intellectual property rights of any other entity.
+       Each Contributor disclaims any liability to Recipient for claims
+       brought by any other entity based on infringement of intellectual
+       property rights or otherwise. As a condition to exercising the
+       rights and licenses granted hereunder, each Recipient hereby
+       assumes sole responsibility to secure any other intellectual
+       property rights needed, if any. For example, if a third party
+       patent license is required to allow Recipient to distribute the
+       Program, it is Recipient's responsibility to acquire that license
+       before distributing the Program.
+       
+   d) Each Contributor represents that to its knowledge it has sufficient
+       copyright rights in its Contribution, if any, to grant the
+       copyright license set forth in this Agreement.
+       
+   3. REQUIREMENTS
+   
+   A Contributor may choose to distribute the Program in object code form
+   under its own license agreement, provided that:
+   a) it complies with the terms and conditions of this Agreement; and
+       
+   b) its license agreement:
+       
+   i) effectively disclaims on behalf of all Contributors all warranties
+       and conditions, express and implied, including warranties or
+       conditions of title and non-infringement, and implied warranties
+       or conditions of merchantability and fitness for a particular
+       purpose;
+       
+   ii) effectively excludes on behalf of all Contributors all liability
+       for damages, including direct, indirect, special, incidental and
+       consequential damages, such as lost profits;
+       
+   iii) states that any provisions which differ from this Agreement are
+       offered by that Contributor alone and not by any other party; and
+       
+   iv) states that source code for the Program is available from such
+       Contributor, and informs licensees how to obtain it in a
+       reasonable manner on or through a medium customarily used for
+       software exchange.
+       
+   When the Program is made available in source code form:
+   a) it must be made available under this Agreement; and
+       
+   b) a copy of this Agreement must be included with each copy of the
+       Program.
+       
+   Each Contributor must include the following in a conspicuous location
+   in the Program:
+   
+   Copyright © {date here}, International Business Machines Corporation
+       and others. All Rights Reserved.
+       
+   In addition, each Contributor must identify itself as the originator
+   of its Contribution, if any, in a manner that reasonably allows
+   subsequent Recipients to identify the originator of the Contribution.
+   
+   4. COMMERCIAL DISTRIBUTION
+   
+   Commercial distributors of software may accept certain
+   responsibilities with respect to end users, business partners and the
+   like. While this license is intended to facilitate the commercial use
+   of the Program, the Contributor who includes the Program in a
+   commercial product offering should do so in a manner which does not
+   create potential liability for other Contributors. Therefore, if a
+   Contributor includes the Program in a commercial product offering,
+   such Contributor ("Commercial Contributor") hereby agrees to defend
+   and indemnify every other Contributor ("Indemnified Contributor")
+   against any losses, damages and costs (collectively "Losses") arising
+   from claims, lawsuits and other legal actions brought by a third party
+   against the Indemnified Contributor to the extent caused by the acts
+   or omissions of such Commercial Contributor in connection with its
+   distribution of the Program in a commercial product offering. The
+   obligations in this section do not apply to any claims or Losses
+   relating to any actual or alleged intellectual property infringement.
+   In order to qualify, an Indemnified Contributor must: a) promptly
+   notify the Commercial Contributor in writing of such claim, and b)
+   allow the Commercial Contributor to control, and cooperate with the
+   Commercial Contributor in, the defense and any related settlement
+   negotiations. The Indemnified Contributor may participate in any such
+   claim at its own expense.
+   
+   For example, a Contributor might include the Program in a commercial
+   product offering, Product X. That Contributor is then a Commercial
+   Contributor. If that Commercial Contributor then makes performance
+   claims, or offers warranties related to Product X, those performance
+   claims and warranties are such Commercial Contributor's responsibility
+   alone. Under this section, the Commercial Contributor would have to
+   defend claims against the other Contributors related to those
+   performance claims and warranties, and if a court requires any other
+   Contributor to pay any damages as a result, the Commercial Contributor
+   must pay those damages.
+   
+   5. NO WARRANTY
+   
+   EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+   PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
+   WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+   OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+   responsible for determining the appropriateness of using and
+   distributing the Program and assumes all risks associated with its
+   exercise of rights under this Agreement, including but not limited to
+   the risks and costs of program errors, compliance with applicable
+   laws, damage to or loss of data, programs or equipment, and
+   unavailability or interruption of operations.
+   
+   6. DISCLAIMER OF LIABILITY
+   
+   EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
+   ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+   WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+   DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+   HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+   
+   7. GENERAL
+   
+   If any provision of this Agreement is invalid or unenforceable under
+   applicable law, it shall not affect the validity or enforceability of
+   the remainder of the terms of this Agreement, and without further
+   action by the parties hereto, such provision shall be reformed to the
+   minimum extent necessary to make such provision valid and enforceable.
+   
+   If Recipient institutes patent litigation against a Contributor with
+   respect to a patent applicable to software (including a cross-claim or
+   counterclaim in a lawsuit), then any patent licenses granted by that
+   Contributor to such Recipient under this Agreement shall terminate as
+   of the date such litigation is filed. In addition, If Recipient
+   institutes patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Program
+   itself (excluding combinations of the Program with other software or
+   hardware) infringes such Recipient's patent(s), then such Recipient's
+   rights granted under Section 2(b) shall terminate as of the date such
+   litigation is filed.
+   
+   All Recipient's rights under this Agreement shall terminate if it
+   fails to comply with any of the material terms or conditions of this
+   Agreement and does not cure such failure in a reasonable period of
+   time after becoming aware of such noncompliance. If all Recipient's
+   rights under this Agreement terminate, Recipient agrees to cease use
+   and distribution of the Program as soon as reasonably practicable.
+   However, Recipient's obligations under this Agreement and any licenses
+   granted by Recipient relating to the Program shall continue and
+   survive.
+   
+   IBM may publish new versions (including revisions) of this Agreement
+   from time to time. Each new version of the Agreement will be given a
+   distinguishing version number. The Program (including Contributions)
+   may always be distributed subject to the version of the Agreement
+   under which it was received. In addition, after a new version of the
+   Agreement is published, Contributor may elect to distribute the
+   Program (including its Contributions) under the new version. No one
+   other than IBM has the right to modify this Agreement. Except as
+   expressly stated in Sections 2(a) and 2(b) above, Recipient receives
+   no rights or licenses to the intellectual property of any Contributor
+   under this Agreement, whether expressly, by implication, estoppel or
+   otherwise. All rights in the Program not expressly granted under this
+   Agreement are reserved.
+   
+   This Agreement is governed by the laws of the State of New York and
+   the intellectual property laws of the United States of America. No
+   party to this Agreement will bring a legal action under this Agreement
+   more than one year after the cause of action arose. Each party waives
+   its rights to a jury trial in any resulting litigation.
--- openafs-1.0.4.orig/debian/filelist
+++ openafs-1.0.4/debian/filelist
@@ -0,0 +1,13 @@
+openafs-client/usr/bin bin/fs bin/pts bin/bos etc/vos bin/tokens
+openafs-client/usr/bin bin/udebug bin/cmdebug bin/pagsh
+openafs-client/usr/sbin root.client/usr/vice/etc/afsd
+openafs-client/usr/bin bin/klog  bin/kpwvalid bin/unlog
+openafs-fileserver/usr/lib/openafs  root.server/usr/afs/bin/fileserver root.server/usr/afs/bin/volserver
+openafs-kpasswd/usr/bin bin/kpasswd etc/kas
+openafs-fileserver/usr/sbin	root.server/usr/afs/bin/bosserver
+openafs-fileserver/usr/lib/openafs root.server/usr/afs/bin/salvager 
+openafs-dbserver/usr/sbin root.server/usr/afs/bin/pt_util
+openafs-dbserver/usr/lib/openafs	root.server/usr/afs/bin/vlserver 
+openafs-dbserver/usr/lib/openafs root.server/usr/afs/bin/ptserver
+libopenafs-dev/usr	lib
+libopenafs-dev/usr include
--- openafs-1.0.4.orig/debian/genchanges.sh
+++ openafs-1.0.4/debian/genchanges.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+# genchanges.sh - generate a changes file for a deb file generated via
+#	the make-kpkg utility
+
+# KSRC KMAINT and KEMAIL are expected to be passed through the environment
+
+set -e
+umask 022
+
+#KVERS=`cat debian/KVERS`
+MODVERS=`cat debian/VERSION | sed s/:/\+/`
+ARCH=`dpkg --print-architecture`
+
+mprefix=`grep Package: debian/control.module | cut -d' ' -f 2 | cut -d= -f 1`
+
+# the changes file's name
+chfile="$KSRC/../$mprefix${KVERS}_${MODVERS}_${ARCH}.changes"
+
+dpkg-genchanges -b ${KMAINT:+-m"$KMAINT <$KEMAIL>"} -u"$KSRC/.." \
+	-cdebian/control > "$chfile.pt"
+pgp -fast ${KMAINT:+-u"$KMAINT"} < "$chfile.pt" > "$chfile"
+rm "$chfile.pt"
--- openafs-1.0.4.orig/debian/kern-sysname
+++ openafs-1.0.4/debian/kern-sysname
@@ -0,0 +1,48 @@
+#!/bin/sh
+case `arch` in
+i[3456]86)
+	case $KVERS in
+	    2.2*)
+		echo i386_linux22
+		;;
+	    2.4*)
+		echo i386_linux24
+		;;
+	    esac
+;;
+    sparc)
+	case $KVERS in
+	    2.2*)
+		echo sparc_linux22
+		;;
+	    2.4*)
+		echo Error: Not Supported
+		;;
+	    esac
+	;;
+    sparc64)
+        case $KVERS in
+	    2.2*)
+		echo sparc64_linux22
+		;;
+	    2.4*)
+		echo Error: Not Supported
+		;;
+	    esac
+	;;
+	    
+    ppc)
+	case $KVERS in
+	    2.2*)
+		echo ppc_linux22
+		;;
+	    2.4*)
+		echo ppc_linux24
+		;;
+	    esac
+	    ;;
+	*)
+	echo ERROr:  sysname not yet known
+	exit 1
+
+esac
--- openafs-1.0.4.orig/debian/make-links
+++ openafs-1.0.4/debian/make-links
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+mkdir -p /usr/afs 2>/dev/null || true
+cd /usr/afs
+ln -s /etc/openafs/server etc
+ln -s /etc/openafs/server-local local
+ln -s /var/lib/openafs/db db
+ln -s /var/log/openafs logs
+ln -s /var/lib/openafs/cores cores
+ln -s /usr/lib/openafs bin
--- openafs-1.0.4.orig/debian/movefiles
+++ openafs-1.0.4/debian/movefiles
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+
+# This script reads in  a set of lines in the form
+# destination sources
+# andmoves sources to destination
+# destination is relative to the debian directory
+
+while read dest srcs ; do
+    mkdir -p debian/$dest ||true
+    for foo in $srcs; do
+	cp -rp  dest/$foo debian/$dest
+	    done
+done
--- openafs-1.0.4.orig/debian/openafs-client.conffiles
+++ openafs-1.0.4/debian/openafs-client.conffiles
@@ -0,0 +1,2 @@
+/etc/openafs/afs.conf
+/etc/init.d/openafs-client
--- openafs-1.0.4.orig/debian/openafs-client.config
+++ openafs-1.0.4/debian/openafs-client.config
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule ||exit
+
+db_version 2.0
+db_get openafs-client/thiscell || true
+if [ "x$RET" = "x" ] ; then
+	db_set openafs-client/thiscell `dnsdomainname | tr 'A-Z' 'a-z'`
+	fi
+
+db_input medium openafs-client/thiscell ||true
+db_input critical openafs-client/cachesize ||true
+db_go
+test -f /etc/openafs/afs.conf &&. /etc/openafs/afs.conf
+if [ "x$AFS_CLIENT" != "x" ] ; then
+    db_set openafs-client/run-client  $AFS_CLIENT
+    fi
+db_input low openafs-client/run-client || true
+db_go
--- openafs-1.0.4.orig/debian/openafs-client.dirs
+++ openafs-1.0.4/debian/openafs-client.dirs
@@ -0,0 +1,4 @@
+var/cache/openafs
+etc/openafs
+etc/init.d
+usr/share/openafs
--- openafs-1.0.4.orig/debian/openafs-client.docs
+++ openafs-1.0.4/debian/openafs-client.docs
@@ -0,0 +1,4 @@
+src/README
+debian/README.servers
+debian/configuration-transcript.txt
+debian/README.modules
--- openafs-1.0.4.orig/debian/openafs-client.postinst
+++ openafs-1.0.4/debian/openafs-client.postinst
@@ -0,0 +1,76 @@
+#! /bin/sh
+# postinst script for openafs
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+
+case "$1" in
+    configure)
+
+	test -d /afs || mkdir /afs
+    . /usr/share/debconf/confmodule
+
+	db_version 2.0
+
+	db_get openafs-client/thiscell
+	echo $RET >/etc/openafs/ThisCell
+	THISCELL=$RET
+
+	if test -f /etc/openafs/CellServDB; then :
+	    else cp /usr/share/openafs/CellServDB \
+	      /etc/openafs
+	    fi
+	if grep  -q -F "$RET" /etc/openafs/CellServDB&& [ "x$RET" != "x" ]  ; then :
+		else db_input critical  openafs-client/cell-info || true
+	    db_input high openafs-client/run-client ||true
+	    db_go
+	    db_get openafs-client/cell-info
+	    if [ "x$RET" != "x" ] ; then
+		echo \>$THISCELL >/etc/openafs/CellServDB.new
+		for hname in $RET ; do 
+		    host $hname |perl -anle \
+		      'print "$F[2] # $F[0]" if $F[1] eq "A"' \
+		      >>/etc/openafs/CellServDB.new
+		    done
+		    cat /etc/openafs/CellServDB.new \
+		      /etc/openafs/CellServDB  >/etc/openafs/CellServDB.tmp
+		    mv /etc/openafs/CellServDB.tmp \
+		      /etc/openafs/CellServDB
+		    rm /etc/openafs/CellServDB.new
+		fi
+	    fi
+		    
+	db_get openafs-client/cachesize
+	echo /afs:/var/cache/openafs:$RET >/etc/openafs/cacheinfo
+
+	db_get openafs-client/run-client
+	echo AFS_CLIENT=$RET >/etc/openafs/afs.conf.client
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- openafs-1.0.4.orig/debian/openafs-client.postrm
+++ openafs-1.0.4/debian/openafs-client.postrm
@@ -0,0 +1,43 @@
+#! /bin/sh
+# postrm script for openafs
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+purge)
+    rmdir /afs 2>/dev/null || true
+    rm /etc/openafs/cacheinfo 2>/dev/null ||true
+    rm /etc/openafs/CellServDB 2>/dev/null ||true
+    rm /etc/openafs/ThisCell 2>/dev/null ||true
+    rm /etc/openafs/afs.conf.client 2>/dev/null || true
+    ;;
+       remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+
--- openafs-1.0.4.orig/debian/openafs-client.templates
+++ openafs-1.0.4/debian/openafs-client.templates
@@ -0,0 +1,42 @@
+Template: openafs-client/cell-info
+Type: string
+Description: What hosts are DB servers for your home cell?
+ AFS uses the file /etc/openafs/CellServDB to hold the list of servers
+ that should be contacted to find parts of a cell.  The cell you claim
+ this workstation belongs to is not in that file.  Enter the host
+ names of the database servers separated by spaces.
+ IMPORTANT: If you are creating a new cell and this machine is to be
+ a database server in that cell, only enter this machine's name; add
+ the other servers later after they are functioning. Also, do not
+ enable the AFS client to start at boot on this server until the cell
+ is configured.  When you are ready you can edit
+ /etc/openafs/afs.conf.client to enable the client.
+
+Template: openafs-client/thiscell
+Type: string
+Description:  What AFS cell does this workstation belong to?
+   AFS filespace is organized into cells or administrative domains.
+   Each workstation belongs to one cell.  Usually the cell is the DNS
+   domain name of the site.
+
+Template: openafs-client/cachesize
+Type: string
+Default: 50000
+Description:  How large is your AFS cache (kb)? 
+   AFS uses a  area of the disk to cache remote files for faster
+   access.  This cache will be mounted on /var/cache/openafs.  It is
+   important that the cache not overfill the partition it is located
+   on.  Often, people find it useful to dedicate a partition to their
+   AFS cache.
+
+Template: openafs-client/run-client
+Type: boolean
+Default: true
+Description: Run Openafs client now and at boot?
+ Should the Openafs filesystem be started and mounted at boot?
+ Normally, most users who install the openafs-client package expect to
+ run it at boot.  However, if you are planning on setting up a new
+ cell or are on a laptop, you may not want it started at boot time.
+ If you answer no to this question, run /etc/init.d/openafs-client
+ force-start to run.
+
--- openafs-1.0.4.orig/debian/openafs-client.undocumented
+++ openafs-1.0.4/debian/openafs-client.undocumented
@@ -0,0 +1,12 @@
+afsd.8
+bos.1
+cmdebug.1
+fs.1
+klog.1
+kpwvalid.1
+pagsh.1
+pts.1
+tokens.1
+udebug.1
+unlog.1
+vos.1
--- openafs-1.0.4.orig/debian/openafs-dbserver.dirs
+++ openafs-1.0.4/debian/openafs-dbserver.dirs
@@ -0,0 +1,4 @@
+usr/share/doc
+var/lib/openafs/db
+usr/share/man/man8
+usr/sbin
--- openafs-1.0.4.orig/debian/openafs-fileserver.conffiles
+++ openafs-1.0.4/debian/openafs-fileserver.conffiles
@@ -0,0 +1 @@
+/etc/init.d/openafs-fileserver
--- openafs-1.0.4.orig/debian/openafs-fileserver.config
+++ openafs-1.0.4/debian/openafs-fileserver.config
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule || exit
+
+db_version 2.0
+
+db_get openafs-fileserver/thiscell || true
+if [ "x$RET" = "x" ] ; then
+	db_get openafs-client/thiscell ||true
+	db_set openafs-fileserver/thiscell "$RET"
+	fi
+
+db_input low openafs-fileserver/thiscell || true
+db_go
--- openafs-1.0.4.orig/debian/openafs-fileserver.dirs
+++ openafs-1.0.4/debian/openafs-fileserver.dirs
@@ -0,0 +1,6 @@
+usr/share/doc
+var/log/openafs
+etc/openafs/server
+etc/openafs/server-local
+var/lib/openafs/cores
+
--- openafs-1.0.4.orig/debian/openafs-fileserver.init
+++ openafs-1.0.4/debian/openafs-fileserver.init
@@ -0,0 +1,71 @@
+#! /bin/sh
+#
+# skeleton	example file to build /etc/init.d/ scripts.
+#		This file should be used to construct scripts for /etc/init.d.
+#
+#		Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#		Modified for Debian GNU/Linux
+#		by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version:	@(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/bosserver
+NAME=bosserver
+DESC="AFS Server"
+
+
+exec 3>/dev/null
+exec </dev/null
+
+test -f $DAEMON || exit 0
+
+
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
+		--exec $DAEMON
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+    bos shutdown localhost -wait -localauth
+	start-stop-daemon --stop --quiet  \
+		--exec $DAEMON
+	echo "$NAME."
+	;;
+  #reload)
+	#
+	#	If the daemon can reload its config files on the fly
+	#	for example by sending it SIGHUP, do it here.
+	#
+	#	If the daemon responds to changes in its config file
+	#	directly anyway, make this a do-nothing entry.
+	#
+	# echo "Reloading $DESC configuration files."
+	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
+	#	/var/run/$NAME.pid --exec $DAEMON
+  #;;
+  restart|force-reload)
+	#
+	#	If the "reload" option is implemented, move the "force-reload"
+	#	option to the "reload" entry above. If not, "force-reload" is
+	#	just the same as "restart".
+	#
+	echo -n "Restarting $DESC: "
+    bos restart localhost -localauth -bos
+	sleep 1
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
--- openafs-1.0.4.orig/debian/openafs-fileserver.postinst
+++ openafs-1.0.4/debian/openafs-fileserver.postinst
@@ -0,0 +1,41 @@
+#!/bin/sh -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+
+case "$1" in
+    configure)
+
+	. /usr/share/debconf/confmodule
+
+	db_version 2.0
+
+	db_get openafs-fileserver/thiscell
+	echo $RET >/etc/openafs/server/ThisCell
+	if [ -f /etc/openafs/server/CellServDB ] ; then :
+	    else echo \>$RET >/etc/openafs/server/CellServDB
+	    fi
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+#DEBHELPER#
+
+exit 0
--- openafs-1.0.4.orig/debian/openafs-fileserver.postrm
+++ openafs-1.0.4/debian/openafs-fileserver.postrm
@@ -0,0 +1,41 @@
+#! /bin/sh
+# postrm script for openafs
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/share/doc/packaging-manual/
+
+case "$1" in
+purge)
+    rm /etc/openafs/server/ThisCell 2>/dev/null || true
+    (cd /etc/openafs/server && rm CellServDB UserList) 2>/dev/null ||true
+    (cd /etc/openafs/server-local && rm BosConfig) 2>/dev/null ||true
+    ;;
+       remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+
--- openafs-1.0.4.orig/debian/openafs-fileserver.templates
+++ openafs-1.0.4/debian/openafs-fileserver.templates
@@ -0,0 +1,7 @@
+Template: openafs-fileserver/thiscell
+Type: string
+Description: What cell does this server serve files for?
+ AFS fileservers belong to a cell.  They have the key for that cell's
+ Kerberos service and serve volumes into that cell.  Normally, this
+ cell is the same cell as the workstation's client belongs to.
+
--- openafs-1.0.4.orig/debian/openafs-fileserver.undocumented
+++ openafs-1.0.4/debian/openafs-fileserver.undocumented
@@ -0,0 +1 @@
+bosserver.8
--- openafs-1.0.4.orig/debian/openafs-kpasswd.dirs
+++ openafs-1.0.4/debian/openafs-kpasswd.dirs
@@ -0,0 +1 @@
+usr/share/doc
--- openafs-1.0.4.orig/debian/openafs-kpasswd.undocumented
+++ openafs-1.0.4/debian/openafs-kpasswd.undocumented
@@ -0,0 +1,2 @@
+kpasswd.1
+kas.1
--- openafs-1.0.4.orig/debian/openafs-modules-source.docs
+++ openafs-1.0.4/debian/openafs-modules-source.docs
@@ -0,0 +1,4 @@
+src/README
+debian/README.servers
+debian/configuration-transcript.txt
+debian/README.modules
--- openafs-1.0.4.orig/debian/patch.ppc_linux22
+++ openafs-1.0.4/debian/patch.ppc_linux22
@@ -0,0 +1,184 @@
+diff -Pur /usr/src/modules/openafs/debian/sysname modules/openafs/debian/sysname
+--- /usr/src/modules/openafs/debian/sysname	Mon Feb  5 14:56:33 2001
++++ modules/openafs/debian/sysname	Wed Feb  7 08:21:35 2001
+@@ -34,7 +34,7 @@
+     ppc)
+ 	case $KVERS in
+ 	    2.2*)
+-		echo error_not_supported
++		echo ppc_linux22
+ 		;;
+ 	    2.4*)
+ 		echo ppc_linux24
+diff -Pur /usr/src/modules/openafs/src/config/Makefile.ppc_linux22 modules/openafs/src/config/Makefile.ppc_linux22
+--- /usr/src/modules/openafs/src/config/Makefile.ppc_linux22	Wed Dec 31 19:00:00 1969
++++ modules/openafs/src/config/Makefile.ppc_linux22	Wed Feb  7 08:22:03 2001
+@@ -0,0 +1,46 @@
++# AFS_OSTYPE used to indicate suffixes and os specific subdirectories.
++AFS_OSTYPE = LINUX
++
++# Base directory for linux kernel source. Actually a prefix which is complete
++# when LINUX_VERS is appended to it.
++LINUX_SRCDIR = $(KSRC)
++# Default list of Linux kernels to build. Build will run only if all
++# can be built. To build a different set, specify LINUX_VERS to make.
++LINUX_VERS = $(KVERS)
++
++#
++# compilation and link editor flags
++DBG=-g
++OPTMZ=-O2
++PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
++# Put -O2 here to _ensure_ all Makefiles pick it up.
++XCFLAGS= -O2
++MT_CFLAGS=-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}
++XLDFLAGS=
++SHARE_LDFLAGS = -shared -Xlinker -x
++SHLIB_SUFFIX=so
++SHLIB_CFLAGS=
++#
++# libraries
++MTLIBS=-lpthread
++TXLIBS= /usr/lib/libncurses.so
++XLIBS=
++#
++# programs
++AR=ar
++AS=as
++CP=cp
++INSTALL=install
++LD=ld
++MT_CC=cc
++MV=mv
++RANLIB=ranlib
++RM=rm
++WASHTOOL=${SRCDIR}bin/washtool
++#
++# Other OS specific requirements
++#
++YACC = bison -y
++LEX = flex -l
++# Used in des library.
++CRYPT_OBJ = crypt.o
+diff -Pur /usr/src/modules/openafs/src/config/param.ppc_linux22.h modules/openafs/src/config/param.ppc_linux22.h
+--- /usr/src/modules/openafs/src/config/param.ppc_linux22.h	Wed Dec 31 19:00:00 1969
++++ modules/openafs/src/config/param.ppc_linux22.h	Wed Feb  7 08:25:13 2001
+@@ -0,0 +1,61 @@
++#ifndef _PARAM_PPC_LINUX22_H_
++#define _PARAM_PPC_LINUX22_H_
++
++/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
++ * it's a judgment call. If something is obviously ppc specific, use that
++ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
++ * in the sysname is the current version of the client. This takes into
++ * account the perferred OS user space configuration as well as the kernel.
++ */
++
++#define AFS_LINUX20_ENV        1
++#define AFS_LINUX22_ENV        1
++#define AFS_PPC_LINUX20_ENV    1
++#define AFS_PPC_LINUX22_ENV    1
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
++#define AFS_SYSCALL 137
++#define AFS_64BIT_IOPS_ENV  1
++#define AFS_NAMEI_ENV     1   /* User space interface to file system */
++#include <afs/afs_sysnames.h>
++
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
++
++
++/* Machine / Operating system information */
++#define SYS_NAME       "ppc_linux22"
++#define SYS_NAME_ID    SYS_NAME_ID_ppc_linux22
++#define AFSBIG_ENDIAN    1
++#define AFS_HAVE_FFS        1       /* Use system's ffs. */
++#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
++
++#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
++#include <linux/config.h>
++#ifdef CONFIG_SMP
++#undef CONFIG_SMP
++#endif
++/* Using "AFS_SMP" to map to however many #define's are required to get
++ * MP to compile for Linux
++ */
++#ifdef AFS_SMP
++#define CONFIG_SMP
++#define __SMP__
++#define AFS_GLOBAL_SUNLOCK
++#endif
++
++#endif /* __KERNEL__  && !DUMP_KERNEL*/
++
++#ifdef KERNEL
++#ifndef MIN
++#define MIN(A,B) ((A) < (B) ? (A) : (B))
++#endif
++#ifndef MAX
++#define MAX(A,B) ((A) > (B) ? (A) : (B))
++#endif
++#endif /* KERNEL */
++
++#endif /* _PARAM_PPC_LINUX22_H_ */
+diff -Pur /usr/src/modules/openafs/src/config/param.ppc_linux22_usr.h modules/openafs/src/config/param.ppc_linux22_usr.h
+--- /usr/src/modules/openafs/src/config/param.ppc_linux22_usr.h	Wed Dec 31 19:00:00 1969
++++ modules/openafs/src/config/param.ppc_linux22_usr.h	Wed Feb  7 08:26:44 2001
+@@ -0,0 +1,53 @@
++#ifndef _PARAM_USR_PPC_LINUX22_H_
++#define _PARAM_USR_PPC_LINUX22_H_
++
++/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
++ * it's a judgment call. If something is obviously ppc specific, use that
++ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
++ * in the sysname is the current version of the client. This takes into
++ * account the perferred OS user space configuration as well as the kernel.
++ */
++
++#define UKERNEL                        1       /* user space kernel */
++#define AFS_ENV                        1
++#define AFS_USR_LINUX20_ENV    1
++#define AFS_USR_LINUX22_ENV    1
++#define AFS_NONFSTRANS 1
++
++#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
++#define AFS_SYSCALL 137
++#define AFS_64BIT_IOPS_ENV  1
++#define AFS_NAMEI_ENV     1   /* User space interface to file system */
++#include <afs/afs_sysnames.h>
++
++#define AFS_USERSPACE_IP_ADDR 1
++#define RXK_LISTENER_ENV 1
++#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
++
++
++/* Machine / Operating system information */
++#define SYS_NAME       "ppc_linux22"
++#define SYS_NAME_ID    SYS_NAME_ID_ppc_linux22
++#define AFSBIG_ENDIAN       1
++#define AFS_HAVE_FFS        1       /* Use system's ffs. */
++#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
++#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
++
++#define        afsio_iov       uio_iov
++#define        afsio_iovcnt    uio_iovcnt
++#define        afsio_offset    uio_offset
++#define        afsio_seg       uio_segflg
++#define        afsio_fmode     uio_fmode
++#define        afsio_resid     uio_resid
++#define        AFS_UIOSYS      1
++#define        AFS_UIOUSER     UIO_USERSPACE
++#define        AFS_CLBYTES     MCLBYTES
++#define        AFS_MINCHANGE   2
++#define        VATTR_NULL      usr_vattr_null
++
++#define AFS_DIRENT
++#ifndef CMSERVERPREF
++#define CMSERVERPREF
++#endif
++
++#endif /* _PARAM_USR_PPC_LINUX22_H_ */
--- openafs-1.0.4.orig/debian/postinst.mod
+++ openafs-1.0.4/debian/postinst.mod
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+depmod -a
+update-modules
+
+exit 0
--- openafs-1.0.4.orig/debian/prep-modules
+++ openafs-1.0.4/debian/prep-modules
@@ -0,0 +1,54 @@
+#! /bin/sh
+
+set -e
+
+if [ $# -ne 2 ]; then
+	echo Usage: $0 kernelsource-location control-template
+	exit 1
+fi
+
+
+changelog="$1/debian/changelog"
+if [ -n "$KVERS" ] && [ -n "$KDREV" ]; then
+  linuxversion=$KVERS
+  kernversion=$KDREV
+
+elif [ ! -f $changelog ]; then
+        linuxversion=`awk '{ if (NR==1) v=$3; else if (NR==2) p=$3; else if (NR==3) s=$3; \
+                else if (NR==4) { e=$3; exit; } } \
+                END { printf("%s.%s.%s%s\n",v,p,s,e); }' $1/Makefile`
+
+        if [ -z "$KDREV" ]; then
+          kernversion=$linuxversion-0
+        else
+          kernversion=$KDREV
+        fi
+
+else
+        linuxversion=`head -1 $changelog | \
+                sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\1/'`
+        kernversion=`head -1 $changelog | \
+                sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\2/'`
+fi
+
+pkgversion=`head -1 debian/changelog | \
+	sed -e 's/.*(\([^)]*\)).*/\1/'`
+
+pkgupversion=`echo $pkgversion | cut -d- -f 1`
+pkgupversion2=`perl -e "\"$pkgupversion\" =~ /(.*?)(\d+)\D*$/;"'printf $1 . ($2+1);'`
+
+sed -e s/=KVERS/$linuxversion/g -e s/=KREVS/$kernversion/g -e s/=AVERS/$pkgupversion/g -e s/=2AVERS/$pkgupversion2/g $2
+
+mprefix=`grep Package: $2 | cut -d' ' -f 2 | cut -d= -f 1`
+
+rm -f debian/tmp/usr/share/doc/$mprefix$linuxversion
+
+
+epochversion=`echo $kernversion | sed -n -e 's/^\([0-9]*\):.*/\1/p' -e 's/.*//'`
+kernversion="$pkgversion+`echo $kernversion | sed -e 's/^[0-9]*://'`"
+
+if [ -n "$epochversion" ]; then
+  kernversion=$epochversion:$kernversion
+fi
+echo "$kernversion" > debian/VERSION
+echo "$linuxversion" > debian/KVERS
--- openafs-1.0.4.orig/debian/prerm.mod
+++ openafs-1.0.4/debian/prerm.mod
@@ -0,0 +1,2 @@
+#!/bin/sh -e
+exit 0
--- openafs-1.0.4.orig/debian/pt_util.sgml
+++ openafs-1.0.4/debian/pt_util.sgml
@@ -0,0 +1,185 @@
+<!doctype refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Sam</firstname>">
+  <!ENTITY dhsurname   "<surname>Hartman</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>November 23, 2000</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>hartmans@mit.edu</email>">
+  <!ENTITY dhusername  "Sam Hartman">
+  <!ENTITY dhucpackage "<refentrytitle>OPENAFS-PTUTIL</refentrytitle>">
+  <!ENTITY dhpackage   "openafs-ptutil">
+
+  <!ENTITY debian      "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+]>
+
+<refentry>
+  <docinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2000</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </docinfo>
+  <refmeta>
+
+    <refentrytitle>pt_util</refentrytitle>
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>pt_util</refname>
+
+    <refpurpose>Utility to load/dump AFS protection database</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>pt_util</command>
+	  <arg><option>-w</option></arg>
+	  <arg><option>-u</option></arg>
+	  <arg><option>-g</option></arg>
+	  <arg><option>-m</option></arg>
+	  <arg><option>-n</option></arg>
+	  <arg><option>-s</option></arg>
+	  <arg><option>-x</option></arg>
+	  <arg><option>-d <replaceable>datafile</replaceable></option></arg>
+	  <arg><option>-p <replaceable>prdb</replaceable></option></arg>
+
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+	<para>This manual page documents <command>pt_util</command>, a
+	utility for dumping, loading and creating AFS protection
+	databases.  The protection database is normally made available
+	by the <command>ptserver</command> daemon running on the AFS
+	database servers.  However, <command>pt_util</command>
+	provides a mechanism for manipulating the database when
+	<command>ptserver</command> is unavailable.  This is useful to
+	create an initial database, to effect large batch changes or
+	when the database has a damaged
+	<literal>system:administrators</literal> group.</para>
+
+	<para>By default, <command>pt_util</command> opens the
+	database and prints the version.  Options allow extraction of
+	information from the database or writing new entries into the
+	database.</para>
+
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>
+        </term>
+        <listitem>
+          <para>Show summary of options.</para>
+        </listitem>
+      </varlistentry>
+	  <varlistentry>
+	    <term><option>-w</option></term>
+	    <listitem>
+	      <para>Update PRDB with contents of data file or standard input if the <option>-d</option> is not used</para>
+	    </listitem>
+	  </varlistentry>
+	  <varlistentry>
+	    <term><option>-u</option></term>
+	    <listitem>
+	      <para>List users in the database.</para>
+	    </listitem>
+	  </varlistentry>
+	  <varlistentry>
+	    <term><option>-g</option></term>
+	    <listitem>
+	      <para>List groups in the database.</para>
+	    </listitem>
+	  </varlistentry>
+	  <varlistentry>
+	    <term><option>-m</option></term>
+	    <listitem>
+	      <para>List group members.</para>
+	    </listitem>
+	  </varlistentry>
+	  <varlistentry>
+	    <term><option>-n</option></term>
+	    <listitem>
+	      <para>Follow name hash chains instead of ID hashes.</para>
+	    </listitem>
+	  </varlistentry>
+	  <varlistentry>
+	    <term><option>-s</option></term>
+	    <listitem>
+	      <para>List only <literal>system:</literal> groups.  Used by MIT's Moira.</para>
+	    </listitem>
+	  </varlistentry>
+      <varlistentry>
+	<term><option>-d <replaceable>datafile</replaceable></option></term>
+	<listitem>
+	  <para>Read from or write printable representation of the
+	  database from <replaceable>datafile</replaceable>.</para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term><option>-p <replaceable>prdb</replaceable></option></term>
+	<listitem>
+	  <para>Manipulate the protection database
+	  <replaceable>prdb</replaceable>.  The running protection
+	  database is
+	  <filename>/var/lib/openafs/db/prdb.DB0</filename></para>
+	</listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+	<para>ptserver(8)</para>
+
+
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).</para>
+
+    <!-- <para>Permission is granted to copy, distribute and/or modify
+      this document under the terms of the <acronym>GNU</acronym> Free
+      Documentation License, Version 1.1 or any later version
+      published by the Free Software Foundation; with no Invariant
+      Sections, no Front-Cover Texts and no Back-Cover Texts.  A copy
+      of the license can be found under
+      <filename>/usr/share/common-licenses/FDL</filename>.</para> -->
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- openafs-1.0.4.orig/debian/sysname
+++ openafs-1.0.4/debian/sysname
@@ -0,0 +1,16 @@
+#!/bin/sh
+case `arch` in
+i[3456]86)
+	echo i386_linux22
+;;
+    ppc)
+	echo ppc_linux22
+	;;
+    sparc|sparc64)
+	echo sparc_linux22
+	;;
+	*)
+	echo ERROr:  sysname not yet known
+	exit 1
+
+esac
