[Bug 197255] [PATCH] net/samba41: testparm_command in rc script doesn't use samba_server_config from rc.conf
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Feb 1 21:52:17 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197255
Bug ID: 197255
Summary: [PATCH] net/samba41: testparm_command in rc script
doesn't use samba_server_config from rc.conf
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: timur at FreeBSD.org
Reporter: guyyur at gmail.com
Flags: maintainer-feedback?(timur at FreeBSD.org)
Assignee: timur at FreeBSD.org
Created attachment 152457
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=152457&action=edit
patch for samba_server.in
Description:
A samba_server_config statement in rc.conf is ignored and the default
is used by samba_server rc script because it specifies testparm_command
after samba_server_config is set to $samba_server_config_default and
before load_rc_config sets it from rc.conf.
Attached patch to:
1. move load_rc_config for "samba_server" to before
checking samba_server_role.
2. move setting samba_server_config, testparm_command
to after doing load_rc_config for "samba_server".
3. fix winbindd being started when winbindd_enable is unset and
samba_server_idmap is not specified in config file.
(comment at start of script "You need to enable winbindd separately")
# grep samba_server /etc/rc.conf
samba_server_enable="YES"
samba_server_config="/usr/local/etc/smb.conf"
# sh -x /usr/local/etc/rc.d/samba_server start
+ . /etc/rc.subr
+ : 28915
+ export RC_PID
+ [ -z '' ]
+ _rc_subr_loaded=YES
...
+ name=samba_server
+ rcvar=samba_server_enable
+ samba_server_config_default=/usr/local/etc/smb4.conf
+ samba_server_config=/usr/local/etc/smb4.conf
+ samba_server_configfile_arg=--configfile=/usr/local/etc/smb4.conf
+ testparm_command='/usr/local/bin/testparm --suppress-prompt --verbose
/usr/local/etc/smb4.conf'
...
+ load_rc_config samba_server
...
+ samba_server_enable=YES
+ samba_server_config=/usr/local/etc/smb.conf
...
+ [ winbindd = winbindd ]
+ /usr/local/bin/testparm --suppress-prompt --verbose /usr/local/etc/smb4.conf
'--parameter-name=idmap uid'
+ samba_server_idmap=''
+ [ -n '' ]
+ eval 'winbindd_enable=${winbindd_enable-YES}'
+ winbindd_enable=YES
+ eval 'winbindd_enable=${winbindd_enable:-NO}'
+ winbindd_enable=YES
--- Comment #1 from Bugzilla Automation <bugzilla at FreeBSD.org> ---
Auto-assigned to maintainer timur at FreeBSD.org
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list