1if [ ! "$_MUSTBEROOT_SUBR" ]; then _MUSTBEROOT_SUBR=1
2#
3# Copyright (c) 2006-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/share/mustberoot.subr 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..." mustberoot.subr
34f_include $BSDCFG_SHARE/dialog.subr
35
--- 64 unchanged lines hidden (view full) ---
100 hline="$hline_arrows_tab_enter"
101 eval f_dialog_menu_size height width rows \
102 \"\$DIALOG_TITLE\" \
103 \"\$DIALOG_BACKTITLE\" \
104 \"\$msg\" \
105 \"\$hline\" \
106 $menu_list
107
108 local mtag
109 mtag=$( eval $DIALOG \
110 --title \"\$DIALOG_TITLE\" \
111 --backtitle \"\$DIALOG_BACKTITLE\" \
112 --hline \"\$hline\" \
113 --ok-label \"\$msg_ok\" \
114 --cancel-label \"\$msg_cancel\" \
115 --menu \"\$msg\" \
116 $height $width $rows \
117 $menu_list \
118 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
119 ) || f_die
120 f_dialog_data_sanitize mtag
121
122 case "$mtag" in
123 X) # Cancel/Exit
124 f_die ;;
125 1) # Always try sudo(8) when run as $user
126 local err
127 if ! err=$( touch "$checkpath" 2>&1 ); then
128 f_dialog_msgbox "$err"
129 else
--- 296 unchanged lines hidden ---
2#
3# Copyright (c) 2006-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/share/mustberoot.subr 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..." mustberoot.subr
34f_include $BSDCFG_SHARE/dialog.subr
35
--- 64 unchanged lines hidden (view full) ---
100 hline="$hline_arrows_tab_enter"
101 eval f_dialog_menu_size height width rows \
102 \"\$DIALOG_TITLE\" \
103 \"\$DIALOG_BACKTITLE\" \
104 \"\$msg\" \
105 \"\$hline\" \
106 $menu_list
107
108 local mtag
109 mtag=$( eval $DIALOG \
110 --title \"\$DIALOG_TITLE\" \
111 --backtitle \"\$DIALOG_BACKTITLE\" \
112 --hline \"\$hline\" \
113 --ok-label \"\$msg_ok\" \
114 --cancel-label \"\$msg_cancel\" \
115 --menu \"\$msg\" \
116 $height $width $rows \
117 $menu_list \
118 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
119 ) || f_die
120 f_dialog_data_sanitize mtag
121
122 case "$mtag" in
123 X) # Cancel/Exit
124 f_die ;;
125 1) # Always try sudo(8) when run as $user
126 local err
127 if ! err=$( touch "$checkpath" 2>&1 ); then
128 f_dialog_msgbox "$err"
129 else
--- 296 unchanged lines hidden ---