head	1.19;
access;
symbols
	RELENG_9:1.17.0.2;
locks; strict;
comment	@# @;


1.19
date	2013.07.08.00.33.55;	author svnexp;	state Exp;
branches;
next	1.18;

1.18
date	2013.07.08.00.32.27;	author svnexp;	state Exp;
branches;
next	1.17;

1.17
date	2013.06.25.00.35.22;	author svnexp;	state Exp;
branches
	1.17.2.1;
next	1.16;

1.16
date	2013.06.19.00.35.38;	author svnexp;	state Exp;
branches;
next	1.15;

1.15
date	2013.06.19.00.33.28;	author svnexp;	state Exp;
branches;
next	1.14;

1.14
date	2013.06.19.00.32.44;	author svnexp;	state Exp;
branches;
next	1.13;

1.13
date	2013.06.03.00.43.28;	author svnexp;	state Exp;
branches;
next	1.12;

1.12
date	2013.06.02.00.37.30;	author svnexp;	state Exp;
branches;
next	1.11;

1.11
date	2013.06.01.00.35.21;	author svnexp;	state Exp;
branches;
next	1.10;

1.10
date	2013.05.15.00.26.05;	author svnexp;	state Exp;
branches;
next	1.9;

1.9
date	2013.04.23.00.30.01;	author svnexp;	state Exp;
branches;
next	1.8;

1.8
date	2013.04.23.00.27.07;	author svnexp;	state Exp;
branches;
next	1.7;

1.7
date	2012.12.25.11.03.38;	author svnexp;	state Exp;
branches;
next	1.6;

1.6
date	2012.12.25.09.37.00;	author svnexp;	state Exp;
branches;
next	1.5;

1.5
date	2012.11.17.04.41.47;	author svnexp;	state Exp;
branches;
next	1.4;

1.4
date	2012.11.17.01.54.38;	author svnexp;	state Exp;
branches;
next	1.3;

1.3
date	2012.09.20.23.44.13;	author dteske;	state Exp;
branches;
next	1.2;

1.2
date	2012.09.18.22.28.42;	author dteske;	state Exp;
branches;
next	1.1;

1.1
date	2012.07.14.03.16.57;	author dteske;	state Exp;
branches;
next	;

1.17.2.1
date	2013.06.25.00.35.22;	author svnexp;	state dead;
branches;
next	1.17.2.2;

1.17.2.2
date	2013.07.07.20.03.17;	author svnexp;	state Exp;
branches;
next	1.17.2.3;

1.17.2.3
date	2014.03.27.04.02.36;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.19
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/252987
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@#!/bin/sh
#-
# Copyright (c) 2012-2013 Devin Teske
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 252987 2013-07-07 18:51:44Z dteske $
#
############################################################ INCLUDES

BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr

BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr

ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"

############################################################ FUNCTIONS

