From owner-freebsd-bugs Mon Jan 27 12:30: 6 2003 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C685337B401 for ; Mon, 27 Jan 2003 12:30:03 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E27C943F79 for ; Mon, 27 Jan 2003 12:30:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h0RKU2NS002547 for ; Mon, 27 Jan 2003 12:30:02 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h0RKU2tn002546; Mon, 27 Jan 2003 12:30:02 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0376A37B401 for ; Mon, 27 Jan 2003 12:25:40 -0800 (PST) Received: from crie.coppe.ufrj.br (krakatoa.crie.coppe.ufrj.br [146.164.91.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54C3443F1E for ; Mon, 27 Jan 2003 12:25:39 -0800 (PST) (envelope-from root@crie.coppe.ufrj.br) Received: by crie.coppe.ufrj.br (Postfix, from userid 0) id EFB214477C6; Mon, 27 Jan 2003 18:25:31 -0200 (BRST) Message-Id: <20030127202531.EFB214477C6@crie.coppe.ufrj.br> Date: Mon, 27 Jan 2003 18:25:31 -0200 (BRST) From: Joao Carlos Mendes Luis Reply-To: Joao Carlos Mendes Luis To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/47566: Suggested patch: vinum status verification Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 47566 >Category: bin >Synopsis: Suggested patch: vinum status verification >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jan 27 12:30:02 PST 2003 >Closed-Date: >Last-Modified: >Originator: Joao Carlos Mendes Luis >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD krakatoa.crie.coppe.ufrj.br 4.7-STABLE FreeBSD 4.7-STABLE #0: Tue Nov 26 18:43:55 BRST 2002 jonny@krakatoa.crie.coppe.ufrj.br:/usr/cvsup/RELENG_4/src/sys/compile/KRAKATOA i386 >Description: Currently vinum does not send any reports by email. This script, to be used in daily periodic checks for differences in vinum status. >How-To-Repeat: >Fix: #!/bin/sh # # $Id: 230.backup-vinum,v 1.1 2003/01/27 20:22:49 jonny Exp $ # # Suck in the configuration variables. if [ -z "${source_rc_confs_defined}" ]; then if [ -r /etc/defaults/rc.conf ]; then . /etc/defaults/rc.conf source_rc_confs elif [ -r /etc/rc.conf ]; then . /etc/rc.conf fi fi case "$start_vinum" in [Yy][Ee][Ss]) bak=/var/backups rc=0 echo "" echo "Backing up vinum status:" if [ ! -f $bak/vinum.bak ] then echo "no $bak/vinum.bak" vinum l > $bak/vinum.bak || rc=3 fi vinum l > $bak/vinum.tmp || rc=2 if ! cmp -s $bak/vinum.tmp $bak/vinum.bak then [ $rc -lt 1 ] && rc=1 echo "$host vinum diffs:" diff -u $bak/vinum.tmp $bak/vinum.bak mv $bak/vinum.bak $bak/vinum.bak2 mv $bak/vinum.tmp $bak/vinum.bak fi ;; *) rc=0;; esac exit $rc >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message