From 538d68ea692f0550aee2edececee6f6adbf2aa73 Mon Sep 17 00:00:00 2001 From: Devin Teske Date: Sun, 2 Jun 2013 23:15:12 +0000 Subject: [PATCH] Fix a bug in which the user's choice to Cancel was not properly recognized. --- usr.sbin/bsdconfig/share/mustberoot.subr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdconfig/share/mustberoot.subr b/usr.sbin/bsdconfig/share/mustberoot.subr index a05ddc73b8be..e299fb25347e 100644 --- a/usr.sbin/bsdconfig/share/mustberoot.subr +++ b/usr.sbin/bsdconfig/share/mustberoot.subr @@ -176,8 +176,12 @@ f_become_root_via_sudo() retval=$? # Catch X11-related errors - [ $retval -eq 255 ] && + if [ $retval -eq 255 ]; then f_die $retval "$password" + elif [ $retval -ne 0 ]; then + # User cancelled + exit $retval + fi else password=$( $DIALOG \ --title "$DIALOG_TITLE" \