# dialog_menu_main
#
# Display the dialog(1)-based application main menu.
#
dialog_menu_main()
{
	local prompt="$msg_font_menu_text"
	local menu_list="
		'1 $msg_none'        '$msg_use_hardware_default_font'
		'2 $msg_ibm_437'     '$msg_ibm_437_desc'
		'3 $msg_ibm_850'     '$msg_ibm_850_desc'
		'4 $msg_ibm_865'     '$msg_ibm_865_desc'
		'5 $msg_ibm_866'     '$msg_ibm_866_desc'
		'6 $msg_ibm_866u'    '$msg_ibm_866u_desc'
		'7 $msg_ibm_1251'    '$msg_ibm_1251_desc'
		'8 $msg_iso_8859_1'  '$msg_iso_8859_1_desc'
		'9 $msg_iso_8859_2'  '$msg_iso_8859_2_desc'
		'a $msg_iso_8859_4'  '$msg_iso_8859_4_desc'
		'b $msg_iso_8859_7'  '$msg_iso_8859_7_desc'
		'c $msg_iso_8859_8'  '$msg_iso_8859_8_desc'
		'd $msg_iso_8859_15' '$msg_iso_8859_15_desc'
		'e $msg_swiss'       '$msg_swiss_desc'
	" # END-QUOTE
	local defaultitem= # Calculated below
	local hline="$hline_choose_a_font"

	local height width rows
	eval f_dialog_menu_size height width rows \
	                        \"\$DIALOG_TITLE\"     \
	                        \"\$DIALOG_BACKTITLE\" \
	                        \"\$prompt\"           \
	                        \"\$hline\"            \
	                        $menu_list

	case "$( f_sysrc_get font8x8 )" in
	[Nn][Oo]|'') defaultitem="1 $msg_none"        ;;
	cp437-8x8)   defaultitem="2 $msg_ibm_437"     ;;
	cp850-8x8)   defaultitem="3 $msg_ibm_850"     ;;
	cp865-8x8)   defaultitem="4 $msg_ibm_865"     ;;
	cp866-8x8)   defaultitem="5 $msg_ibm_866"     ;;
	cp866u-8x8)  defaultitem="6 $msg_ibm_866u"    ;;
	cp1251-8x8)  defaultitem="7 $msg_ibm_1251"    ;;
	iso-8x8)     defaultitem="8 $msg_iso_8859_1"  ;;
	iso02-8x8)   defaultitem="9 $msg_iso_8859_2"  ;;
	iso04-8x8)   defaultitem="a $msg_iso_8859_4"  ;;
	iso07-8x8)   defaultitem="b $msg_iso_8859_7"  ;;
	iso08-8x8)   defaultitem="c $msg_iso_8859_8"  ;;
	iso15-8x8)   defaultitem="d $msg_iso_8859_15" ;;
	swiss-8x8)   defaultitem="e $msg_swiss"       ;;
	esac

	local menu_choice
	menu_choice=$( eval $DIALOG \
		--title \"\$DIALOG_TITLE\"         \
		--backtitle \"\$DIALOG_BACKTITLE\" \
		--hline \"\$hline\"                \
		--ok-label \"\$msg_ok\"            \
		--cancel-label \"\$msg_cancel\"    \
		--default-item \"\$defaultitem\"   \
		--menu \"\$prompt\"                \
		$height $width $rows               \
		$menu_list                         \
		2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
	)
	local retval=$?
	f_dialog_menutag_store -s "$menu_choice"
	return $retval
}

############################################################ MAIN

# Incorporate rc-file if it exists
[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"

#
# Process command-line arguments
#
while getopts h$GETOPTS_STDARGS flag; do
	case "$flag" in
	h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;;
	esac
done
shift $(( $OPTIND - 1 ))

#
# Initialize
#
f_dialog_title "$msg_system_console_font"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init

#
# Launch application main menu
#
dialog_menu_main || f_die
f_dialog_menutag_fetch mtag

f8= f14= f16= mc_start=
case "$mtag" in
"1 $msg_none") # Use hardware default font
	f8="NO" f14="NO" f16="NO" ;;
"2 $msg_ibm_437") # English and others, VGA default
	f8="cp437-8x8" f14="cp437-8x14" f16="cp437-8x16" ;;
"3 $msg_ibm_850") # Western Europe, IBM encoding
	f8="cp850-8x8" f14="cp850-8x14" f16="cp850-8x16" ;;
"4 $msg_ibm_865") # Norwegian, IBM encoding
	f8="cp865-8x8" f14="cp865-8x14" f16="cp865-8x16" ;;
"5 $msg_ibm_866") # Russian, IBM encoding (use with KOI8-R screenmap)
	f8="cp866-8x8" f14="cp866-8x14" f16="cp866b-8x16" mc_start="3" ;;
"6 $msg_ibm_866u") # Ukrainian, IBM encoding (use w/ KOI8-U screenmap)
	f8="cp866u-8x8" f14="cp866u-8x14" f16="cp866u-8x16" mc_start="3" ;;
"7 $msg_ibm_1251") # Cyrillic, MS Windows encoding
	f8="cp1251-8x8" f14="cp1251-8x14" f16="cp1251-8x16" mc_start="3" ;;
"8 $msg_iso_8859_1") # Western Europe, ISO encoding
	f8="iso-8x8" f14="iso-8x14" f16="iso-8x16" ;;
