1#!/bin/sh
2#-
3# Copyright (c) 2012-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
--- 10 unchanged lines hidden (view full) ---
19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/usr.sbin/bsdconfig/console/font 251236 2013-06-01 23:58:44Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." "$0"
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/mustberoot.subr
--- 54 unchanged lines hidden (view full) ---
90 iso02-8x8) defaultitem="9 $msg_iso_8859_2";;
91 iso04-8x8) defaultitem="a $msg_iso_8859_4";;
92 iso07-8x8) defaultitem="b $msg_iso_8859_7";;
93 iso08-8x8) defaultitem="c $msg_iso_8859_8";;
94 iso15-8x8) defaultitem="d $msg_iso_8859_15";;
95 swiss-8x8) defaultitem="e $msg_swiss";;
96 esac
97
98 local menu_choice
99 menu_choice=$( eval $DIALOG \
100 --title \"\$DIALOG_TITLE\" \
101 --backtitle \"\$DIALOG_BACKTITLE\" \
102 --hline \"\$hline\" \
103 --ok-label \"\$msg_ok\" \
104 --cancel-label \"\$msg_cancel\" \
105 --default-item \"\$defaultitem\" \
106 --menu \"\$prompt\" \
107 $height $width $rows \
108 $menu_list \
109 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
110 )
111 local retval=$?
112 f_dialog_menutag_store -s "$menu_choice"
113 return $retval
114}
115
116############################################################ MAIN
117
118# Incorporate rc-file if it exists
119[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"
120
--- 13 unchanged lines hidden (view full) ---
134f_dialog_title "$msg_system_console_font"
135f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
136f_mustberoot_init
137
138#
139# Launch application main menu
140#
141while :; do
142 dialog_menu_main || f_die
143 f_dialog_menutag_fetch mtag
144
145 case "$mtag" in
146 "1 $msg_none") # Use hardware default font
147 f_sysrc_set font8x8 "NO" || f_die
148 f_sysrc_set font8x14 "NO" || f_die
149 f_sysrc_set font8x16 "NO" || f_die
150 break ;;
151 "2 $msg_ibm_437") # English and others, VGA default
152 f_sysrc_set font8x8 "cp437-8x8" || f_die
--- 75 unchanged lines hidden ---
2#-
3# Copyright (c) 2012-2013 Devin Teske
4# All Rights Reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
--- 10 unchanged lines hidden (view full) ---
19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/usr.sbin/bsdconfig/console/font 251236 2013-06-01 23:58:44Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_dprintf "%s: loading includes..." "$0"
34f_include $BSDCFG_SHARE/dialog.subr
35f_include $BSDCFG_SHARE/mustberoot.subr
--- 54 unchanged lines hidden (view full) ---
90 iso02-8x8) defaultitem="9 $msg_iso_8859_2";;
91 iso04-8x8) defaultitem="a $msg_iso_8859_4";;
92 iso07-8x8) defaultitem="b $msg_iso_8859_7";;
93 iso08-8x8) defaultitem="c $msg_iso_8859_8";;
94 iso15-8x8) defaultitem="d $msg_iso_8859_15";;
95 swiss-8x8) defaultitem="e $msg_swiss";;
96 esac
97
98 local menu_choice
99 menu_choice=$( eval $DIALOG \
100 --title \"\$DIALOG_TITLE\" \
101 --backtitle \"\$DIALOG_BACKTITLE\" \
102 --hline \"\$hline\" \
103 --ok-label \"\$msg_ok\" \
104 --cancel-label \"\$msg_cancel\" \
105 --default-item \"\$defaultitem\" \
106 --menu \"\$prompt\" \
107 $height $width $rows \
108 $menu_list \
109 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
110 )
111 local retval=$?
112 f_dialog_menutag_store -s "$menu_choice"
113 return $retval
114}
115
116############################################################ MAIN
117
118# Incorporate rc-file if it exists
119[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"
120
--- 13 unchanged lines hidden (view full) ---
134f_dialog_title "$msg_system_console_font"
135f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
136f_mustberoot_init
137
138#
139# Launch application main menu
140#
141while :; do
142 dialog_menu_main || f_die
143 f_dialog_menutag_fetch mtag
144
145 case "$mtag" in
146 "1 $msg_none") # Use hardware default font
147 f_sysrc_set font8x8 "NO" || f_die
148 f_sysrc_set font8x14 "NO" || f_die
149 f_sysrc_set font8x16 "NO" || f_die
150 break ;;
151 "2 $msg_ibm_437") # English and others, VGA default
152 f_sysrc_set font8x8 "cp437-8x8" || f_die
--- 75 unchanged lines hidden ---