mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
replace vconfig with ip link
This commit is contained in:
parent
3e0c55cabe
commit
b37ee25359
@ -31,11 +31,9 @@ addVlan() {
|
|||||||
local vlanDev=$pif.$vlanId
|
local vlanDev=$pif.$vlanId
|
||||||
local vlanBr=$3
|
local vlanBr=$3
|
||||||
|
|
||||||
vconfig set_name_type DEV_PLUS_VID_NO_PAD
|
|
||||||
|
|
||||||
if [ ! -d /sys/class/net/$vlanDev ]
|
if [ ! -d /sys/class/net/$vlanDev ]
|
||||||
then
|
then
|
||||||
vconfig add $pif $vlanId > /dev/null
|
ip link add link $pif name $vlanDev type vlan id $vlanId > /dev/null
|
||||||
|
|
||||||
if [ $? -gt 0 ]
|
if [ $? -gt 0 ]
|
||||||
then
|
then
|
||||||
@ -102,7 +100,7 @@ deleteVlan() {
|
|||||||
local vlanDev=$pif.$vlanId
|
local vlanDev=$pif.$vlanId
|
||||||
local vlanBr=$3
|
local vlanBr=$3
|
||||||
|
|
||||||
vconfig rem $vlanDev > /dev/null
|
ip link delete $vlanDev type vlan > /dev/null
|
||||||
|
|
||||||
if [ $? -gt 0 ]
|
if [ $? -gt 0 ]
|
||||||
then
|
then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user