diff options
author | dteske <dteske@FreeBSD.org> | 2012-09-21 01:36:20 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2012-09-21 01:36:20 +0000 |
commit | 36137540d6046459e5a8f5403fe04c12101b75df (patch) | |
tree | 64908c3644f93810ed9501a5e081ad2a98852d45 /usr.sbin/bsdconfig/share/mustberoot.subr | |
parent | f628c47944e7370c8d8c16cdcc6f98871a48be02 (diff) | |
download | FreeBSD-src-36137540d6046459e5a8f5403fe04c12101b75df.zip FreeBSD-src-36137540d6046459e5a8f5403fe04c12101b75df.tar.gz |
Replace redirections to /dev/null with "close file-descriptor" syntax (>&-).
Reviewed by: adrian (co-mentor)
Approved by: adrian (co-mentor)
Diffstat (limited to 'usr.sbin/bsdconfig/share/mustberoot.subr')
-rw-r--r-- | usr.sbin/bsdconfig/share/mustberoot.subr | 12 |
1 files changed, 6 insertions, 6 deletions
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 <<EOS sudo -k - sudo -S -v 2> /dev/null <<EOP + sudo -S -v 2>&- <<EOP $password EOP EOS |