"9 $msg_iso_8859_2") # Eastern Europe, ISO encoding
	f8="iso02-8x8" f14="iso02-8x14" f16="iso02-8x16" ;;
"a $msg_iso_8859_4") # Baltic, ISO encoding
	f8="iso04-8x8" f14="iso04-8x14" f16="iso04-8x16" ;;
"b $msg_iso_8859_7") # Greek, ISO encoding
	f8="iso07-8x8" f14="iso07-8x14" f16="iso07-8x16" ;;
"c $msg_iso_8859_8") # Hebrew, ISO encoding
	f8="iso08-8x8" f14="iso08-8x14" f16="iso08-8x16" ;;
"d $msg_iso_8859_15") # Europe, ISO encoding
	f8="iso15-8x8" f14="iso15-8x14" f16="iso15-8x16" ;;
"e $msg_swiss") # English, better resolution
	f8="swiss-8x8" f14="NO" f16="swiss-8x16" ;;
esac

[ "$f8" -a "$f14" -a "$f16" ] || f_die 1 "$msg_unknown_font_selection"

f_sysrc_set font8x8 "$f8" || f_die
f_sysrc_set font8x14 "$f14" || f_die
f_sysrc_set font8x16 "$f16" || f_die

if [ "$mc_start" ]; then
	f_sysrc_set mousechar_start "$mc_start" || f_die
else
	f_sysrc_delete mousechar_start || f_die
fi

exit $SUCCESS

################################################################################
# END
################################################################################
@


1.18
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/252980
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d16 1
a16 1
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE
d20 1
a20 1
# DAMAGES (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 252980 2013-07-07 18:21:30Z dteske $
@


1.17
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/252178
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d4 1
a4 1
# All Rights Reserved.
d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 252178 2013-06-24 20:58:54Z dteske $
@


1.17.2.1
log
@file font was added on branch RELENG_9 on 2013-07-07 20:03:17 +0000
@
text
@d1 191
@


1.17.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/252995
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 191
#!/bin/sh
#-
# Copyright (c) 2012-2013 Devin Teske
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD: stable/9/usr.sbin/bsdconfig/console/font 252995 2013-07-07 19:13:34Z dteske $
#
############################################################ INCLUDES

BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
f_dprintf "%s: loading includes..." "$0"
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/mustberoot.subr
f_include $BSDCFG_SHARE/sysrc.subr

BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="080.console"
f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr

ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm"

############################################################ FUNCTIONS

