File tree Expand file tree Collapse file tree
src/confd/share/migrate/1.6 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # Remove ietf-ip:ipv4 and ietf-ip:ipv6 from bridge port interfaces.
3+ # Bridge ports should not have IP addresses; the IP address should
4+ # be configured on the bridge interface itself.
5+ file=$1
6+ temp=${file} .tmp
7+
8+ jq '
9+ if .["ietf-interfaces:interfaces"]?.interface then
10+ .["ietf-interfaces:interfaces"].interface |= map(
11+ if .["infix-interfaces:bridge-port"] and .type != "infix-if-type:bridge" then
12+ del(.["ietf-ip:ipv4"], .["ietf-ip:ipv6"])
13+ else
14+ .
15+ end
16+ )
17+ else
18+ .
19+ end
20+ ' " $file " > " $temp " && mv " $temp " " $file "
Original file line number Diff line number Diff line change 11migratedir = $(pkgdatadir ) /migrate/1.6
22dist_migrate_DATA = 10-dhcp-client-to-ipv4.sh \
33 20-autoconf-to-presence.sh \
4- 30-ospf-backbone-area-type.sh
4+ 30-ospf-backbone-area-type.sh \
5+ 40-bridge-port-remove-ip.sh
You can’t perform that action at this time.
0 commit comments