From owner-freebsd-rc@FreeBSD.ORG Sat Jan 19 00:50:02 2013 Return-Path: Delivered-To: freebsd-rc@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B1BA221A for ; Sat, 19 Jan 2013 00:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2B4F7 for ; Sat, 19 Jan 2013 00:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0J0o2vT069018 for ; Sat, 19 Jan 2013 00:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0J0o28a069011; Sat, 19 Jan 2013 00:50:02 GMT (envelope-from gnats) Date: Sat, 19 Jan 2013 00:50:02 GMT Message-Id: <201301190050.r0J0o28a069011@freefall.freebsd.org> To: freebsd-rc@FreeBSD.org Cc: From: Garrett Cooper Subject: Re: conf/175311: [patch] add "dump" fs type support to rc.d/dumpon X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Garrett Cooper List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2013 00:50:02 -0000 The following reply was made to PR conf/175311; it has been noted by GNATS. From: Garrett Cooper To: d@delphij.net Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: conf/175311: [patch] add "dump" fs type support to rc.d/dumpon Date: Fri, 18 Jan 2013 16:47:44 -0800 On Jan 18, 2013, at 4:43 PM, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 01/14/13 14:49, Garrett Cooper wrote: >> >>> Number: 175311 Category: conf Synopsis: >>> [patch] add "dump" fs type support to rc.d/dumpon Confidential: >>> no Severity: non-critical Priority: low Responsible: >>> freebsd-bugs State: open Quarter: Keywords: >>> Date-Required: Class: sw-bug Submitter-Id: >>> current-users Arrival-Date: Mon Jan 14 22:50:00 UTC 2013 >>> Closed-Date: Last-Modified: Originator: Garrett Cooper >>> Release: 10-CURRENT Organization: >> EMC Isilon >>> Environment: >> FreeBSD gran-tourismo.west.isilon.com 10.0-CURRENT FreeBSD >> 10.0-CURRENT #1 r+294c6eb: Fri Jan 4 07:38:46 PST 2013 >> root@gran-tourismo.west.isilon.com:/usr/obj/usr/src/sys/GRAN-TOURISMO >> amd64 >>> Description: >> savecore(8) notes that you can use dump for the FS type, but dumpon >> only supports swap for the FS type. The attached patch enhances >> both FS types to work with dumpon + savecore. >>> How-To-Repeat: >> >>> Fix: >> >> >> Patch attached with submission follows: >> >> From 16921efded40ef4c7800f07157f0e52be4cf8121 Mon Sep 17 00:00:00 >> 2001 From: Garrett Cooper Date: Mon, 14 Jan >> 2013 14:39:59 -0800 Subject: [PATCH] Support the pseudo fs_vfstype >> == "dump" noted in savecore(8) >> >> Signed-off-by: Garrett Cooper --- >> etc/rc.d/dumpon | 7 ++++++- 1 file changed, 6 insertions(+), 1 >> deletion(-) >> >> diff --git a/etc/rc.d/dumpon b/etc/rc.d/dumpon index >> ce5fc1c..981ff84 100755 --- a/etc/rc.d/dumpon +++ >> b/etc/rc.d/dumpon @@ -40,7 +40,12 @@ dumpon_start() return $? fi >> while read dev mp type more ; do - [ "${type}" = "swap" ] || >> continue + case "$type" in + dump|swap) + ;; + *) + >> continue;; + esac > > Why not just: > > [ "${type}" = "swap" -o "${type}" = "dump" ] || continue? That's valid too -- didn't realize it had been converted to a built-in: $ type [ [ is a shell builtin Thanks! -Garrett