Quiet check for available program(s)
authorMichael Prokop <mika@grml.org>
Tue, 7 Jan 2014 09:14:54 +0000 (10:14 +0100)
committerMichael Prokop <mika@grml.org>
Tue, 7 Jan 2014 09:14:55 +0000 (10:14 +0100)
check4progs nowadays emmits a warning message on stderr
if the binary isn't available, there is no point in
listing all window managers etc and print error messages
then.

quickconfig/030-wm.sh
quickconfig/035-menu.sh
quickconfig/040-grml-debootstrap.sh

index 6a12e12..cc3bd99 100644 (file)
@@ -5,7 +5,7 @@ FUNCTION='wm_menu'
 
 display_entry() {
     . /etc/grml/script-functions
 
 display_entry() {
     . /etc/grml/script-functions
-    check4progs grml-x >/dev/null
+    check4progs grml-x >/dev/null 2>&1
     return $?
 }
 
     return $?
 }
 
@@ -45,7 +45,7 @@ print_available_wm() {
   local line
 
   for key value in ${(kv)wms} ; do
   local line
 
   for key value in ${(kv)wms} ; do
-    if check4progs $value >/dev/null ; then
+    if check4progs $value >/dev/null 2>&1 ; then
       available[$key]=$value
       # test if word could be added to current line
       if [ $((${(c)#value} + $LEN)) -ge $(($MAXLEN-9)) ] ; then
       available[$key]=$value
       # test if word could be added to current line
       if [ $((${(c)#value} + $LEN)) -ge $(($MAXLEN-9)) ] ; then
index e104197..443d828 100644 (file)
@@ -7,7 +7,7 @@ FUNCTION="run $MENU_PROGNAME"
 
 display_entry() {
     . /etc/grml/script-functions
 
 display_entry() {
     . /etc/grml/script-functions
-    check4progs $MENU_PROGNAME >/dev/null
+    check4progs $MENU_PROGNAME >/dev/null 2>&1
     return $?
 }
 
     return $?
 }
 
index 3eec7b3..eab1888 100644 (file)
@@ -5,7 +5,7 @@ FUNCTION="run $HD_APP"
 
 display_entry() {
     . /etc/grml/script-functions
 
 display_entry() {
     . /etc/grml/script-functions
-    check4progs $HD_APP >/dev/null
+    check4progs $HD_APP >/dev/null 2>&1
     return $?
 }
 
     return $?
 }