# dialog_menu_main
#
# Display the dialog(1)-based application main menu.
#
dialog_menu_main()
{
	local prompt="$msg_font_menu_text"
	local menu_list="
		'1 $msg_none'        '$msg_use_hardware_default_font'
		'2 $msg_ibm_437'     '$msg_ibm_437_desc'
		'3 $msg_ibm_850'     '$msg_ibm_850_desc'
		'4 $msg_ibm_865'     '$msg_ibm_865_desc'
		'5 $msg_ibm_866'     '$msg_ibm_866_desc'
		'6 $msg_ibm_866u'    '$msg_ibm_866u_desc'
		'7 $msg_ibm_1251'    '$msg_ibm_1251_desc'
		'8 $msg_iso_8859_1'  '$msg_iso_8859_1_desc'
		'9 $msg_iso_8859_2'  '$msg_iso_8859_2_desc'
		'a $msg_iso_8859_4'  '$msg_iso_8859_4_desc'
		'b $msg_iso_8859_7'  '$msg_iso_8859_7_desc'
		'c $msg_iso_8859_8'  '$msg_iso_8859_8_desc'
		'd $msg_iso_8859_15' '$msg_iso_8859_15_desc'
		'e $msg_swiss'       '$msg_swiss_desc'
	" # END-QUOTE
	local defaultitem= # Calculated below
	local hline="$hline_choose_a_font"

	local height width rows
	eval f_dialog_menu_size height width rows \
	                        \"\$DIALOG_TITLE\"     \
	                        \"\$DIALOG_BACKTITLE\" \
	                        \"\$prompt\"           \
	                        \"\$hline\"            \
	                        $menu_list

	case "$( f_sysrc_get font8x8 )" in
	[Nn][Oo]|'') defaultitem="1 $msg_none"        ;;
	cp437-8x8)   defaultitem="2 $msg_ibm_437"     ;;
	cp850-8x8)   defaultitem="3 $msg_ibm_850"     ;;
	cp865-8x8)   defaultitem="4 $msg_ibm_865"     ;;
	cp866-8x8)   defaultitem="5 $msg_ibm_866"     ;;
	cp866u-8x8)  defaultitem="6 $msg_ibm_866u"    ;;
	cp1251-8x8)  defaultitem="7 $msg_ibm_1251"    ;;
	iso-8x8)     defaultitem="8 $msg_iso_8859_1"  ;;
	iso02-8x8)   defaultitem="9 $msg_iso_8859_2"  ;;
	iso04-8x8)   defaultitem="a $msg_iso_8859_4"  ;;
	iso07-8x8)   defaultitem="b $msg_iso_8859_7"  ;;
	iso08-8x8)   defaultitem="c $msg_iso_8859_8"  ;;
	iso15-8x8)   defaultitem="d $msg_iso_8859_15" ;;
	swiss-8x8)   defaultitem="e $msg_swiss"       ;;
	esac

	local menu_choice
	menu_choice=$( eval $DIALOG \
		--title \"\$DIALOG_TITLE\"         \
		--backtitle \"\$DIALOG_BACKTITLE\" \
		--hline \"\$hline\"                \
		--ok-label \"\$msg_ok\"            \
		--cancel-label \"\$msg_cancel\"    \
		--default-item \"\$defaultitem\"   \
		--menu \"\$prompt\"                \
		$height $width $rows               \
		$menu_list                         \
		2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
	)
	local retval=$?
	f_dialog_menutag_store -s "$menu_choice"
	return $retval
}

############################################################ MAIN

# Incorporate rc-file if it exists
[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc"

#
# Process command-line arguments
#
while getopts h$GETOPTS_STDARGS flag; do
	case "$flag" in
	h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;;
	esac
done
shift $(( $OPTIND - 1 ))

#
# Initialize
#
f_dialog_title "$msg_system_console_font"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init

#
# Launch application main menu
#
dialog_menu_main || f_die
f_dialog_menutag_fetch mtag

f8= f14= f16= mc_start=
case "$mtag" in
"1 $msg_none") # Use hardware default font
	f8="NO" f14="NO" f16="NO" ;;
"2 $msg_ibm_437") # English and others, VGA default
	f8="cp437-8x8" f14="cp437-8x14" f16="cp437-8x16" ;;
"3 $msg_ibm_850") # Western Europe, IBM encoding
	f8="cp850-8x8" f14="cp850-8x14" f16="cp850-8x16" ;;
"4 $msg_ibm_865") # Norwegian, IBM encoding
	f8="cp865-8x8" f14="cp865-8x14" f16="cp865-8x16" ;;
"5 $msg_ibm_866") # Russian, IBM encoding (use with KOI8-R screenmap)
	f8="cp866-8x8" f14="cp866-8x14" f16="cp866b-8x16" mc_start="3" ;;
"6 $msg_ibm_866u") # Ukrainian, IBM encoding (use w/ KOI8-U screenmap)
	f8="cp866u-8x8" f14="cp866u-8x14" f16="cp866u-8x16" mc_start="3" ;;
"7 $msg_ibm_1251") # Cyrillic, MS Windows encoding
	f8="cp1251-8x8" f14="cp1251-8x14" f16="cp1251-8x16" mc_start="3" ;;
"8 $msg_iso_8859_1") # Western Europe, ISO encoding
	f8="iso-8x8" f14="iso-8x14" f16="iso-8x16" ;;
"9 $msg_iso_8859_2") # Eastern Europe, ISO encoding
	f8="iso02-8x8" f14="iso02-8x14" f16="iso02-8x16" ;;
"a $msg_iso_8859_4") # Baltic, ISO encoding
	f8="iso04-8x8" f14="iso04-8x14" f16="iso04-8x16" ;;
