From 6b637e9602316d98983fa103dfdbef4bbf723ffb Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 23 Oct 2004 00:48:51 +0000 Subject: - andrew's service adding change to detect existing entries reliably --- redhat/quagga.spec.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'redhat/quagga.spec.in') diff --git a/redhat/quagga.spec.in b/redhat/quagga.spec.in index c7966da0..c60711b0 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 } -- cgit v1.2.1