Index: ctdb-1.0.28+git200802081512/config/events.d/50.samba =================================================================== --- ctdb-1.0.28+git200802081512.orig/config/events.d/50.samba 2008-02-12 19:17:25.000000000 +0100 +++ ctdb-1.0.28+git200802081512/config/events.d/50.samba 2008-02-12 19:17:49.000000000 +0100 @@ -66,7 +66,7 @@ # start Samba service. Start it reniced, as under very heavy load # the number of smbd processes will mean that it leaves few cycles for # anything else - nice service smb start + nice_service smb start ;; takeip) Index: ctdb-1.0.28+git200802081512/config/functions =================================================================== --- ctdb-1.0.28+git200802081512.orig/config/functions 2008-02-12 19:17:16.000000000 +0100 +++ ctdb-1.0.28+git200802081512/config/functions 2008-02-12 19:18:52.000000000 +0100 @@ -29,6 +29,19 @@ fi } +###################################################### +# simulate /sbin/service (niced) on platforms that don't have it +nice_service() { + service_name="$1" + op="$2" + 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 +} ###################################################### # wait for a command to return a zero exit status