mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
Correct nice_service()
nice takes a binary as argument and not a function or builtin command (This used to be ctdb commit e21b40db64b314a24caa2bc611cb48b93decb5aa)
This commit is contained in:
parent
9fc080d529
commit
e7bca0dcfc
@ -61,10 +61,19 @@ service() {
|
||||
######################################################
|
||||
# simulate /sbin/service (niced) on platforms that don't have it
|
||||
nice_service() {
|
||||
# do nothing, when no service was specified
|
||||
[ -z "$1" ] && return
|
||||
_service_name="$1"
|
||||
_op="$2"
|
||||
|
||||
nice service "$@"
|
||||
# do nothing, when no service was specified
|
||||
[ -z "$_service_name" ] && return
|
||||
|
||||
if [ -x /sbin/service ]; then
|
||||
nice /sbin/service "$_service_name" "$_op"
|
||||
elif [ -x /etc/init.d/$_service_name ]; then
|
||||
nice /etc/init.d/$_service_name "$_op"
|
||||
elif [ -x /etc/rc.d/init.d/$_service_name ]; then
|
||||
nice /etc/rc.d/init.d/$_service_name "$_op"
|
||||
fi
|
||||
}
|
||||
|
||||
######################################################
|
||||
|
Loading…
Reference in New Issue
Block a user