diff options
author | dteske <dteske@FreeBSD.org> | 2013-06-02 23:15:12 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-06-02 23:15:12 +0000 |
commit | 0d6301c0f948d2645f6a1a1b2771eb17753e99f2 (patch) | |
tree | 9999310efcd7c282c98cb607db62f7dbe8e23fd5 /usr.sbin/bsdconfig/share | |
parent | 8e41e7110ab8bc3ba2e553050365b15800fa92ba (diff) | |
download | FreeBSD-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.subr | 6 |
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" \ |