diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-01-05 15:34:40 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-01-05 18:33:21 +0100 |
commit | 40bd7a625a7ce7c8fa05af29d088943be1154a44 (patch) | |
tree | 3aaf1360476faaa0c7d210d9e1be79b5357538c5 /redhat/frr.spec.in | |
parent | Merge pull request #5611 from qlyoung/fix-bgp-no-listen-docstring (diff) | |
download | frr-40bd7a625a7ce7c8fa05af29d088943be1154a44.tar.xz frr-40bd7a625a7ce7c8fa05af29d088943be1154a44.zip |
packaging: Redirect stderr to /dev/null in %post action (frr.spec.in)
Solves:
```
/usr/bin/sed: couldn't write 40 items to stdout: Broken pipe
/usr/bin/sed: couldn't write 40 items to stdout: Broken pipe
/usr/bin/sed: couldn't write 40 items to stdout: Broken pipe
/usr/bin/sed: couldn't write 40 items to stdout: Broken pipe
/usr/bin/sed: couldn't write 40 items to stdout: Broken pipe
/usr/bin/sed: couldn't write 40 items to stdout: Broken pipe
/usr/bin/sed: couldn't write 40 items to stdout: Broken pipe
```
This happens because `grep -q` returns immediately after first match
and closes the pipe while sed has more output to write.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | redhat/frr.spec.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index be3b83bf8..670bc6f4c 100644 --- a/redhat/frr.spec.in +++ b/redhat/frr.spec.in @@ -444,7 +444,7 @@ zebra_spec_add_service () { # Add port /etc/services entry if it isn't already there if [ -f %{_sysconfdir}/services ] && \ - ! %__sed -e 's/#.*$//' %{_sysconfdir}/services | %__grep -wq $1 ; then + ! %__sed -e 's/#.*$//' %{_sysconfdir}/services 2>/dev/null | %__grep -wq $1 ; then echo "$1 $2 # $3" >> %{_sysconfdir}/services fi } |