diff options
author | dteske <dteske@FreeBSD.org> | 2013-06-20 05:42:21 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-06-20 05:42:21 +0000 |
commit | 8fb422656d21d27cca45cc9aa25bf8bb8a0ea2ea (patch) | |
tree | d52fcec21841536173a110f829337cef00a7ad9d /usr.sbin | |
parent | 511962e1869752447b5cb714350f152a91400130 (diff) | |
download | FreeBSD-src-8fb422656d21d27cca45cc9aa25bf8bb8a0ea2ea.zip FreeBSD-src-8fb422656d21d27cca45cc9aa25bf8bb8a0ea2ea.tar.gz |
Remove pedanticism and consolidate some logic.
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/bsdconfig/startup/rcdelete | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/usr.sbin/bsdconfig/startup/rcdelete b/usr.sbin/bsdconfig/startup/rcdelete index 008cfff..29beb50 100755 --- a/usr.sbin/bsdconfig/startup/rcdelete +++ b/usr.sbin/bsdconfig/startup/rcdelete @@ -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 |