summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/console/saver
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bsdconfig/console/saver')
-rwxr-xr-xusr.sbin/bsdconfig/console/saver31
1 files changed, 4 insertions, 27 deletions
diff --git a/usr.sbin/bsdconfig/console/saver b/usr.sbin/bsdconfig/console/saver
index 5313265..4f6729b 100755
--- a/usr.sbin/bsdconfig/console/saver
+++ b/usr.sbin/bsdconfig/console/saver
@@ -30,6 +30,7 @@
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
@@ -110,7 +111,6 @@ shift $(( $OPTIND - 1 ))
#
# Initialize
#
-f_dialog_init
f_dialog_title "$msg_system_console_screen_saver"
f_dialog_backtitle "${ipgm:+bsdconfig }$pgm"
f_mustberoot_init
@@ -167,33 +167,10 @@ while :; do
break ;;
"$msg_timeout") # Set the screen saver timeout interval
f_dialog_title "$msg_value_required"
- title="$DIALOG_TITLE"
- btitle="$DIALOG_BACKTITLE"
+ blanktime=$( f_dialog_input "$msg_enter_timeout_period" \
+ "$( f_sysrc_get blanktime )"
+ ) && f_sysrc_set blanktime "$blanktime"
f_dialog_title_restore
- prompt="$msg_enter_timeout_period"
- blanktime=$( f_sysrc_get blanktime )
- hline=""
- size=$( f_dialog_inputbox_size \
- "$title" \
- "$btitle" \
- "$prompt" \
- "$blanktime" \
- "$hline" )
- dialog_inputbox=$( $DIALOG \
- --title "$title" \
- --backtitle "$btitle" \
- --hline "$hline" \
- --ok-label "$msg_ok" \
- --cancel-label "$msg_cancel" \
- --inputbox "$prompt" $size \
- "$blanktime" \
- 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
- )
- retval=$?
- setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
- blanktime=$( f_dialog_inputstr )
- [ $retval -eq $SUCCESS ] &&
- f_sysrc_set blanktime "$blanktime"
;;
esac
done
OpenPOWER on IntegriCloud