summaryrefslogtreecommitdiff
path: root/templates/protocols/ospf/passive-interface/node.def
blob: f73f91662740e02aa87710b46b9109b1b2cb7939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
multi:
type: txt
help: Suppress routing updates on an interface
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all && echo default
val_help:<interface>; Interface to be passive (i.e. suppress routing updates)
val_help:default; Default to suppress routing updates on all interfaces

create: sudo /opt/vyatta/sbin/vyatta_quagga_utils.pl \
           --check-ospf-passive="$VAR(@)"
        if [ $? != 0 ] ; then
           exit 1;
        fi
        if [ -z $VAR(@) ] || [ "$VAR(@)" == "default" ] ; then
           vtysh -c "configure terminal" \
                 -c "router ospf"        \
                 -c "passive-interface default";
        else
           vtysh -c "configure terminal" \
                 -c "router ospf"        \
                 -c "passive-interface $VAR(@)"
        fi

delete: if [ -z $VAR(@) ]
	then 
           vtysh -c "configure terminal" \
                 -c "router ospf"        \
                 -c "no passive-interface default"
	else 
           if [ "$VAR(@)" == "default" ]
           then
              if [ $VAR(../passive-interface-exclude/@) ] 
              then
                 echo "Error: delete passive-interface-exclude before deleting passive-interface default";
                 exit 1;
              fi
           fi
           vtysh -c "configure terminal" \
                 -c "router ospf"        \
                 -c "no passive-interface $VAR(@)"
 	fi