From owner-freebsd-ipfw@freebsd.org Tue May 1 15:03:34 2018 Return-Path: Delivered-To: freebsd-ipfw@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9760FFADAC4 for ; Tue, 1 May 2018 15:03:34 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0746079C8F; Tue, 1 May 2018 15:03:33 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w41F3Pfj026424; Tue, 1 May 2018 08:03:25 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w41F3PxP026423; Tue, 1 May 2018 08:03:25 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201805011503.w41F3PxP026423@pdx.rh.CN85.dnsmgr.net> Subject: Re: removing some error states In-Reply-To: <41bea4ce-de10-bdb9-1184-3016fa7c77ca@freebsd.org> To: Julian Elischer Date: Tue, 1 May 2018 08:03:25 -0700 (PDT) CC: "freebsd-ipfw@freebsd.org" X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2018 15:03:34 -0000 > Many years ago I added code to ipfw so that if -q was set it would not > complain about > things that were unimportant, nor would it return an error code. > Such things include removing table entries that are already gone and > similar sorts of 'safe' operations. > The idea is that you can write 'naive' scripts that don't need to do > complicated checks to see if XXX is already present or gone.. > In hte ame way that rm -f doesn't complain if the file doesn't > exist..? You were going to delete it anyhow. > > > I'd like that to continue to some of the new additions. > for example the terribly annoying > ??? ipfw: DEPRECATED: inserting data into non-existent table 18. > (auto-created) (who cares?) > > and > > ?? ljcc-78# ipfw table 19 create > ???? ipfw: Table creation failed: File exists > > As the script needs to run multiple times, I don't care if the table > already exists. > but I do care about other errors. > I don't want to have to write special wrapper code for table create > that is different > from the wrappers elsewhere because it has to look for return code 71 > and disregard it. > Can we just have -q continue to ignore such errors please? I think there is a bigger question here, why was auto table creation with first insert "Deprecated" at all? This to me just seems like change cause someone could change it that has no usefull purpose or is there some great purpose this serves? Same with creation of an already existing file, why did that need to become a noisy warning/error? -- Rod Grimes rgrimes@freebsd.org