mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
hsci: fix failed to delete an HSCI connected with VLAN
Deleting an HSCI interface, the connected HiperSockets interface's name and the connected Ethernet interface's name are extracted from "ip link show". Currently the extracted names are directly used in "bridge -d link show dev ifname" for further checking. If "iflink" and "ifindex" of an interface are not matched, ip commands will print @ifXX appended to the real interface's name. Thus, it will be failed if the interface's name with the ending @ifXX is used in "bridge -d link show dev ifname" for further checking. To solve the problem, the ending @ifXX must be removed before the interface name is used further. Signed-off-by: Wenjia Zhang <wenjia@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
522252d18a
commit
faf26220a7
@@ -303,10 +303,14 @@ function del_hsci {
|
||||
|
||||
bports="$(ip link show | grep "master $hsci" | awk '{print $2}')"
|
||||
for bport in $bports; do
|
||||
bport=${bport%:}
|
||||
if [[ $bport == *@* ]]; then
|
||||
bport=${bport%@*}
|
||||
fi
|
||||
if [ $(bridge -d link show dev $bport | grep "learning_sync on" | wc -l) -ne 0 ]; then
|
||||
hsdev=${bport%:}
|
||||
hsdev=$bport
|
||||
else
|
||||
ndev=${bport%:}
|
||||
ndev=$bport
|
||||
fi
|
||||
done
|
||||
if [ "$hsdev" == "" ]; then
|
||||
|
||||
Reference in New Issue
Block a user