diff options
author | Mac Mollison <mollison@cs.unc.edu> | 2010-11-09 14:17:19 -0500 |
---|---|---|
committer | Mac Mollison <mollison@cs.unc.edu> | 2010-11-09 15:35:48 -0500 |
commit | f620b0f03549aa9c0b50ac79ceff5de390b28de3 (patch) | |
tree | 4f8a39549cc9cdd66eb8c63897c8b3004d3d8be9 | |
parent | f96fd2faac2baed4d5d1d1b8ea124714e5cbce56 (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-x | setsched | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | ADIR=/proc/litmus/active_plugin | 5 | ADIR=/proc/litmus/active_plugin |
6 | PDIR=/proc/litmus/plugins/loaded | 6 | PDIR=/proc/litmus/plugins/loaded |
7 | DIALOG=`which dialog` | 7 | DIALOG=`which dialog 2> /dev/null` |
8 | 8 | ||
9 | CHOICE=$1 | 9 | CHOICE=$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` |