diff options
author | dteske <dteske@FreeBSD.org> | 2013-06-18 21:44:35 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-06-18 21:44:35 +0000 |
commit | e1afea6c7ee734fbdedaca02749e0fb178200c36 (patch) | |
tree | dba39d4168e5d82fbe343b9942b78de087aab01c /usr.sbin/bsdconfig/console | |
parent | e126a17bd263caf562796096aba9da73f641d793 (diff) | |
download | FreeBSD-src-e1afea6c7ee734fbdedaca02749e0fb178200c36.zip FreeBSD-src-e1afea6c7ee734fbdedaca02749e0fb178200c36.tar.gz |
Perform some code consolidation and add some additional error
checking/reporting. (similar to SVN revisions 251919 and 251928)
Diffstat (limited to 'usr.sbin/bsdconfig/console')
-rwxr-xr-x | usr.sbin/bsdconfig/console/console | 27 | ||||
-rw-r--r-- | usr.sbin/bsdconfig/console/include/messages.subr | 1 |
2 files changed, 15 insertions, 13 deletions
diff --git a/usr.sbin/bsdconfig/console/console b/usr.sbin/bsdconfig/console/console index 7be4ff5..02ab63b 100755 --- a/usr.sbin/bsdconfig/console/console +++ b/usr.sbin/bsdconfig/console/console @@ -121,21 +121,22 @@ while :; do dialog_menu_main || f_die f_dialog_menutag_fetch mtag + command= case "$mtag" in - "X $msg_exit") break ;; - "2 $msg_font") # Choose an alternate screen font - $BSDCFG_LIBE/$APP_DIR/font ${USE_XDIALOG:+-X} ;; - "3 $msg_keymap") # Choose an alternate keyboard map - $BSDCFG_LIBE/$APP_DIR/keymap ${USE_XDIALOG:+-X} ;; - "4 $msg_repeat") # Set the rate at which keys repeat - $BSDCFG_LIBE/$APP_DIR/repeat ${USE_XDIALOG:+-X} ;; - "5 $msg_saver") # Configure the screen saver - $BSDCFG_LIBE/$APP_DIR/saver ${USE_XDIALOG:+-X} ;; - "6 $msg_screenmap") # Choose an alternate screenmap - $BSDCFG_LIBE/$APP_DIR/screenmap ${USE_XDIALOG:+-X} ;; - "7 $msg_ttys") # Choose console terminal type - $BSDCFG_LIBE/$APP_DIR/ttys ${USE_XDIALOG:+-X} ;; + "X $msg_exit") break ;; + "2 $msg_font") command=font ;; # Choose alternate screen font + "3 $msg_keymap") command=keymap ;; # Choose alt. keyboard map + "4 $msg_repeat") command=repeat ;; # Set key repeat rate + "5 $msg_saver") command=saver ;; # Configure the screen saver + "6 $msg_screenmap") command=screenmap ;; # Choose alternate screenmap + "7 $msg_ttys") command=ttys ;; # Choose console terminal type esac + + if [ "$command" ]; then + $BSDCFG_LIBE/$APP_DIR/$command ${USE_XDIALOG:+-X} ;; + else + f_die 1 "$msg_unknown_console_menu_selection" + fi done exit $SUCCESS diff --git a/usr.sbin/bsdconfig/console/include/messages.subr b/usr.sbin/bsdconfig/console/include/messages.subr index d5bbebb..11e3022 100644 --- a/usr.sbin/bsdconfig/console/include/messages.subr +++ b/usr.sbin/bsdconfig/console/include/messages.subr @@ -241,6 +241,7 @@ msg_ukrainian_koi8_u="Ukranian KOI8-U" msg_ukrainian_koi8_u_desc="Ukranian KOI8-U keymap" msg_ukrainian_koi8_u_koi8_r="Ukranian KOI8-U+KOI8-R" msg_ukrainian_koi8_u_koi8_r_desc="Ukranian KOI8-U+KOI8-R keymap (alter)" +msg_unknown_console_menu_selection="Unknown console menu selection" msg_unknown_font_selection="Unknown font selection" msg_unknown_keymap="Unknown keymap" msg_unknown_repeat_rate="Unknown repeat rate" |