"b $msg_iso_8859_7") # Greek, ISO encoding
	f8="iso07-8x8" f14="iso07-8x14" f16="iso07-8x16" ;;
"c $msg_iso_8859_8") # Hebrew, ISO encoding
	f8="iso08-8x8" f14="iso08-8x14" f16="iso08-8x16" ;;
"d $msg_iso_8859_15") # Europe, ISO encoding
	f8="iso15-8x8" f14="iso15-8x14" f16="iso15-8x16" ;;
"e $msg_swiss") # English, better resolution
	f8="swiss-8x8" f14="NO" f16="swiss-8x16" ;;
esac

[ "$f8" -a "$f14" -a "$f16" ] || f_die 1 "$msg_unknown_font_selection"

f_sysrc_set font8x8 "$f8" || f_die
f_sysrc_set font8x14 "$f14" || f_die
f_sysrc_set font8x16 "$f16" || f_die

if [ "$mc_start" ]; then
	f_sysrc_set mousechar_start "$mc_start" || f_die
else
	f_sysrc_delete mousechar_start || f_die
fi

exit $SUCCESS

################################################################################
# END
################################################################################
@


1.17.2.3
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/263791
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: stable/9/usr.sbin/bsdconfig/console/font 263791 2014-03-27 03:20:47Z dteske $
d41 2
a42 2
f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm &&
	pgm="${ipgm:-$pgm}"
d177 3
a179 3
f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x8 "%s"' "$f8" || f_die
f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x14 "%s"' "$f14" || f_die
f_eval_catch "$0" f_sysrc_set 'f_sysrc_set font8x16 "%s"' "$f16" || f_die
d182 1
a182 2
	f_eval_catch "$0" f_sysrc_set \
		'f_sysrc_set mousechar_start "%s"' "$mc_start" || f_die
d184 1
a184 2
	f_eval_catch "$0" f_sysrc_delete \
		'f_sysrc_delete mousechar_start' || f_die
@


1.16
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251907
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 251907 2013-06-18 08:22:51Z dteske $
d125 1
a125 1
	h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm";;
@


1.15
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251905
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 251905 2013-06-18 07:36:09Z dteske $
d175 1
a175 1
[ "$f8" -a "$f14" -a "$f16" ] || f_die "$msg_unknown_font_selection"
@


