summaryrefslogtreecommitdiffstats
path: root/sysutils/afio
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1997-01-06 09:25:06 +0000
committerobrien <obrien@FreeBSD.org>1997-01-06 09:25:06 +0000
commite5774db680bed2119f28473324d5443e006df1d5 (patch)
treead748c84f4f0e2393cb22d285d2e439c8543c574 /sysutils/afio
parent1628d4dc3f8d048ca80df2475d14a7920cfc81f7 (diff)
downloadFreeBSD-ports-e5774db680bed2119f28473324d5443e006df1d5.zip
FreeBSD-ports-e5774db680bed2119f28473324d5443e006df1d5.tar.gz
Added some docs and examples to the package.
There was an unused file (saturn.backup) in the files/ dir. Renamed that and installed it as an example.
Diffstat (limited to 'sysutils/afio')
-rw-r--r--sysutils/afio/Makefile19
-rw-r--r--sysutils/afio/files/afiodump.example40
-rw-r--r--sysutils/afio/pkg-plist9
3 files changed, 65 insertions, 3 deletions
diff --git a/sysutils/afio/Makefile b/sysutils/afio/Makefile
index 5b2aeba..5936efc 100644
--- a/sysutils/afio/Makefile
+++ b/sysutils/afio/Makefile
@@ -3,11 +3,11 @@
# Date created: 4 October 1995
# Whom: Juergen Lock <nox@jelal.hb.north.de>
#
-# $Id: Makefile,v 1.3 1996/11/17 08:06:06 obrien Exp $
+# $Id: Makefile,v 1.2 1995/10/05 04:57:45 asami Exp $
#
-DISTNAME= afio.2.4.1
-PKGNAME= afio-2.4.1
+DISTNAME= afio.2.4.2
+PKGNAME= afio-2.4.2
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= system/Backup
@@ -15,6 +15,19 @@ EXTRACT_SUFX= .tgz
MAINTAINER= nox@jelal.hb.north.de
+ALL_TARGET= afio
MAN1= afio.1
+
+post-install:
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${PREFIX}/share/doc/afio
+ @(cd ${WRKSRC} ; \
+ ${INSTALL_MAN} README SCRIPTS ${PREFIX}/share/doc/afio)
+ @${MKDIR} ${PREFIX}/share/example/afio
+ @${INSTALL_SCRIPT} ${FILESDIR}/afiodump.example ${PREFIX}/share/example/afio
+ @${INSTALL_SCRIPT} ${WRKSRC}/script1/DONTDUMP ${PREFIX}/share/example/afio
+ @${INSTALL_SCRIPT} ${WRKSRC}/script2/* ${PREFIX}/share/example/afio
+.endif
+
.include <bsd.port.mk>
diff --git a/sysutils/afio/files/afiodump.example b/sysutils/afio/files/afiodump.example
new file mode 100644
index 0000000..8cc9930
--- /dev/null
+++ b/sysutils/afio/files/afiodump.example
@@ -0,0 +1,40 @@
+level=$1
+#
+# Construct basename for dump records
+FS=`echo $2 | sed -e '1,$s?/?:?g'`
+echo Dump root = $2 Level = $level
+echo -n Finding files to dump...
+DUMPFILES=/tmp/backup$$
+date +"%b %d %H:%M" > /var/adm/dumpafio/newdump$$
+#
+# If it is a level 0 dump simply dump everything...
+if [ $level = 0 ]
+then
+find -x $2 | grep -v -f /var/adm/dumpafio/DONTDUMP > ${DUMPFILES}
+echo done
+#cat ${DUMPFILES} | afio -G 2 -o -v -f -b 5120 -c 1000 -s 100000x -Z /dev/nrst0
+else
+#
+# Otherwise dump only stuff newer...
+#
+# Get the date of the most recent dump with the highest level <= $level]
+#prevdump=`ls --reverse /var/adm/dumpafio/${FS}.[0-${level}] | head --lines=1`
+prevdump=`ls -r /var/adm/dumpafio/${FS}.[0-${level}] | head -n 1`
+if [ "x${prevdump}" = x ]
+then
+echo failed
+echo backup: No lower level dump - cannot do level $level dump
+exit 1
+fi
+#find -x $2 -cnewer ${prevdump} | grep -v -f /var/adm/dumpafio/DONTDUMP > ${DUMPFILES}
+find -x $2 -newer ${prevdump} | grep -v -f /var/adm/dumpafio/DONTDUMP > ${DUMPFILES}
+echo done
+fi
+cat ${DUMPFILES} | afio -G 2 -o -v -f -b 5120 -c 1000 -s 100000x -Z /dev/nrst0
+/bin/rm -f ${DUMPFILES}
+#
+# All higher level dumps are now invalidated
+/bin/rm -f /var/adm/dumpafio/${FS}.[${level}-9]
+#
+# Record date of dump future reference
+mv /var/adm/dumpafio/newdump$$ /var/adm/dumpafio/${FS}.${level}
diff --git a/sysutils/afio/pkg-plist b/sysutils/afio/pkg-plist
index ea64bb3..7ceea1a 100644
--- a/sysutils/afio/pkg-plist
+++ b/sysutils/afio/pkg-plist
@@ -1,2 +1,11 @@
bin/afio
man/man1/afio.1.gz
+share/doc/afio/README
+share/doc/afio/SCRIPTS
+share/example/afio/afiodump.example
+share/example/afio/DONTDUMP
+share/example/afio/README
+share/example/afio/backup
+share/example/afio/restore
+share/example/afio/x.dot
+share/example/afio/x.home
OpenPOWER on IntegriCloud