aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2017-03-24 09:22:07 -0400
committerBob Peterson <rpeterso@redhat.com>2017-04-03 09:08:58 -0400
commitc369898759e0e143a513d022121290370f001d01 (patch)
tree5c770207fcec81a9fac2380821a7fad02cdd32e2 /tools
parentcc963a11b67b796c25c5b827b25d2bcc92ce1779 (diff)
parentf9fe1c12d126f9887441fa5bb165046f30ddd4b5 (diff)
Merge commit 'f9fe1c1' into for-next
Andreas Gruenbacher added function rhashtable_lookup_get_insert_fast to rhashtable.h. That patch went into the net-next tree. In a subsequent patch, GFS2 makes use of this new function. Therefore, we needed a merge commit to make the new function available to GFS2. Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/hv/bondvf.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/hv/bondvf.sh b/tools/hv/bondvf.sh
index 4aa5369ffa4e..d85968cb1bf2 100755
--- a/tools/hv/bondvf.sh
+++ b/tools/hv/bondvf.sh
@@ -101,9 +101,25 @@ function create_bond_cfg_redhat {
101 echo BONDING_OPTS=\"mode=active-backup miimon=100 primary=$2\" >>$fn 101 echo BONDING_OPTS=\"mode=active-backup miimon=100 primary=$2\" >>$fn
102} 102}
103 103
104function del_eth_cfg_ubuntu {
105 local fn=$cfgdir/interfaces
106 local tmpfl=$(mktemp)
107
108 local nic_start='^[ \t]*(auto|iface|mapping|allow-.*)[ \t]+'$1
109 local nic_end='^[ \t]*(auto|iface|mapping|allow-.*|source)'
110
111 awk "/$nic_end/{x=0} x{next} /$nic_start/{x=1;next} 1" $fn >$tmpfl
112
113 cp $tmpfl $fn
114
115 rm $tmpfl
116}
117
104function create_eth_cfg_ubuntu { 118function create_eth_cfg_ubuntu {
105 local fn=$cfgdir/interfaces 119 local fn=$cfgdir/interfaces
106 120
121 del_eth_cfg_ubuntu $1
122
107 echo $'\n'auto $1 >>$fn 123 echo $'\n'auto $1 >>$fn
108 echo iface $1 inet manual >>$fn 124 echo iface $1 inet manual >>$fn
109 echo bond-master $2 >>$fn 125 echo bond-master $2 >>$fn
@@ -119,6 +135,8 @@ function create_eth_cfg_pri_ubuntu {
119function create_bond_cfg_ubuntu { 135function create_bond_cfg_ubuntu {
120 local fn=$cfgdir/interfaces 136 local fn=$cfgdir/interfaces
121 137
138 del_eth_cfg_ubuntu $1
139
122 echo $'\n'auto $1 >>$fn 140 echo $'\n'auto $1 >>$fn
123 echo iface $1 inet dhcp >>$fn 141 echo iface $1 inet dhcp >>$fn
124 echo bond-mode active-backup >>$fn 142 echo bond-mode active-backup >>$fn