From owner-freebsd-ports@FreeBSD.ORG Mon Jan 2 17:09:53 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAA161065670 for ; Mon, 2 Jan 2012 17:09:53 +0000 (UTC) (envelope-from andrew.hotlab@hotmail.com) Received: from dub0-omc1-s18.dub0.hotmail.com (dub0-omc1-s18.dub0.hotmail.com [157.55.0.217]) by mx1.freebsd.org (Postfix) with ESMTP id 3FA4C8FC08 for ; Mon, 2 Jan 2012 17:09:52 +0000 (UTC) Received: from DUB112-DS14 ([157.55.0.237]) by dub0-omc1-s18.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 2 Jan 2012 09:09:52 -0800 X-Originating-IP: [217.133.211.250] X-Originating-Email: [andrew.hotlab@hotmail.com] Message-ID: From: "Andrew Hotlab" To: Date: Mon, 2 Jan 2012 17:50:24 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3538.513 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513 X-OriginalArrivalTime: 02 Jan 2012 17:09:52.0109 (UTC) FILETIME=[575CD1D0:01CCC971] Cc: ports@freebsd.org Subject: [patch] sysutils/zfs-periodic X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2012 17:09:53 -0000 Sorry for my previous post, Hotmail's web interface is unusable to compose plain-text messages... :( First of all, it's a very nice and useful port: thank you for supporting it! :) I think I have found an error in the file "etc/periodic/weekly/000.zfs-snapshot". Here is the patch: --- 000.zfs-snapshot.orig 2012-01-02 17:24:53.000000000 +0100 +++ 000.zfs-snapshot 2012-01-02 17:23:48.000000000 +0100 @@ -18,7 +18,7 @@ keep=7 fi -case "$daily_zfs_snapshot_enable" in +case "$weekly_zfs_snapshot_enable" in [Yy][Ee][Ss]) . /usr/local/bin/zfs-snapshot do_snapshots "$pools" $keep 'weekly' If we want to create snapshots at dataset level, the main scripts always returns an error, because it doesn't find the pool name to exccute the scrub chek on. The following patch extract the ZFS pool name from the dataset path: --- zfs-snapshot.orig 2011-06-17 00:07:15.000000000 +0200 +++ zfs-snapshot 2011-06-20 09:43:39.000000000 +0200 @@ -3,9 +3,9 @@ # checks to see if there's a scrub in progress scrub_in_progress() { - pool=$1 + rootpool=`echo $pool | sed 's/\([^\/]*\)\/.*/\1/'` - if zpool status $pool | grep "scrub in progress" > /dev/null; then + if zpool status $rootpool | grep "scrub in progress" > /dev/null; then return 0 else return 1 I'd like to see these changes in the next version of your port. Sincerely. Andrew