From owner-svn-src-head@FreeBSD.ORG Thu Jun 20 05:42:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A0342D7A; Thu, 20 Jun 2013 05:42:21 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9176E1AD0; Thu, 20 Jun 2013 05:42:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5K5gL96030986; Thu, 20 Jun 2013 05:42:21 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5K5gLjP030985; Thu, 20 Jun 2013 05:42:21 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201306200542.r5K5gLjP030985@svn.freebsd.org> From: Devin Teske Date: Thu, 20 Jun 2013 05:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252018 - head/usr.sbin/bsdconfig/startup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 05:42:21 -0000 Author: dteske Date: Thu Jun 20 05:42:21 2013 New Revision: 252018 URL: http://svnweb.freebsd.org/changeset/base/252018 Log: Remove pedanticism and consolidate some logic. Modified: head/usr.sbin/bsdconfig/startup/rcdelete Modified: head/usr.sbin/bsdconfig/startup/rcdelete ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcdelete Thu Jun 20 05:40:11 2013 (r252017) +++ head/usr.sbin/bsdconfig/startup/rcdelete Thu Jun 20 05:42:21 2013 (r252018) @@ -367,19 +367,16 @@ while :; do [ "$( eval echo \$_${var}_delete )" ] || continue delete_vars="$delete_vars${delete_vars:+ }$var" done - unset var # no longer needed if dialog_menu_confirm_delete $delete_vars; then f_dialog_title "$msg_info" f_dialog_info "$msg_deleting_selected_directives" f_dialog_title_restore for var in $delete_vars; do - err=$( f_sysrc_delete $var 2>&1 ) - if [ $? -ne $SUCCESS ]; then + if ! err=$( f_sysrc_delete $var 2>&1 ); then f_dialog_msgbox "$err\n" break fi done - unset var # no longer needed dialog_create_main fi ;; @@ -388,7 +385,6 @@ while :; do setvar _${var}_delete 1 export _${var}_delete done - unset var # no longer needed ;; "> $msg_none") var_list=$( set | awk -F= " @@ -398,7 +394,6 @@ while :; do }" ) [ "$var_list" ] && unset $var_list - unset var_list # no longer needed ;; *) # Anything else is a variable to edit var="${mtag# }" @@ -410,7 +405,6 @@ while :; do setvar _${var}_delete 1 export _${var}_delete fi - unset var # no longer needed esac done