From: paul Date: Sat, 23 Oct 2004 00:48:51 +0000 (+0000) Subject: - andrew's service adding change to detect existing entries reliably X-Git-Tag: frr-2.0-rc1~3440 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6b637e9602316d98983fa103dfdbef4bbf723ffb;p=mirror%2Ffrr.git - andrew's service adding change to detect existing entries reliably --- diff --git a/redhat/quagga.spec.in b/redhat/quagga.spec.in index c7966da012..c60711b0a4 100644 --- a/redhat/quagga.spec.in +++ b/redhat/quagga.spec.in @@ -215,7 +215,8 @@ groupadd -r %vty_group 2> /dev/null || : zebra_spec_add_service () { # Add port /etc/services entry if it isn't already there - if [ -f /etc/services ] && ! grep -q "^$1[^a-zA-Z0-9]" /etc/services ; then + if [ -f /etc/services ] && \ + ! %__sed -e 's/#.*$//' /etc/services | %__grep -wq $1 ; then echo "$1 $2 # $3" >> /etc/services fi }