Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 112677 Details for
Bug 170072
samba init script fixes
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes to samba init script
samba.patch (text/plain), 1.82 KB, created by
Roy Marples (RETIRED)
on 2007-03-09 09:53:15 UTC
(
hide
)
Description:
Fixes to samba init script
Filename:
MIME Type:
Creator:
Roy Marples (RETIRED)
Created:
2007-03-09 09:53:15 UTC
Size:
1.82 KB
patch
obsolete
>--- samba-init 2005-08-09 13:56:26 +0100 >+++ etc/init.d/samba 2007-03-09 09:49:42 +0000 >@@ -3,7 +3,7 @@ > # Distributed under the terms of the GNU General Public License, v2 or later > # $Header: /var/cvsroot/gentoo/src/patchsets/samba/configs/samba-init,v 1.1 2005/08/09 12:56:26 seemant Exp $ > >-opts="${opts} reload" >+opts="reload" > > depend() { > after slapd >@@ -11,46 +11,40 @@ > use cupsd > } > >-function signal_do { >- local signal >- signal="$1" >- if [ -n "${signal}" ]; then >- result=0 >- last_result=0 >- for daemon in ${daemon_list} >- do >- cmd=${daemon}_${signal} >- cmd_exec="${!cmd}" >- if [ -n "${cmd_exec}" ]; then >- ebegin "${my_service_name} -> ${signal}: ${daemon}" >- #echo ${cmd} '->' ${!cmd} >- ${cmd_exec} > /dev/null >- last_result=$? >- eend ${last_result} >- fi >- result=$(( ${result} + ${last_result} )) >- done >- fi >+signal_do() { >+ local signal="$1" >+ [ -z "${signal}" ] && return 0 >+ >+ local result=0 last_result=0 daemon= cmd_exec= >+ for daemon in ${daemon_list} ; do >+ eval cmd_exec=\$${daemon}_${signal} >+ if [ -n "${cmd_exec}" ]; then >+ ebegin "${my_service_name} -> ${signal}: ${daemon}" >+ #echo ${cmd} '->' ${!cmd} >+ ${cmd_exec} > /dev/null >+ last_result=$? >+ eend ${last_result} >+ fi >+ result=$(( ${result} + ${last_result} )) >+ done > return ${result} > } > start() { > ${my_service_PRE} >- signal_do start >- result_start=$? >- if [ ${result_start} -gt 0 ]; then >- ewarn "Error: stopping services (see system logs)" >- signal_do stop >- fi >- eend ${result_start} >+ signal_do start && return 0 >+ >+ eerror "Error: starting services (see system logs)" >+ signal_do stop >+ return 1 > } > stop() { > ${my_service_PRE} >- signal_do stop >- ${my_service_POST} >- eend $? >+ if signal_do stop ; then >+ ${my_service_POST} >+ return 0 >+ fi > } > reload() { > ${my_service_PRE} > signal_do reload >- eend $? > }
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 170072
: 112677