[fedora-virt] [PATCH] Give a nicer message if retune is called while ksmtuned is off
Justin M. Forbes
jmforbes at linuxtx.org
Mon Sep 27 21:16:48 UTC 2010
On Mon, 2010-09-27 at 11:21 +0200, Dan Kenigsberg wrote:
> ---
> ksmtuned.init | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/ksmtuned.init b/ksmtuned.init
> index e055785..5cd6090 100644
> --- a/ksmtuned.init
> +++ b/ksmtuned.init
> @@ -77,8 +77,14 @@ case "$1" in
> condrestart
> ;;
> retune)
> - kill -SIGUSR1 `cat ${pidfile}`
> + pid=`cat ${pidfile} 2> /dev/null`
> RETVAL=$?
> + if [ -z "$pid" ]; then
> + echo $"Cannot retune, service is not running."
> + else
> + kill -SIGUSR1 $pid
> + RETVAL=$?
> + fi
> ;;
> *)
> echo $"Usage: $prog {start|stop|restart|force-reload|condrestart|try-restart|status|retune|help}"
Applied upstream, and will make the next qemu update for Fedora.
Thanks,
Justin
More information about the virt
mailing list