When installing packages on freebsd, redirect stdout and stderr to /dev/null instead of closing them.

Some pre/post-install scripts rely on them being open.

(It would be bette to leave them open and show the output, but I didn't
want to change the behaviour)
This commit is contained in:
Michal Hanula 2018-01-02 18:11:37 +01:00
parent b1d7da4258
commit c895be381f
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ execcmd(){
;;
esac
echo "$_cmd 2>&- >&-" # Silence the output of the command
echo "$_cmd >/dev/null 2>&1" # Silence the output of the command
echo "status=\$?"
echo "if [ \"\$status\" -ne \"0\" ]; then"
echo " echo \"Error: ${_cmd} exited nonzero with \$status\"'!' >&2"