135a136,144 > samba_server_defaultyes() > { > load_rc_config $1 > eval ${1}_enable=\${${1}_enable-YES} > if checkyesno ${1}_enable; then > samba_daemons="$samba_daemons $1" > fi > } > 137d145 < local name 150c158 < samba_daemons="samba" --- > samba_server_defaultyes "samba" 153,167c161,167 < samba_daemons="nmbd smbd winbindd" < ;; < esac < # Load daemons configuration < for name in ${samba_daemons}; do < load_rc_config "${name}" < # If samba_server_enable is 'YES' < if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then < if [ "${name}" != "winbindd" ]; then < # Set variable to 'YES' only if it is unset < eval ${name}_enable=\${${name}_enable-YES} < else < # Winbindd < samba_server_idmap=$(${testparm_command} --parameter-name='idmap uid' 2>/dev/null) < if [ -n "${samba_server_idmap}" ]; then --- > samba_server_defaultyes "nmbd" > samba_server_defaultyes "smbd" > # Winbindd will be active if it's set to "YES" in rc.conf > # or if 'idmap id' is defined in smb4.conf > load_rc_config "winbindd" > samba_server_idmap=$(${testparm_command} --parameter-name='idmap uid' 2>/dev/null) > if [ -n "${samba_server_idmap}" ]; then 169d168 < fi 171,174c170,174 < fi < # If variable is empty, set it to 'NO' < eval ${name}_enable=\${${name}_enable:-NO} < done --- > if [ -n "$winbindd_enable" ] && checkyesno winbindd_enable; then > samba_daemons="${samba_daemons} winbindd" > fi > ;; > esac