dialog.subr (249758) | dialog.subr (250633) |
---|---|
1if [ ! "$_DIALOG_SUBR" ]; then _DIALOG_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# | 1if [ ! "$_DIALOG_SUBR" ]; then _DIALOG_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/dialog.subr 249758 2013-04-22 06:28:45Z dteske $ | 27# $FreeBSD: head/usr.sbin/bsdconfig/share/dialog.subr 250633 2013-05-14 03:21:13Z dteske $ |
28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." dialog.subr 34f_include $BSDCFG_SHARE/strings.subr 35f_include $BSDCFG_SHARE/variable.subr --- 1490 unchanged lines hidden (view full) --- 1526 DIALOG_SELF_INITIALIZE= 1527 1528 # 1529 # Clone terminal stdout so we can redirect to it from within sub-shells 1530 # 1531 eval exec $DIALOG_TERMINAL_PASSTHRU_FD\>\&1 1532 1533 # | 28# 29############################################################ INCLUDES 30 31BSDCFG_SHARE="/usr/share/bsdconfig" 32. $BSDCFG_SHARE/common.subr || exit 1 33f_dprintf "%s: loading includes..." dialog.subr 34f_include $BSDCFG_SHARE/strings.subr 35f_include $BSDCFG_SHARE/variable.subr --- 1490 unchanged lines hidden (view full) --- 1526 DIALOG_SELF_INITIALIZE= 1527 1528 # 1529 # Clone terminal stdout so we can redirect to it from within sub-shells 1530 # 1531 eval exec $DIALOG_TERMINAL_PASSTHRU_FD\>\&1 1532 1533 # |
1534 # Add `-S' and `-X' to the list of standard arguments supported by all 1535 # 1536 case "$GETOPTS_STDARGS" in 1537 *SX*) : good ;; # already present 1538 *) GETOPTS_STDARGS="${GETOPTS_STDARGS}SX" 1539 esac 1540 1541 # |
|
1534 # Process stored command-line arguments 1535 # | 1542 # Process stored command-line arguments 1543 # |
1536 SECURE=$( set -- "$ARGV" 1537 while getopts S flag > /dev/null; do | 1544 f_dprintf "f_dialog_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \ 1545 "$ARGV" "$GETOPTS_STDARGS" 1546 SECURE=$( set -- $ARGV 1547 while getopts "$GETOPTS_STDARGS" flag > /dev/null; do |
1538 case "$flag" in 1539 S) echo 1;; 1540 \?) continue;; 1541 esac 1542 done 1543 ) | 1548 case "$flag" in 1549 S) echo 1;; 1550 \?) continue;; 1551 esac 1552 done 1553 ) |
1544 USE_XDIALOG=$( set -- "$ARGV" 1545 while getopts SX flag > /dev/null; do | 1554 USE_XDIALOG=$( set -- $ARGV 1555 while getopts $GETOPTS_STDARGS flag > /dev/null; do |
1546 case "$flag" in 1547 S|X) echo 1;; 1548 \?) continue;; 1549 esac 1550 done 1551 ) | 1556 case "$flag" in 1557 S|X) echo 1;; 1558 \?) continue;; 1559 esac 1560 done 1561 ) |
1562 f_dprintf "f_dialog_init: SECURE=[%s] USE_XDIALOG=[%s]" \ 1563 "$SECURE" "$USE_XDIALOG" |
|
1552 1553 # 1554 # Process `-X' command-line option 1555 # 1556 [ "$USE_XDIALOG" ] && DIALOG=Xdialog 1557 1558 # 1559 # Sanity check, or die gracefully --- 93 unchanged lines hidden --- | 1564 1565 # 1566 # Process `-X' command-line option 1567 # 1568 [ "$USE_XDIALOG" ] && DIALOG=Xdialog 1569 1570 # 1571 # Sanity check, or die gracefully --- 93 unchanged lines hidden --- |