From c8465fda852554c3cb9ae0cecf158a302f412265 Mon Sep 17 00:00:00 2001 From: jkratoch <> Date: Fri, 25 Dec 2009 11:58:25 +0000 Subject: [PATCH] Cope with missing ionice (RHEL-4). --- .bashrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 7de8245..75afd78 100644 --- a/.bashrc +++ b/.bashrc @@ -349,7 +349,12 @@ function gdbf12cvscheckout {(set -ex );} function uri_escape { perl -MURI::Escape -le '$_=<>;chomp;print uri_escape $_;'; }; function uri_unescape { perl -MURI::Escape -le '$_=<>;chomp;print uri_unescape $_;'; }; -function n { if [ "$1" = "-p" ];then renice +19 "$@";ionice -c3 "$@";else nice -n19 ionice -c3 "$@";fi }; +if which ionice &>/dev/null;then + IONICE="ionice -c3" +else + IONICE="" +fi +function n { if [ "$1" = "-p" ];then renice +19 "$@";test -n "$IONICE" && $IONICE "$@";else nice -n19 $IONICE "$@";fi }; function rpmsrclist { if [ -z "$*" ]; then -- 1.8.3.1