aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMac Mollison <mollison@cs.unc.edu>2010-11-09 14:17:19 -0500
committerMac Mollison <mollison@cs.unc.edu>2010-11-09 15:35:48 -0500
commitf620b0f03549aa9c0b50ac79ceff5de390b28de3 (patch)
tree4f8a39549cc9cdd66eb8c63897c8b3004d3d8be9
parentf96fd2faac2baed4d5d1d1b8ea124714e5cbce56 (diff)
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.
-rwxr-xr-xsetsched9
1 files changed, 4 insertions, 5 deletions
diff --git a/setsched b/setsched
index bae94d4..0714f46 100755
--- a/setsched
+++ b/setsched
@@ -4,7 +4,7 @@
4 4
5ADIR=/proc/litmus/active_plugin 5ADIR=/proc/litmus/active_plugin
6PDIR=/proc/litmus/plugins/loaded 6PDIR=/proc/litmus/plugins/loaded
7DIALOG=`which dialog` 7DIALOG=`which dialog 2> /dev/null`
8 8
9CHOICE=$1 9CHOICE=$1
10 10
@@ -22,10 +22,9 @@ if [ -z "$1" ]; then
22 # Check for presence of dialog, some distros don't install it by default. 22 # Check for presence of dialog, some distros don't install it by default.
23 if [ -z "$DIALOG" ]; then 23 if [ -z "$DIALOG" ]; then
24 echo "Error: The dialog utility cannot be found." 24 echo "Error: The dialog utility cannot be found."
25 echo " Please install the required package (dialog on Ubuntu)." 25 echo " Please install the required package (dialog on Ubuntu),"
26 echo " Note that you can also use setsched by passing the" 26 echo " or specify the desired plugin as a commandline argument,"
27 echo " desired scheduling plugins as a commandline argument," 27 echo " e.g., 'setsched GSN-EDF'."
28 echo " i.e., 'setsched GSN-EDF' activates GSN-EDF."
29 exit 2 28 exit 2
30 fi 29 fi
31 TMP=`mktemp` 30 TMP=`mktemp`