summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdconfig/share
diff options
context:
space:
mode:
authordteske <dteske@FreeBSD.org>2013-06-02 23:15:12 +0000
committerdteske <dteske@FreeBSD.org>2013-06-02 23:15:12 +0000
commit0d6301c0f948d2645f6a1a1b2771eb17753e99f2 (patch)
tree9999310efcd7c282c98cb607db62f7dbe8e23fd5 /usr.sbin/bsdconfig/share
parent8e41e7110ab8bc3ba2e553050365b15800fa92ba (diff)
downloadFreeBSD-src-0d6301c0f948d2645f6a1a1b2771eb17753e99f2.zip
FreeBSD-src-0d6301c0f948d2645f6a1a1b2771eb17753e99f2.tar.gz
Fix a bug in which the user's choice to Cancel was not properly recognized.
Diffstat (limited to 'usr.sbin/bsdconfig/share')
-rw-r--r--usr.sbin/bsdconfig/share/mustberoot.subr6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bsdconfig/share/mustberoot.subr b/usr.sbin/bsdconfig/share/mustberoot.subr
index a05ddc7..e299fb2 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" \
OpenPOWER on IntegriCloud