From owner-freebsd-rc@FreeBSD.ORG Thu Jun 8 21:54:40 2006 Return-Path: X-Original-To: freebsd-rc@hub.freebsd.org Delivered-To: freebsd-rc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B4B216ADB2 for ; Thu, 8 Jun 2006 21:54:40 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 343B843D58 for ; Thu, 8 Jun 2006 21:54:36 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k58LUYfQ069256 for ; Thu, 8 Jun 2006 21:30:34 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k58LUYQO069255; Thu, 8 Jun 2006 21:30:34 GMT (envelope-from gnats) Date: Thu, 8 Jun 2006 21:30:34 GMT Message-Id: <200606082130.k58LUYQO069255@freefall.freebsd.org> To: freebsd-rc@FreeBSD.org From: Doug White Cc: Subject: Re: conf/94377 : [patch] /etc/rc.d/sshd improperly tests random dev state X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Doug White 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: Thu, 08 Jun 2006 21:54:40 -0000 The following reply was made to PR conf/94377; it has been noted by GNATS. From: Doug White To: Rostislav Krasny Cc: Florent Thoumie , Doug White , bug-followup@FreeBSD.org Subject: Re: conf/94377 : [patch] /etc/rc.d/sshd improperly tests random dev state Date: Thu, 8 Jun 2006 10:36:05 -0700 (PDT) On Thu, 8 Jun 2006, Rostislav Krasny wrote: > I've seen that patch just today, when it is already MFCed. I think it > could be simpler. Instead of > > [ "x${seeded}" != "x" ] && [ ${seeded} -eq 0 ] > > you can write just > > [ "${seeded}" = "0" ] > > and it will be still correct against sysctl failing and returning an > empty string. No, because if ${seeded} is empty, the shell interprets the test as [ = "0" ] which results in a syntax error. The 'x' in the first test is significant. -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org