1.14
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251904
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 251904 2013-06-18 07:33:45Z dteske $
d140 46
a185 80
while :; do
	dialog_menu_main || f_die
	f_dialog_menutag_fetch mtag

	case "$mtag" in
	"1 $msg_none") # Use hardware default font
		f_sysrc_set font8x8 "NO" || f_die
		f_sysrc_set font8x14 "NO" || f_die
		f_sysrc_set font8x16 "NO" || f_die
		break ;;
	"2 $msg_ibm_437") # English and others, VGA default
		f_sysrc_set font8x8 "cp437-8x8" || f_die
		f_sysrc_set font8x14 "cp437-8x14" || f_die
		f_sysrc_set font8x16 "cp437-8x16" || f_die
		break ;;
	"3 $msg_ibm_850") # Western Europe, IBM encoding
		f_sysrc_set font8x8 "cp850-8x8" || f_die
		f_sysrc_set font8x14 "cp850-8x14" || f_die
		f_sysrc_set font8x16 "cp850-8x16" || f_die
		break ;;
	"4 $msg_ibm_865") # Norwegian, IBM encoding
		f_sysrc_set font8x8 "cp865-8x8" || f_die
		f_sysrc_set font8x14 "cp865-8x14" || f_die
		f_sysrc_set font8x16 "cp865-8x16" || f_die
		break ;;
	"5 $msg_ibm_866") # Russian, IBM encoding (use with KOI8-R screenmap)
		f_sysrc_set font8x8 "cp866-8x8" || f_die
		f_sysrc_set font8x14 "cp866-8x14" || f_die
		f_sysrc_set font8x16 "cp866b-8x16" || f_die
		f_sysrc_set mousechar_start 3 || f_die
		break ;;
	"6 $msg_ibm_866u") # Ukrainian, IBM encoding (use w/ KOI8-U screenmap)
		f_sysrc_set font8x8 "cp866u-8x8" || f_die
		f_sysrc_set font8x14 "cp866u-8x14" || f_die
		f_sysrc_set font8x16 "cp866u-8x16" || f_die
		f_sysrc_set mousechar_start 3 || f_die
		break ;;
	"7 $msg_ibm_1251") # Cyrillic, MS Windows encoding
		f_sysrc_set font8x8 "cp1251-8x8" || f_die
		f_sysrc_set font8x14 "cp1251-8x14" || f_die
		f_sysrc_set font8x16 "cp1251-8x16" || f_die
		f_sysrc_set mousechar_start 3 || f_die
		break ;;
	"8 $msg_iso_8859_1") # Western Europe, ISO encoding
		f_sysrc_set font8x8 "iso-8x8" || f_die
		f_sysrc_set font8x14 "iso-8x14" || f_die
		f_sysrc_set font8x16 "iso-8x16" || f_die
		break ;;
	"9 $msg_iso_8859_2") # Eastern Europe, ISO encoding
		f_sysrc_set font8x8 "iso02-8x8" || f_die
		f_sysrc_set font8x14 "iso02-8x14" || f_die
		f_sysrc_set font8x16 "iso02-8x16" || f_die
		break ;;
	"a $msg_iso_8859_4") # Baltic, ISO encoding
		f_sysrc_set font8x8 "iso04-8x8" || f_die
		f_sysrc_set font8x14 "iso04-8x14" || f_die
		f_sysrc_set font8x16 "iso04-8x16" || f_die
		break ;;
	"b $msg_iso_8859_7") # Greek, ISO encoding
		f_sysrc_set font8x8 "iso07-8x8" || f_die
		f_sysrc_set font8x14 "iso07-8x14" || f_die
		f_sysrc_set font8x16 "iso07-8x16" || f_die
		break ;;
	"c $msg_iso_8859_8") # Hebrew, ISO encoding
		f_sysrc_set font8x8 "iso08-8x8" || f_die
		f_sysrc_set font8x14 "iso08-8x14" || f_die
		f_sysrc_set font8x16 "iso08-8x16" || f_die
		break ;;
	"d $msg_iso_8859_15") # Europe, ISO encoding
		f_sysrc_set font8x8 "iso15-8x8" || f_die
		f_sysrc_set font8x14 "iso15-8x14" || f_die
		f_sysrc_set font8x16 "iso15-8x16" || f_die
		break ;;
	"e $msg_swiss") # English, better resolution
		f_sysrc_set font8x8 "swiss-8x8" || f_die
		f_sysrc_set font8x14 "NO" || f_die
		f_sysrc_set font8x16 "swiss-8x16" || f_die
		break ;;
	esac
done
@


1.13
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251264
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 251264 2013-06-02 20:02:50Z dteske $
d81 14
a94 14
	[Nn][Oo]|'') defaultitem="1 $msg_none";;
	cp437-8x8) defaultitem="2 $msg_ibm_437";;
	cp850-8x8) defaultitem="3 $msg_ibm_850";;
	cp865-8x8) defaultitem="4 $msg_ibm_865";;
	cp866-8x8) defaultitem="5 $msg_ibm_866";;
	cp866u-8x8) defaultitem="6 $msg_ibm_866u";;
	cp1251-8x8) defaultitem="7 $msg_ibm_1251";;
	iso-8x8) defaultitem="8 $msg_iso_8859_1";;
	iso02-8x8) defaultitem="9 $msg_iso_8859_2";;
	iso04-8x8) defaultitem="a $msg_iso_8859_4";;
	iso07-8x8) defaultitem="b $msg_iso_8859_7";;
	iso08-8x8) defaultitem="c $msg_iso_8859_8";;
	iso15-8x8) defaultitem="d $msg_iso_8859_15";;
	swiss-8x8) defaultitem="e $msg_swiss";;
a218 1

@


1.12
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251236
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 251236 2013-06-01 23:58:44Z dteske $
a51 2
	local menu_list defaultitem=
	local hline="$hline_choose_a_font"
