summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2004-10-23 00:48:51 +0000
committerpaul <paul>2004-10-23 00:48:51 +0000
commit6b637e9602316d98983fa103dfdbef4bbf723ffb (patch)
treeea0b9e311aea82c95ded8d3af9ffc151ba6306be
parentcfc1842b4c177c97cbd63428dfbf2298a97e53c3 (diff)
- andrew's service adding change to detect existing entries reliably
-rw-r--r--redhat/quagga.spec.in3
1 files changed, 2 insertions, 1 deletions
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
}