aboutsummaryrefslogtreecommitdiff
path: root/sysutils/zfs-snapshot-mgmt
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2008-07-16 21:30:30 +0000
committerWesley Shields <wxs@FreeBSD.org>2008-07-16 21:30:30 +0000
commit85d2841b60db7f209aa92040f599144d06d450be (patch)
tree5379ecd278ec16149835e399c6e372afa4e2d102 /sysutils/zfs-snapshot-mgmt
parent4ca1d4e9a5e22b7e6d4c1067b6508307f57a6863 (diff)
downloadports-85d2841b60db7f209aa92040f599144d06d450be.tar.gz
ports-85d2841b60db7f209aa92040f599144d06d450be.zip
Notes
Diffstat (limited to 'sysutils/zfs-snapshot-mgmt')
-rw-r--r--sysutils/zfs-snapshot-mgmt/Makefile36
-rw-r--r--sysutils/zfs-snapshot-mgmt/distinfo3
-rw-r--r--sysutils/zfs-snapshot-mgmt/files/pkg-message.in9
-rw-r--r--sysutils/zfs-snapshot-mgmt/pkg-deinstall12
-rw-r--r--sysutils/zfs-snapshot-mgmt/pkg-descr3
-rw-r--r--sysutils/zfs-snapshot-mgmt/pkg-plist4
6 files changed, 67 insertions, 0 deletions
diff --git a/sysutils/zfs-snapshot-mgmt/Makefile b/sysutils/zfs-snapshot-mgmt/Makefile
new file mode 100644
index 000000000000..e39d702e7a87
--- /dev/null
+++ b/sysutils/zfs-snapshot-mgmt/Makefile
@@ -0,0 +1,36 @@
+# New ports collection makefile for: zfs-snapshot-mgmt
+# Date created: 6 July 2008
+# Whom: Marcin Simonides <marcin@studio4plus.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= zfs-snapshot-mgmt
+PORTVERSION= 20080706
+CATEGORIES= sysutils
+MASTER_SITES= http://marcin.studio4plus.com/files/
+
+MAINTAINER= marcin@studio4plus.com
+COMMENT= Automatic ZFS snapshot management tool
+
+USE_RUBY= yes
+RUBY_NO_BUILD_DEPENDS= yes
+
+NO_BUILD= yes
+MAN8= zfs-snapshot-mgmt.8
+
+SUB_FILES= pkg-message
+PKGMESSAGE= ${WRKDIR}/pkg-message
+
+do-install:
+ @${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+ @${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${MANPREFIX}/man/man8
+ @${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${PREFIX}/etc
+
+post-install:
+ @if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \
+ ${CP} -p ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf ; \
+ fi
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/sysutils/zfs-snapshot-mgmt/distinfo b/sysutils/zfs-snapshot-mgmt/distinfo
new file mode 100644
index 000000000000..57aec75a3cd6
--- /dev/null
+++ b/sysutils/zfs-snapshot-mgmt/distinfo
@@ -0,0 +1,3 @@
+MD5 (zfs-snapshot-mgmt-20080706.tar.gz) = dfba7b53d8f78cd64fd8a63682f94907
+SHA256 (zfs-snapshot-mgmt-20080706.tar.gz) = 9fed502a115f43652b3e70d801f716a3f18201d1debffd0f65316aae160b8646
+SIZE (zfs-snapshot-mgmt-20080706.tar.gz) = 4515
diff --git a/sysutils/zfs-snapshot-mgmt/files/pkg-message.in b/sysutils/zfs-snapshot-mgmt/files/pkg-message.in
new file mode 100644
index 000000000000..51059aa13176
--- /dev/null
+++ b/sysutils/zfs-snapshot-mgmt/files/pkg-message.in
@@ -0,0 +1,9 @@
+
+To actually turn on the automatic snapshots you have to do the following:
+
+1. Add an appropriate crontab entry, e.g.:
+
+ echo "*/5 * * * * root /usr/local/bin/zfs-snapshot-mgmt" >> /etc/crontab
+
+See zfs-snapshot-mgmt(8) manpage for more details.
+
diff --git a/sysutils/zfs-snapshot-mgmt/pkg-deinstall b/sysutils/zfs-snapshot-mgmt/pkg-deinstall
new file mode 100644
index 000000000000..da331d315272
--- /dev/null
+++ b/sysutils/zfs-snapshot-mgmt/pkg-deinstall
@@ -0,0 +1,12 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
+echo
+echo "Remember to remove zfs-snapshot-mgmt entry from cron configuration."
+echo -n "Otherwise the system will be constantly trying to call the deinstalled"
+echo " script."
diff --git a/sysutils/zfs-snapshot-mgmt/pkg-descr b/sysutils/zfs-snapshot-mgmt/pkg-descr
new file mode 100644
index 000000000000..1fc5eaf233fe
--- /dev/null
+++ b/sysutils/zfs-snapshot-mgmt/pkg-descr
@@ -0,0 +1,3 @@
+A simple ruby script for automating creation and removal of ZFS snapshots.
+
+WWW: http://marcin.studio4plus.com/en/zfs-file-history/howto.html
diff --git a/sysutils/zfs-snapshot-mgmt/pkg-plist b/sysutils/zfs-snapshot-mgmt/pkg-plist
new file mode 100644
index 000000000000..1e1c9e384a27
--- /dev/null
+++ b/sysutils/zfs-snapshot-mgmt/pkg-plist
@@ -0,0 +1,4 @@
+bin/zfs-snapshot-mgmt
+@unexec if cmp -s %D/etc/zfs-snapshot-mgmt.conf.sample %D/etc/zfs-snapshot-mgmt.conf; then rm -f %D/etc/zfs-snapshot-mgmt.conf; fi
+etc/zfs-snapshot-mgmt.conf.sample
+@exec if [ ! -f %D/etc/zfs-snapshot-mgmt.conf ] ; then cp -p %D/%F %B/zfs-snapshot-mgmt.conf; fi