From f620b0f03549aa9c0b50ac79ceff5de390b28de3 Mon Sep 17 00:00:00 2001 From: Mac Mollison Date: Tue, 9 Nov 2010 14:17:19 -0500 Subject: Don't show output from `which dialog` in setsched Prevents `which dialog` from outputting (ugly) information to stderr in the case that dialog is not installed. Changes error message to make it more clear that dialog is strictly optional. --- setsched | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/setsched b/setsched index bae94d4..0714f46 100755 --- a/setsched +++ b/setsched @@ -4,7 +4,7 @@ ADIR=/proc/litmus/active_plugin PDIR=/proc/litmus/plugins/loaded -DIALOG=`which dialog` +DIALOG=`which dialog 2> /dev/null` CHOICE=$1 @@ -22,10 +22,9 @@ if [ -z "$1" ]; then # Check for presence of dialog, some distros don't install it by default. if [ -z "$DIALOG" ]; then echo "Error: The dialog utility cannot be found." - echo " Please install the required package (dialog on Ubuntu)." - echo " Note that you can also use setsched by passing the" - echo " desired scheduling plugins as a commandline argument," - echo " i.e., 'setsched GSN-EDF' activates GSN-EDF." + echo " Please install the required package (dialog on Ubuntu)," + echo " or specify the desired plugin as a commandline argument," + echo " e.g., 'setsched GSN-EDF'." exit 2 fi TMP=`mktemp` -- cgit v1.2.2