diff options
author | dougb <dougb@FreeBSD.org> | 2012-04-13 17:16:00 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2012-04-13 17:16:00 +0800 |
commit | c67037831ed49267835c93a9e95dbfec7670f7d8 (patch) | |
tree | 5554f5977d5c2788a4409a24f0ca8974a8ea0dd5 /net/samba36 | |
parent | 0e42a56ce02d9aecc83ecf44f1c2f53b4f17fea5 (diff) | |
download | freebsd-ports-gnome-c67037831ed49267835c93a9e95dbfec7670f7d8.tar.gz freebsd-ports-gnome-c67037831ed49267835c93a9e95dbfec7670f7d8.tar.zst freebsd-ports-gnome-c67037831ed49267835c93a9e95dbfec7670f7d8.zip |
The samba rc.d script uses some clever tricks to start (up to) 3 different
services using the same script. As a result it resets rcvar several times
in order to process the options for each service.
The changes I made on 2012/01/14 to facilitate the removal of set_rc_var()
from HEAD were effective in the case where the WINBIND option was off (the
case that I tested) because that causes the related portions of the rc.d
script to be removed completely on install. However, if installed from a
package, or installed using the the default OPTIONS, WINBIND is on, which
caused the last known rcvar to be winbind_enable.
Since the common case seems to be for users to use samba_enable (which
only enables smb_and nmb_ by default) the fact that rcvar=winbind_enable,
but that knob is off, caused the startup script to trip on a totally
unrelated portion of rc.subr.
So the fix is to move processing of the winbind_ stuff first, which leaves
the last known rcvar as smb_enable. Since running nmb without smb is a
very unlikely scenario, this should be safe for the common case, as well
as safe if the user enables winbind_.
Apologies all around for not catching this sooner, and thanks to the users
who reported the problem and stuck with me while I debugged it.
Bump PORTREVISION since this fix is needed for the common case, as
configured for the package.
Diffstat (limited to 'net/samba36')
-rw-r--r-- | net/samba36/Makefile | 2 | ||||
-rw-r--r-- | net/samba36/files/samba.in | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/net/samba36/Makefile b/net/samba36/Makefile index 5d23a0b114a3..01aec5c3f0c2 100644 --- a/net/samba36/Makefile +++ b/net/samba36/Makefile @@ -7,7 +7,7 @@ PORTNAME= ${SAMBA_BASENAME}36 PORTVERSION= 3.6.4 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES?= net MASTER_SITES= ${MASTER_SITE_SAMBA} MASTER_SITE_SUBDIR= . old-versions rc pre diff --git a/net/samba36/files/samba.in b/net/samba36/files/samba.in index 77ad2ff2810e..b2a679c19f37 100644 --- a/net/samba36/files/samba.in +++ b/net/samba36/files/samba.in @@ -53,6 +53,10 @@ if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then fi # XXX: Hack to enable check of the dependent variables eval real_${rcvar}="\${${rcvar}:=NO}" ${rcvar}=YES +%%WINBIND%%# winbindd +%%WINBIND%%rcvar=winbindd_enable +%%WINBIND%%winbindd_enable=${winbindd_enable:=NO} +%%WINBIND%%winbindd_flags=${winbindd_flags=''} # nmbd rcvar=nmbd_enable nmbd_enable=${nmbd_enable:=NO} @@ -61,10 +65,6 @@ nmbd_flags=${nmbd_flags="-D"} rcvar=smbd_enable smbd_enable=${smbd_enable:=NO} smbd_flags=${smbd_flags="-D"} -%%WINBIND%%# winbindd -%%WINBIND%%rcvar=winbindd_enable -%%WINBIND%%winbindd_enable=${winbindd_enable:=NO} -%%WINBIND%%winbindd_flags=${winbindd_flags=''} # Custom commands extra_commands="reload status" start_precmd="samba_start_precmd" |