type (251914) | type (251915) |
---|---|
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# | 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/mouse/type 251914 2013-06-18 09:05:08Z dteske $ | 27# $FreeBSD: head/usr.sbin/bsdconfig/mouse/type 251915 2013-06-18 09:19:59Z 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 --- 88 unchanged lines hidden (view full) --- 124# 125f_dialog_title "$msg_select_a_protocol_type_for_your_mouse" 126f_dialog_backtitle "${ipgm:+bsdconfig }$pgm" 127f_mustberoot_init 128 129# 130# Launch application main menu 131# | 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 --- 88 unchanged lines hidden (view full) --- 124# 125f_dialog_title "$msg_select_a_protocol_type_for_your_mouse" 126f_dialog_backtitle "${ipgm:+bsdconfig }$pgm" 127f_mustberoot_init 128 129# 130# Launch application main menu 131# |
132while :; do 133 dialog_menu_main || f_die 134 f_dialog_menutag_fetch mtag | 132dialog_menu_main || f_die 133f_dialog_menutag_fetch mtag |
135 | 134 |
136 case "$mtag" in 137 "1 $msg_auto") # Bus mouse, PS/2 style mouse or PnP serial mouse 138 f_sysrc_set moused_type "auto" || f_die 139 break ;; 140 "2 $msg_glidepoint") # ALPS GlidePoint pad (serial) 141 f_sysrc_set moused_type "glidepoint" || f_die 142 break ;; 143 "3 $msg_hitachi") # Hitachi tablet (serial) 144 f_sysrc_set moused_type "mmhittab" || f_die 145 break ;; 146 "4 $msg_intellimouse") # Microsoft Intellimouse (serial) 147 f_sysrc_set moused_type "intellimouse" || f_die 148 break ;; 149 "5 $msg_logitech") # Logitech protocol (old models) (serial) 150 f_sysrc_set moused_type "logitech" || f_die 151 break ;; 152 "6 $msg_microsoft") # Microsoft protocol (serial) 153 f_sysrc_set moused_type "microsoft" || f_die 154 break ;; 155 "7 $msg_mm_series") # MM Series protocol (serial) 156 f_sysrc_set moused_type "mmseries" || f_die 157 break ;; 158 "8 $msg_mouseman") # Logitech MouseMan/TrackMan models (serial) 159 f_sysrc_set moused_type "mouseman" || f_die 160 break ;; 161 "9 $msg_mousesystems") # MouseSystems protocol (serial) 162 f_sysrc_set moused_type "mousesystems" || f_die 163 break ;; 164 "A $msg_thinkingmouse") # Kensignton ThinkingMouse (serial) 165 f_sysrc_set moused_type "thinkingmouse" || f_die 166 break ;; 167 esac 168done | 135moused_type_to_set= 136case "$mtag" in 137"1 $msg_auto") # Bus mouse, PS/2 style mouse or PnP serial mouse 138 moused_type_to_set="auto" ;; 139"2 $msg_glidepoint") # ALPS GlidePoint pad (serial) 140 moused_type_to_set="glidepoint" ;; 141"3 $msg_hitachi") # Hitachi tablet (serial) 142 moused_type_to_set="mmhittab" ;; 143"4 $msg_intellimouse") # Microsoft Intellimouse (serial) 144 moused_type_to_set="intellimouse" ;; 145"5 $msg_logitech") # Logitech protocol (old models) (serial) 146 moused_type_to_set="logitech" ;; 147"6 $msg_microsoft") # Microsoft protocol (serial) 148 moused_type_to_set="microsoft" ;; 149"7 $msg_mm_series") # MM Series protocol (serial) 150 moused_type_to_set="mmseries" ;; 151"8 $msg_mouseman") # Logitech MouseMan/TrackMan models (serial) 152 moused_type_to_set="mouseman" ;; 153"9 $msg_mousesystems") # MouseSystems protocol (serial) 154 moused_type_to_set="mousesystems" ;; 155"A $msg_thinkingmouse") # Kensignton ThinkingMouse (serial) 156 moused_type_to_set="thinkingmouse" ;; 157esac |
169 | 158 |
159if [ "$moused_type_to_set" ]; then 160 f_sysrc_set moused_type "$moused_type_to_set" || f_die 161else 162 f_die 1 "$msg_unknown_mouse_protocol_selection" 163fi 164 |
|
170exit $SUCCESS 171 172################################################################################ 173# END 174################################################################################ | 165exit $SUCCESS 166 167################################################################################ 168# END 169################################################################################ |