From owner-svn-src-all@FreeBSD.ORG Mon Sep 28 03:32:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFF611065693; Mon, 28 Sep 2009 03:32:35 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEF948FC19; Mon, 28 Sep 2009 03:32:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8S3WZZD042261; Mon, 28 Sep 2009 03:32:35 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8S3WZAP042258; Mon, 28 Sep 2009 03:32:35 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200909280332.n8S3WZAP042258@svn.freebsd.org> From: Colin Percival Date: Mon, 28 Sep 2009 03:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197552 - in head/etc/periodic: daily security X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 03:32:35 -0000 Author: cperciva Date: Mon Sep 28 03:32:35 2009 New Revision: 197552 URL: http://svn.freebsd.org/changeset/base/197552 Log: Silence warning printed by getfsspec(3) when /etc/fstab does not exist fstab: /etc/fstab:0: No such file or directory and from dump(8) when setfsent(3) fails due to /etc/fstab not existing: DUMP: Can't open /etc/fstab for dump table information: No such... This makes daily and security periodic runs somewhat cleaner in jails which lack /etc/fstab files. MFC after: 1 month Modified: head/etc/periodic/daily/400.status-disks head/etc/periodic/security/200.chkmounts Modified: head/etc/periodic/daily/400.status-disks ============================================================================== --- head/etc/periodic/daily/400.status-disks Sun Sep 27 23:01:17 2009 (r197551) +++ head/etc/periodic/daily/400.status-disks Mon Sep 28 03:32:35 2009 (r197552) @@ -19,6 +19,9 @@ case "$daily_status_disks_enable" in df $daily_status_disks_df_flags && rc=1 || rc=3 # display which filesystems need backing up + if ! [ -f /etc/fstab ]; then + export PATH_FSTAB=/dev/null + fi echo "" dump W || rc=3;; Modified: head/etc/periodic/security/200.chkmounts ============================================================================== --- head/etc/periodic/security/200.chkmounts Sun Sep 27 23:01:17 2009 (r197551) +++ head/etc/periodic/security/200.chkmounts Mon Sep 28 03:32:35 2009 (r197552) @@ -50,6 +50,9 @@ case "$daily_status_security_chkmounts_e ignore="${ignore}|^amd:" esac [ -n "$ignore" ] && cmd="egrep -v ${ignore#|}" || cmd=cat + if ! [ -f /etc/fstab ]; then + export PATH_FSTAB=/dev/null + fi mount -p | sort | ${cmd} | check_diff mount - "${host} changes in mounted filesystems:" rc=$?;;