]> git.puffer.fish Git - mirror/frr.git/commitdiff
- andrew's service adding change to detect existing entries reliably
authorpaul <paul>
Sat, 23 Oct 2004 00:48:51 +0000 (00:48 +0000)
committerpaul <paul>
Sat, 23 Oct 2004 00:48:51 +0000 (00:48 +0000)
redhat/quagga.spec.in

index c7966da012c9ec7e9a5d824683aa10597a35e7ef..c60711b0a47b687e5f2ec0857bd3256bd69a023f 100644 (file)
@@ -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
 }