d53 1
a53 2

	menu_list="
d69 2
@


1.11
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251190
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 251190 2013-05-31 19:07:17Z dteske $
d98 2
a99 2
	local dialog_menu
	dialog_menu=$( eval $DIALOG \
d112 1
a112 1
	setvar DIALOG_MENU_$$ "$dialog_menu"
d142 2
a143 5
	dialog_menu_main
	retval=$?
	mtag=$( f_dialog_menutag )

	[ $retval -eq 0 ] || f_die
@


1.10
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/250633
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 250633 2013-05-14 03:21:13Z dteske $
d52 1
a52 1
	local menu_list size defaultitem=
d73 7
a79 6
	size=$( eval f_dialog_menu_size \
	        	\"\$DIALOG_TITLE\"     \
	        	\"\$DIALOG_BACKTITLE\" \
	                \"\$prompt\"           \
	        	\"\$hline\"            \
	        	$menu_list             )
d106 2
a107 1
		--menu \"\$prompt\" $size          \
@


1.9
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249751
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 249751 2013-04-22 05:52:06Z dteske $
d122 1
a122 1
while getopts dD:hSX flag; do
@


1.8
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249746
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 249746 2013-04-22 05:02:34Z dteske $
d52 1
a52 1
	local menu_list size
d80 17
d99 1
a99 1
		--clear --title \"\$DIALOG_TITLE\" \
d104 1
@


1.7
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/244675
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d3 1
a3 1
# Copyright (c) 2012 Devin Teske
d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 244675 2012-12-25 10:47:45Z dteske $
d104 1
a104 1
while getopts hSX flag; do
@


1.6
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/244674
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 244674 2012-12-25 09:30:25Z dteske $
d33 1
@


1.5
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/243112
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243112 | dteske | 2012-11-16 00:59:11 +0000 (Fri, 16 Nov 2012) | 11 lines
## SVN ##
## SVN ## Replicate a feature from sysinstall documented in
## SVN ## stable/9/usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## To get a list of modules you can link to, see `bsdconfig -h' output.
## SVN ##
## SVN ## Approved by:	adrian (co-mentor) (implicit)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 243112 2012-11-16 00:59:11Z dteske $
a112 1
f_dialog_init
@


1.4
log
@Switching exporter and resync
@
text
@d27 1
a27 1
# $FreeBSD: head/usr.sbin/bsdconfig/console/font 240768 2012-09-20 23:44:13Z dteske $
d40 1
a40 1
ipgm=$( f_index_menu_selection $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" )
@


1.3
log
@SVN rev 240768 on 2012-09-20 23:44:13Z by dteske

Change all invocations of dialog(1) to no-longer require temporary files.
This allows bsdconfig to -- like bsdinstall -- operate from read-only media.

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
@
text
@d27 1
a27 1
# $FreeBSD$
@


1.2
log
@SVN rev 240684 on 2012-09-18 22:28:42Z by dteske

Move major includes into /usr/share/bsdconfig for easy external access.

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
@
text
@d79 2
a80 1
	eval $DIALOG \
d88 5
a92 1
		2> "$DIALOG_TMPDIR/dialog.menu.$$"
@


1.1
log
@SVN rev 238438 on 2012-07-14 03:16:57Z by dteske

Import bsdconfig(8) as a replacement for the post-install abilities of
deprecated sysinstall(8). NOTE: WITH_BSDCONFIG is currently required.

Submitted by:	Devin Teske (dteske), Ron McDowell <rcm@@fuzzwad.org>
Reviewed by:	Ron McDowell <rcm@@fuzzwad.org>
Approved by:	Ed Maste (emaste)
@
text
@d31 5
a35 5
BSDCFG_LIBE="/usr/libexec/bsdconfig"
. $BSDCFG_LIBE/include/common.subr || exit 1
f_include $BSDCFG_LIBE/include/dialog.subr
f_include $BSDCFG_LIBE/include/mustberoot.subr
f_include $BSDCFG_LIBE/include/sysrc.subr
d37 1
a37 1
APP_DIR="080.console"
@

