gsu: Fix com_prefs() for invalid preferences.
authorAndre Noll <maan@systemlinux.org>
Thu, 25 Mar 2010 14:23:25 +0000 (15:23 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 29 Aug 2014 19:36:07 +0000 (21:36 +0200)
The prefs command would print only empty values for
all options that come after an invalid option.
Refuse to execute com_prefs() in this case is the most
simple fix.

funcs/gsu

index d72f54f..7e066f7 100644 (file)
--- a/funcs/gsu
+++ b/funcs/gsu
@@ -362,7 +362,7 @@ gsu()
        _gsu_init_errors
        _gsu_check_options
        if [[ "$ret" -lt 0 ]]; then
-               if [[ "$1" != "help" && "$1" != "man" && "$1" != "prefs" ]]; then
+               if [[ "$1" != "help" && "$1" != "man" ]]; then
                        gsu_err_msg
                        exit 1
                fi