FreeBSD Bugzilla – Attachment 152457 Details for
Bug 197255
[PATCH] net/samba41: testparm_command in rc script doesn't use samba_server_config from rc.conf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for samba_server.in
samba_server_config_ignored.patch (text/plain), 2.74 KB, created by
guyyur
on 2015-02-01 21:52:16 UTC
(
hide
)
Description:
patch for samba_server.in
Filename:
MIME Type:
Creator:
guyyur
Created:
2015-02-01 21:52:16 UTC
Size:
2.74 KB
patch
obsolete
>diff -udr net/samba41.orig/files/samba_server.in net/samba41/files/samba_server.in >--- net/samba41.orig/files/samba_server.in 2014-06-23 21:47:48.000000000 +0300 >+++ net/samba41/files/samba_server.in 2015-02-01 20:42:17.000000000 +0200 >@@ -28,14 +28,6 @@ > name="samba_server" > rcvar=${name}_enable > >-# Defaults >-samba_server_config_default="%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%" >-samba_server_config=${samba_server_config=${samba_server_config_default}} >-samba_server_configfile_arg=${samba_server_config:+--configfile="${samba_server_config}"} #" >-#testparm_command="%%PREFIX%%/bin/samba-tool testparm --suppress-prompt --verbose ${samba_server_configfile_arg}" >-testparm_command="%%PREFIX%%/bin/testparm --suppress-prompt --verbose ${samba_server_config}" >-smbcontrol_command="%%PREFIX%%/bin/smbcontrol" >- > # Custom commands > extra_commands="reload status" > >@@ -144,6 +136,16 @@ > > samba_server_config_init() { > local name >+ # Load configuration >+ load_rc_config "${name}" >+ # Defaults >+ samba_server_enable=${samba_server_enable:=NO} >+ samba_server_config_default="%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%" >+ samba_server_config=${samba_server_config=${samba_server_config_default}} >+ samba_server_configfile_arg=${samba_server_config:+--configfile="${samba_server_config}"} #" >+ #testparm_command="%%PREFIX%%/bin/samba-tool testparm --suppress-prompt --verbose ${samba_server_configfile_arg}" >+ testparm_command="%%PREFIX%%/bin/testparm --suppress-prompt --verbose ${samba_server_config}" >+ smbcontrol_command="%%PREFIX%%/bin/smbcontrol" > # Determine what daemons are necessary to run Samba in the current role > samba_server_role=$(${testparm_command} --parameter-name='server role' 2>/dev/null) > case "${samba_server_role}" in >@@ -154,13 +156,10 @@ > samba_daemons="nmbd smbd winbindd" > ;; > esac >- # Load configuration >- load_rc_config "${name}" >+ # Load daemons configuration > for name in ${samba_daemons}; do > load_rc_config "${name}" > done >- # Defaults >- samba_server_enable=${samba_server_enable:=NO} > # Setup dependent variables > if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then > for name in ${samba_daemons}; do >@@ -170,13 +169,16 @@ > if [ -n "${samba_server_idmap}" ]; then > winbindd_enable="YES" > fi >+ else >+ # Set variable to 'YES' only if it is unset >+ eval ${name}_enable=\${${name}_enable=YES} > fi >- # Set variable to 'YES' only if it is unset >- eval ${name}_enable=\${${name}_enable-YES} >- # If variable is empty set it to 'NO' >- eval ${name}_enable=\${${name}_enable:-NO} > done > fi >+ for name in ${samba_daemons}; do >+ # If variable is empty set it to 'NO' >+ eval ${name}_enable=\${${name}_enable:-NO} >+ done > } > > # Load configuration variables
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197255
: 152457