summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/policy/prefix-list/node.tag/rule/node.def6
-rw-r--r--templates/policy/prefix-list6/node.tag/rule/node.def6
2 files changed, 8 insertions, 4 deletions
diff --git a/templates/policy/prefix-list/node.tag/rule/node.def b/templates/policy/prefix-list/node.tag/rule/node.def
index 03692419..edc2db07 100644
--- a/templates/policy/prefix-list/node.tag/rule/node.def
+++ b/templates/policy/prefix-list/node.tag/rule/node.def
@@ -37,7 +37,9 @@ end: len=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ;
if [ -f "/tmp/protocols-$VAR(../@)-$VAR(@).$PPID" ]; then
rm -f "protocols-$VAR(../@)-$VAR(@).$PPID" ;
else
- vtysh -c "configure terminal" \
- -c "ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $cond " ;
+ if ! vtysh -c "configure terminal" \
+ -c "ip prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $cond " ; then
+ exit 1 ;
+ fi;
fi ;
exit 0 ;
diff --git a/templates/policy/prefix-list6/node.tag/rule/node.def b/templates/policy/prefix-list6/node.tag/rule/node.def
index 2f73ebc3..b5c2aed5 100644
--- a/templates/policy/prefix-list6/node.tag/rule/node.def
+++ b/templates/policy/prefix-list6/node.tag/rule/node.def
@@ -36,7 +36,9 @@ end: len=`echo $VAR(./prefix/@) | awk -F/ '{ print $2 }'` ;
fi;
if [ ${COMMIT_ACTION} = 'SET' -o ${COMMIT_ACTION} = 'ACTIVE' ]; then
- vtysh -c "configure terminal" \
- -c "ipv6 prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $cond " ;
+ if ! vtysh -c "configure terminal" \
+ -c "ipv6 prefix-list $VAR(../@) seq $VAR(@) $VAR(./action/@) $VAR(./prefix/@) $cond " ; then
+ exit 1 ;
+ fi;
fi;
exit 0 ;