Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Aug 2006 21:25:26 +0200
From:      Ulrich Spoerlein <uspoerlein@gmail.com>
To:        Bill Blue <bblue@controlroom.net>
Cc:        ports@freebsd.org, Rainer Alves <rainer.alves@gmail.com>, timur@gnu.org
Subject:   Re: FreeBSD Port: net/samba3 (rc.d weirdness)
Message-ID:  <20060816192525.GA1167@roadrunner.buck.local>
In-Reply-To: <op.td6pbgxmr2360o@v2.netoldies.com>
References:  <44DE1656.1020803@rogers.com> <44DE1CFD.4010204@gmail.com> <op.td6pbgxmr2360o@v2.netoldies.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Bill Blue wrote:
> On Sat, 12 Aug 2006 11:25:01 -0700, Rainer Alves <rainer.alves@gmail.com> 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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060816192525.GA1167>