1#!/bin/sh
2#-
3# Copyright (c) 2012 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/flags 240684 2012-09-18 22:28:42Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_include $BSDCFG_SHARE/dialog.subr
34f_include $BSDCFG_SHARE/mustberoot.subr
35f_include $BSDCFG_SHARE/sysrc.subr
--- 49 unchanged lines hidden (view full) ---
85hline=
86prompt="$msg_please_specify_the_mouse_daemon_flags"
87size=$( f_dialog_inputbox_size \
88 "$title" \
89 "$btitle" \
90 "$prompt" \
91 "$flags" \
92 "$hline" )
93eval $DIALOG \
94 --title \"\$title\" \
95 --backtitle \"\$btitle\" \
96 --hline \"\$hline\" \
97 --ok-label \"\$msg_ok\" \
98 --cancel-label \"\$msg_cancel\" \
99 --inputbox \"\$prompt\" $size \
100 \"\$flags\" \
101 2> "$DIALOG_TMPDIR/dialog.inputbox.$$"
102retval=$?
103flags=$( f_dialog_inputstr )
104
105[ $retval -eq $SUCCESS ] || f_die
106
107#
108# Save the new value
109#
110f_sysrc_set moused_flags "$flags" || f_die
111
112exit $SUCCESS
113
114################################################################################
115# END
116################################################################################
2#-
3# Copyright (c) 2012 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/flags 240684 2012-09-18 22:28:42Z dteske $
28#
29############################################################ INCLUDES
30
31BSDCFG_SHARE="/usr/share/bsdconfig"
32. $BSDCFG_SHARE/common.subr || exit 1
33f_include $BSDCFG_SHARE/dialog.subr
34f_include $BSDCFG_SHARE/mustberoot.subr
35f_include $BSDCFG_SHARE/sysrc.subr
--- 49 unchanged lines hidden (view full) ---
85hline=
86prompt="$msg_please_specify_the_mouse_daemon_flags"
87size=$( f_dialog_inputbox_size \
88 "$title" \
89 "$btitle" \
90 "$prompt" \
91 "$flags" \
92 "$hline" )
93eval $DIALOG \
94 --title \"\$title\" \
95 --backtitle \"\$btitle\" \
96 --hline \"\$hline\" \
97 --ok-label \"\$msg_ok\" \
98 --cancel-label \"\$msg_cancel\" \
99 --inputbox \"\$prompt\" $size \
100 \"\$flags\" \
101 2> "$DIALOG_TMPDIR/dialog.inputbox.$$"
102retval=$?
103flags=$( f_dialog_inputstr )
104
105[ $retval -eq $SUCCESS ] || f_die
106
107#
108# Save the new value
109#
110f_sysrc_set moused_flags "$flags" || f_die
111
112exit $SUCCESS
113
114################################################################################
115# END
116################################################################################