aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/scripts/post
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-10-07 18:02:59 +0200
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-10-07 18:02:59 +0200
commit513fd31d16e527ecebc86911bd33ee73d6d16f9f (patch)
treed57436590ba37cbbd95ff80a72982801f9c22f80 /hicn-plugin/scripts/post
parent108c55669102931acc9bd99ca9918379722732b8 (diff)
[HICN-300] Improved script to search for "hicn {" in /etc/vpp/startup.conf
Change-Id: Ib977e10968a78917b6af0f5691370d6df9fcf473 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/scripts/post')
-rw-r--r--hicn-plugin/scripts/post3
1 files changed, 2 insertions, 1 deletions
diff --git a/hicn-plugin/scripts/post b/hicn-plugin/scripts/post
index 3cde599ca..dd0a9fbf5 100644
--- a/hicn-plugin/scripts/post
+++ b/hicn-plugin/scripts/post
@@ -1,7 +1,8 @@
#!/bin/bash
if [ -e /etc/vpp/startup.conf ]; then
- if ! grep -q "hicn" /etc/vpp/startup.conf; then
+ RESULTS=$(sed -n '/hicn[ ]*{/p' /etc/vpp/startup.conf | wc -l)
+ if [[ $RESULTS = 0 ]]; then
printf '\n hicn {
## Set PIT size. Default is 131 072 entries
# pit-size 500000