From 36137540d6046459e5a8f5403fe04c12101b75df Mon Sep 17 00:00:00 2001 From: dteske Date: Fri, 21 Sep 2012 01:36:20 +0000 Subject: Replace redirections to /dev/null with "close file-descriptor" syntax (>&-). Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor) --- usr.sbin/bsdconfig/share/mustberoot.subr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'usr.sbin/bsdconfig/share/mustberoot.subr') diff --git a/usr.sbin/bsdconfig/share/mustberoot.subr b/usr.sbin/bsdconfig/share/mustberoot.subr index c6514c0..234724e 100644 --- a/usr.sbin/bsdconfig/share/mustberoot.subr +++ b/usr.sbin/bsdconfig/share/mustberoot.subr @@ -85,7 +85,7 @@ f_become_root_via_sudo() # # Check sudo(8) access before prompting for password. # - :| sudo -S -v 2> /dev/null + :| sudo -S -v 2>&- if [ $? -ne $SUCCESS ]; then # # sudo(8) access denied. Prompt for their password. @@ -112,7 +112,7 @@ f_become_root_via_sudo() --ok-label "$msg_ok" \ --cancel-label "$msg_cancel" \ --password --inputbox "$msg" $size \ - 2>&1 > /dev/null ) + 2>&1 >&- ) retval=$? # Catch X11-related errors @@ -141,7 +141,7 @@ f_become_root_via_sudo() # # Validate sudo(8) credentials # - sudo -S -v 2> /dev/null <<-EOF + sudo -S -v 2>&- <<-EOF $password EOF retval=$? @@ -186,7 +186,7 @@ f_become_root_via_sudo() displaynum="${DISPLAY#*:}" xauth -f ~/.Xauthority extract - $HOSTNAME/unix:$displaynum \ $HOSTNAME:$displaynum | sudo sh -c 'xauth -ivf \ - ~root/.Xauthority merge - > /dev/null 2>&1' + ~root/.Xauthority merge - >&- 2>&-' fi # Re-execute ourselves with sudo(8) @@ -254,7 +254,7 @@ f_authenticate_some_user() $height $width \ "$field_username" "" \ "$field_password" "" \ - 2>&1 > /dev/null ) + 2>&1 >&- ) retval=$? # Catch X11-related errors @@ -302,7 +302,7 @@ f_authenticate_some_user() su -m "$user" <<-EOF sh < /dev/null <&- <