- andrew's service adding change to detect existing entries reliably
diff --git a/redhat/quagga.spec.in b/redhat/quagga.spec.in
index c7966da..c60711b 100644
--- a/redhat/quagga.spec.in
+++ b/redhat/quagga.spec.in
@@ -215,7 +215,8 @@
 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
 }