diff -NuarwbB amanda-afs.orig/Makefile amanda-afs/Makefile --- amanda-afs.orig/Makefile 2003-02-18 06:21:42.000000000 +0800 +++ amanda-afs/Makefile 2005-10-13 17:12:35.000000000 +0800 @@ -1,6 +1,6 @@ include ./Makefile.conf -AMANDA_AFS_VERSION = amanda-afs version 0.0.3 +AMANDA_AFS_VERSION = amanda-afs version 0.0.4 UTIL = afs_estimate dump_tools volset gtar-wrapper.pl COMMON = config.h fileseek.o @@ -9,10 +9,10 @@ @echo "Done!" install: $(UTIL) - make -C volset install - make -C dump_tools install - make -C afs_estimate install - install -D -g root -o root gtar-wrapper.pl $(INSTALL_DIR)/gtar-wrapper.pl + make DESTDIR=$(DESTDIR) -C volset install + make DESTDIR=$(DESTDIR) -C dump_tools install + make DESTDIR=$(DESTDIR) -C afs_estimate install + install -D -g root -o root gtar-wrapper.pl $(DESTDIR)$(INSTALL_DIR)/gtar-wrapper.pl volset: $(COMMON) make -C volset diff -NuarwbB amanda-afs.orig/Makefile.conf amanda-afs/Makefile.conf --- amanda-afs.orig/Makefile.conf 2002-05-12 05:39:59.000000000 +0800 +++ amanda-afs/Makefile.conf 2005-10-13 16:46:11.000000000 +0800 @@ -6,7 +6,7 @@ #-------------- # Specify the full path to the destination directory for the utilities -INSTALL_DIR = /usr/local/amanda/sbin +INSTALL_DIR = /usr/sbin #-------------- @@ -15,7 +15,7 @@ # OpenAFS will probably have this set to /usr or /usr/local # AFS_PREFIX = /usr # IBM AFS will probably have this set to /usr/afsws -AFS_PREFIX = /usr/afsws +AFS_PREFIX = /usr #-------------- @@ -27,7 +27,7 @@ # NOTE: make sure that vos actually is where you say it is # otherwise, be prepared for 5k dumps on a 10G partition # don't come crying, if you didn't set this correctly! -AFS_VOS = $(AFS_PREFIX)/etc/vos +AFS_VOS = $(AFS_PREFIX)/sbin/vos #-------------- diff -NuarwbB amanda-afs.orig/afs_estimate/Makefile amanda-afs/afs_estimate/Makefile --- amanda-afs.orig/afs_estimate/Makefile 2002-05-12 05:39:59.000000000 +0800 +++ amanda-afs/afs_estimate/Makefile 2005-10-13 17:09:01.000000000 +0800 @@ -2,7 +2,7 @@ AFS_LIBDIR = -L$(AFS_PREFIX)/lib -L$(AFS_PREFIX)/lib/afs# LIBS = $(AFS_LIBDIR) -lvolser -ldir -laudit $(AFS_PREFIX)/lib/afs/vlib.a -lsys -lvldb \ - -lubik -lauth -lcmd -lrxkad -ldes -lrxstat -lrx -llwp -lacl -lsys \ + -lubik -lauth -lcmd -lrxkad -ldes -lrxstat -lrx -llwp -lacl -lsys -lresolv \ -lcom_err -lkauth -lusd $(AFS_PREFIX)/lib/afs/util.a -liberty #-lefence @@ -14,7 +14,7 @@ all: $(AFS_EST_EXEC) install: $(AFS_EST_EXEC) - install -D -g root -o root $(AFS_EST_EXEC) $(INSTALL_DIR)/$(AFS_EST_EXEC) + install -D -g root -o root $(AFS_EST_EXEC) $(DESTDIR)$(INSTALL_DIR)/$(AFS_EST_EXEC) $(AFS_EST_EXEC): $(AFS_EST_OBJS) $(CC) -o $(AFS_EST_EXEC) $(AFS_EST_CFLAGS) $(AFS_EST_OBJS) $(AFS_EST_LDFLAGS) $(LIBS) diff -NuarwbB amanda-afs.orig/afs_estimate/afs_estimate.c amanda-afs/afs_estimate/afs_estimate.c --- amanda-afs.orig/afs_estimate/afs_estimate.c 2003-02-18 06:06:52.000000000 +0800 +++ amanda-afs/afs_estimate/afs_estimate.c 2005-10-13 16:47:37.000000000 +0800 @@ -53,7 +53,7 @@ #define EIGHT_BYTE_INT long long -void DFlushVolume(void) {} ; +extern int DFlushVolume(register afsint_32) {} ; EIGHT_BYTE_INT afs_estimate(char *volname, time_t prev_dump); @@ -243,8 +243,8 @@ assert(size != -1); nVnodes = (size / vcp->diskSize) - 1; if (nVnodes > 0) { - assert((nVnodes+1)*vcp->diskSize == size) - assert(STREAM_SEEK(file, vcp->diskSize, 0) == 0) + assert((nVnodes+1)*vcp->diskSize == size); + assert(STREAM_SEEK(file, vcp->diskSize, 0) == 0); } else nVnodes = 0; for (vnodeIndex = 0; diff -NuarwbB amanda-afs.orig/dump_tools/Makefile amanda-afs/dump_tools/Makefile --- amanda-afs.orig/dump_tools/Makefile 2002-05-12 05:39:59.000000000 +0800 +++ amanda-afs/dump_tools/Makefile 2005-10-13 17:08:43.000000000 +0800 @@ -15,8 +15,8 @@ all: $(EXEC_l) $(EXEC_r) install: $(EXEC_l) $(EXEC_r) - install -D -g root -o root $(EXEC_l) $(INSTALL_DIR)/$(EXEC_l) - install -D -g root -o root $(EXEC_r) $(INSTALL_DIR)/$(EXEC_r) + install -D -g root -o root $(EXEC_l) $(DESTDIR)$(INSTALL_DIR)/$(EXEC_l) + install -D -g root -o root $(EXEC_r) $(DESTDIR)$(INSTALL_DIR)/$(EXEC_r) $(EXEC_l): $(SRC_l) ../config.h $(l_COMMON) $(CC) -o $(EXEC_l) $(l_CFLAGS) $(SRC_l) $(l_COMMON) $(l_LDFLAGS) diff -NuarwbB amanda-afs.orig/gtar-wrapper.pl.in amanda-afs/gtar-wrapper.pl.in --- amanda-afs.orig/gtar-wrapper.pl.in 2002-05-12 05:39:59.000000000 +0800 +++ amanda-afs/gtar-wrapper.pl.in 2005-10-13 16:43:00.000000000 +0800 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!/usr/bin/perl use Getopt::Long; use Getopt::Std; diff -NuarwbB amanda-afs.orig/volset/Makefile amanda-afs/volset/Makefile --- amanda-afs.orig/volset/Makefile 2002-05-12 05:39:59.000000000 +0800 +++ amanda-afs/volset/Makefile 2005-10-13 17:09:19.000000000 +0800 @@ -14,7 +14,7 @@ all: $(VOL_EXEC) install: $(VOL_EXEC) - install -D -g root -o root $(VOL_EXEC) $(INSTALL_DIR)/$(VOL_EXEC) + install -D -g root -o root $(VOL_EXEC) $(DESTDIR)$(INSTALL_DIR)/$(VOL_EXEC) $(VOL_EXEC): ../config.h $(VOL_OBJS) $(VOL_HEADERS) diff -NuarwbB amanda-afs.orig/volset/volset-estimate.c amanda-afs/volset/volset-estimate.c --- amanda-afs.orig/volset/volset-estimate.c 2002-05-12 05:39:59.000000000 +0800 +++ amanda-afs/volset/volset-estimate.c 2005-10-13 16:58:04.000000000 +0800 @@ -198,8 +198,8 @@ assert(size != -1); nVnodes = (size / vcp->diskSize) - 1; if (nVnodes > 0) { - assert((nVnodes+1)*vcp->diskSize == size) - assert(STREAM_SEEK(file, vcp->diskSize, 0) == 0) + assert((nVnodes+1)*vcp->diskSize == size); + assert(STREAM_SEEK(file, vcp->diskSize, 0) == 0); } else nVnodes = 0; for (vnodeIndex = 0; diff -NuarwbB amanda-afs.orig/volset/volset-helper.c amanda-afs/volset/volset-helper.c --- amanda-afs.orig/volset/volset-helper.c 2002-05-12 05:39:59.000000000 +0800 +++ amanda-afs/volset/volset-helper.c 2005-10-13 16:57:34.000000000 +0800 @@ -11,7 +11,7 @@ return checksum; } -void DFlushVolume(void) {}; +extern int DFlushVolume(register afs32int) {}; /* * int osi_audit()) diff -NuarwbB amanda-afs.orig/volset/volset-helper.h amanda-afs/volset/volset-helper.h --- amanda-afs.orig/volset/volset-helper.h 2002-05-12 05:39:59.000000000 +0800 +++ amanda-afs/volset/volset-helper.h 2005-10-13 16:57:23.000000000 +0800 @@ -4,7 +4,7 @@ extern afs_int32 ParseHost(char *aname, struct sockaddr_in *asockaddr); extern afs_int32 SafeATOI(char *anum); extern afs_int32 GetPartitionID(afs_int32 *aval, char *aname); -extern void DFlushVolume(void); +extern int DFlushVolume(register afs32int); extern int osi_audit(); extern ONE_BYTE_INT CheckSum(ONE_BYTE_INT *memory, int length); diff -NuarwbB amanda-afs.orig/volset/volset.c amanda-afs/volset/volset.c --- amanda-afs.orig/volset/volset.c 2002-05-12 05:39:59.000000000 +0800 +++ amanda-afs/volset/volset.c 2005-10-13 16:51:42.000000000 +0800 @@ -244,7 +244,8 @@ while(vols) { - written += DumpVolume(out, get(&vols), prev_time, vols->next?0:1); + Node *curvols = vols; + written += DumpVolume(out, get(&vols), prev_time, curvols->next?0:1); } close(out);