From owner-freebsd-ports@FreeBSD.ORG Thu Aug 17 12:20:06 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DC5D16A4DD for ; Thu, 17 Aug 2006 12:20:06 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8359F43D79 for ; Thu, 17 Aug 2006 12:19:59 +0000 (GMT) (envelope-from uspoerlein@gmail.com) Received: by nf-out-0910.google.com with SMTP id n29so1080513nfc for ; Thu, 17 Aug 2006 05:19:58 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to; b=VgvVhMn4BvwkenKxIUlIl93HE3nwICeKmOcHQmFk5vHO82mUbYKzD6AKUqpC1+eJhlo0ypEbQNtYI1/fDFzcwkOXujliIIVjAHTHUL55zX2SfnJ3AV2z2y3CGnfYWApXz9YagBvjrHl8n5IBazD03W3+qF2nfnYXFVCT9iaRl9A= Received: by 10.49.8.1 with SMTP id l1mr2131434nfi; Thu, 17 Aug 2006 05:19:57 -0700 (PDT) Received: from roadrunner.q.local ( [217.185.119.185]) by mx.gmail.com with ESMTP id m16sm5492701nfc.2006.08.17.05.19.54; Thu, 17 Aug 2006 05:19:57 -0700 (PDT) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.6/8.13.6) with ESMTP id k7HCJgRC001943; Thu, 17 Aug 2006 14:19:44 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.13.6/8.13.6/Submit) id k7GJPQBk006415; Wed, 16 Aug 2006 21:25:26 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Wed, 16 Aug 2006 21:25:26 +0200 From: Ulrich Spoerlein To: Bill Blue Message-ID: <20060816192525.GA1167@roadrunner.buck.local> Mail-Followup-To: Bill Blue , Rainer Alves , ports@freebsd.org, timur@gnu.org References: <44DE1656.1020803@rogers.com> <44DE1CFD.4010204@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: ports@freebsd.org, Rainer Alves , timur@gnu.org Subject: Re: FreeBSD Port: net/samba3 (rc.d weirdness) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Aug 2006 12:20:06 -0000 Bill Blue wrote: > On Sat, 12 Aug 2006 11:25:01 -0700, Rainer Alves wrote: > > >Mike Jakubik wrote: > >>The startup script for Samba states: > >[...] > >>However when setting samba_enable="YES" in rc.conf, the restart option does not function > >>correctly, as it only restarts smbd. If we instead set the alternative of nmbd_enable="YES" > >>and smbd_enable="YES", we get the following warning during startup. > >> /etc/rc: WARNING: $samba_enable is not set properly - see rc.conf(5). > > > >This message is also shown during boot even if rc.conf doesn't have any samba-related > >variables set. > [...] > The correct config is in /usr/local/etc/rc.d as 'samba' and will do the right things when > called during the rc rotations. > > If there are any references to samba in /etc/rc.conf other than samba_enable="YES" remove > them. It should work fine after that. No, it does not work fine, as the samba rcNG script is triggering a flaw in the rcNG system. The function "checkyesno" cannot handle undefined variables and will thus print an error. This will happen ON EVERY machine that samba3 is installed, but there is no samba_enable="YES/NO" line in rc.conf. The quick fix is to alter the samba script to set a default value (to NO), just like almost every other port does, eg., run $ egrep '_enable:?-"?NO' /usr/local/etc/rc.d/* 010.pgsql.sh:postgresql_enable=${postgresql_enable:-"NO"} privoxy:privoxy_enable=${privoxy_enable-"NO"} snmpd:snmpd_enable=${snmpd_enable-"NO"} symon:symon_enable=${symon_enable:-"NO"} I'll CC the maintainer ... Ulrich Spoerlein -- A: Yes. >Q: Are you sure? > >A: Because it reverses the logical flow of conversation. > >>Q: Why is top posting frowned upon?